~aacid/metacity/metacity_multimonitor_struts

« back to all changes in this revision

Viewing changes to debian/patches/104_workarea_union.patch

  • Committer: Albert Astals
  • Date: 2012-03-09 12:16:28 UTC
  • Revision ID: albert.astals@canonical.com-20120309121628-vse27prveshxmq59
Add the aptch for workarea being union and not just one, it's less bad and we need it for gtk not to get confused with menu placement

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Description: Make the workarea be the union of available work areas not only one
 
2
# Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/950774
 
3
Index: metacity-2.34.1/src/core/window.c
 
4
===================================================================
 
5
--- metacity-2.34.1-old/src/core/workspace.c    2012-02-24 09:57:18.133491716 +0100
 
6
+++ metacity-2.34.1/src/core/workspace.c        2012-03-09 13:06:33.513603495 +0100
 
7
@@ -638,13 +638,18 @@
 
8
   /* STEP 3: Get the work areas (region-to-maximize-to) for the screen and
 
9
    *         xineramas.
 
10
    */
 
11
-  work_area = workspace->screen->rect;  /* start with the screen */
 
12
   if (workspace->screen_region == NULL)
 
13
     work_area = meta_rect (0, 0, -1, -1);
 
14
   else
 
15
-    meta_rectangle_clip_to_region (workspace->screen_region,
 
16
-                                   FIXED_DIRECTION_NONE,
 
17
-                                   &work_area);
 
18
+    {
 
19
+      const GList *temp;
 
20
+      work_area = *(MetaRectangle*)workspace->screen_region->data;
 
21
+      for (temp = workspace->screen_region; temp; temp = temp->next)
 
22
+      {
 
23
+        MetaRectangle *rect = temp->data;
 
24
+        meta_rectangle_union(rect, &work_area, &work_area);
 
25
+      }
 
26
+    }
 
27
 
 
28
   /* Lots of paranoia checks, forcing work_area_screen to be sane */
 
29
 #define MIN_SANE_AREA 100