Page 6 of 6 FirstFirst ... 456
Results 51 to 56 of 56

Thread: HOWTO: Change Metacity/Twinview window placement behavior [Dapper, Edgy]

  1. #51
    Join Date
    Oct 2005
    Location
    Copenhagen
    Beans
    206

    Re: HOWTO: Change Metacity/Twinview window placement behavior [Dapper, Edgy]

    Sh*t guys I'm sorry. I completely forgot. I'll get something done soon.
    Right now I'm looking into using the PPA for this as it will make things easier to maintain.
    Regards TLE

  2. #52
    Join Date
    Jul 2007
    Beans
    12

    Re: HOWTO: Change Metacity/Twinview window placement behavior [Dapper, Edgy]

    Does anyone know of a same kind of thread for kwin? I'm not sure how kwin does this, guess the default is to open the window where the cursor is. Would really like to be able to change it so that I could somehow define where to open the windows. Also that "remember last state" kinda function would be sweet.

    Nice thread btw. Big up for TLE! Sorry for this a bit off-topic post.

  3. #53
    Join Date
    Jun 2006
    Location
    Somewhere too cold!
    Beans
    Hidden!

    Re: HOWTO: Change Metacity/Twinview window placement behavior [Dapper, Edgy]

    Quote Originally Posted by elysion View Post
    Does anyone know of a same kind of thread for kwin? I'm not sure how kwin does this, guess the default is to open the window where the cursor is. Would really like to be able to change it so that I could somehow define where to open the windows. Also that "remember last state" kinda function would be sweet.

    Nice thread btw. Big up for TLE! Sorry for this a bit off-topic post.
    You could have a look at devilspie. It's in the repositories. It helps you define window behaviour (e.g. where to open it, how big etc) for specific applications though I don't think it alters the standard behaviour (e.g. cascade windows vs open window where cursor is).

    /mojoman
    Last edited by mojoman; October 10th, 2007 at 08:29 PM.

  4. #54
    Join Date
    Mar 2007
    Beans
    5

    Re: HOWTO: Change Metacity/Twinview window placement behavior [Dapper, Edgy]

    The annoying behavior got back in Ubuntu 8.04. Just found another fix somewhere if you are using Compiz and later versions of Ubuntu. It is just a Compiz Setting change.

    http://autopragmatic.com/2007/11/11/...dow-placement/

  5. #55
    Join Date
    Jul 2008
    Beans
    18

    Re: HOWTO: Change Metacity/Twinview window placement behavior [Dapper, Edgy]

    I still really want to use metacity because compiz has major stuttering problems when scrolling and it's a resource hog to begin with.

    Unfortunately, this patch doesn't work with metacity 2.22 . I figured out where n_xineramas is used. Can someone please help me (and others like me) decipher this code?

    metacity-2.22.0/src/core/screen.c

    Code:
    meta_screen_get_natural_xinerama_list (MetaScreen *screen,
                                           int**       xineramas_list,
                                           int*        n_xineramas)
    {
      const MetaXineramaScreenInfo* current;
      const MetaXineramaScreenInfo* tmp;
      GQueue* xinerama_queue;
      int* visited;
      int cur = 0;
      int i;
    
      *n_xineramas = screen->n_xinerama_infos;
      *xineramas_list = g_new (int, screen->n_xinerama_infos);
    
      /* we calculate a natural ordering by which to choose xineramas for
       * window placement.  We start at the current xinerama, and perform
       * a breadth-first search of the xineramas starting from that
       * xinerama.  We choose preferentially left, then right, then down,
       * then up.  The visitation order produced by this traversal is the
       * natural xinerama ordering.
       */
    
      visited = g_new (int, screen->n_xinerama_infos);
      for (i = 0; i < screen->n_xinerama_infos; i++)
        {
          visited[i] = FALSE;
        }
    
      current = meta_screen_get_current_xinerama (screen);
      xinerama_queue = g_queue_new ();
      g_queue_push_tail (xinerama_queue, (gpointer) current);
      visited[current->number] = TRUE;
    
      while (!g_queue_is_empty (xinerama_queue))
        {
          current = (const MetaXineramaScreenInfo*) 
            g_queue_pop_head (xinerama_queue);
    
          (*xineramas_list)[cur++] = current->number;
    
          /* enqueue each of the directions */
          tmp = meta_screen_get_xinerama_neighbor (screen,
                                                   current->number,
                                                   META_SCREEN_LEFT);
          if (tmp && !visited[tmp->number])
            {
              g_queue_push_tail (xinerama_queue,
                                 (MetaXineramaScreenInfo*) tmp);
              visited[tmp->number] = TRUE;
            }
          tmp = meta_screen_get_xinerama_neighbor (screen,
                                                   current->number,
                                                   META_SCREEN_RIGHT);
          if (tmp && !visited[tmp->number])
            {
              g_queue_push_tail (xinerama_queue,
                                 (MetaXineramaScreenInfo*) tmp);
              visited[tmp->number] = TRUE;
            }
          tmp = meta_screen_get_xinerama_neighbor (screen,
                                                   current->number,
                                                   META_SCREEN_UP);
          if (tmp && !visited[tmp->number])
            {
              g_queue_push_tail (xinerama_queue,
                                 (MetaXineramaScreenInfo*) tmp);
              visited[tmp->number] = TRUE;
            }
          tmp = meta_screen_get_xinerama_neighbor (screen,
                                                   current->number,
                                                   META_SCREEN_DOWN);
          if (tmp && !visited[tmp->number])
            {
              g_queue_push_tail (xinerama_queue,
                                 (MetaXineramaScreenInfo*) tmp);
              visited[tmp->number] = TRUE;
            }
        }
    
      /* in case we somehow missed some set of xineramas, go through the
       * visited list and add in any xineramas that were missed
       */
      for (i = 0; i < screen->n_xinerama_infos; i++)
        {
          if (visited[i] == FALSE)
            {
              (*xineramas_list)[cur++] = i;
            }
        }
    
      g_free (visited);
      g_queue_free (xinerama_queue);
    }

  6. #56
    Join Date
    Mar 2008
    Beans
    6

    Re: HOWTO: Change Metacity/Twinview window placement behavior [Dapper, Edgy]

    Quote Originally Posted by alexlzl View Post
    The annoying behavior got back in Ubuntu 8.04. Just found another fix somewhere if you are using Compiz and later versions of Ubuntu. It is just a Compiz Setting change.

    http://autopragmatic.com/2007/11/11/...dow-placement/
    Worked great for me in Hardy 8.04.1 - thanks!

Page 6 of 6 FirstFirst ... 456

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •