compiz team mailing list archive
-
compiz team
-
Mailing list archive
-
Message #25839
[Merge] lp:~smspillaz/compiz/compiz.sru2 into lp:compiz
Sam Spilsbury has proposed merging lp:~smspillaz/compiz/compiz.sru2 into lp:compiz.
Requested reviews:
compiz packagers (compiz)
For more details, see:
https://code.launchpad.net/~smspillaz/compiz/compiz.sru2/+merge/85877
SRU2 bugfixes
fix_focus_on_wrong_window_896762.patch:
- Fixes focus being on the wrong window on viewport switches
java_offset_frame_extents_878934.patch:
- Fixes incorrect behaviour with _NET_REQUEST_FRAME_EXTENTS which
causes java applications that relied on this information to place
input events incorrectly
uwd_frame_padding_904746.patch:
- Allows resizing using invisible padding with semi-maximized windows
fix_890947_synthetic_notifications.patch:
- Don't send synthetic ConfigureNotify events using incorrect co-ordinates
due to the fact that the reparent notification wasn't received yet.
--
https://code.launchpad.net/~smspillaz/compiz/compiz.sru2/+merge/85877
Your team compiz packagers is requested to review the proposed merge of lp:~smspillaz/compiz/compiz.sru2 into lp:compiz.
=== added file 'debian/patches/fix_890947_synthetic_notifications.patch'
--- debian/patches/fix_890947_synthetic_notifications.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/fix_890947_synthetic_notifications.patch 2011-12-15 15:07:38 +0000
@@ -0,0 +1,43 @@
+=== modified file 'src/window.cpp'
+Index: compiz-0.9.6+bzr20110929/src/window.cpp
+===================================================================
+--- compiz-0.9.6+bzr20110929.orig/src/window.cpp 2011-12-15 22:47:14.514361587 +0800
++++ compiz-0.9.6+bzr20110929/src/window.cpp 2011-12-15 22:47:53.314553987 +0800
+@@ -1504,7 +1504,7 @@
+ XConfigureEvent xev;
+ XWindowAttributes attrib;
+ unsigned int nchildren;
+- Window rootRet, parentRet;
++ Window rootRet, parentRet = 0;
+ Window *children;
+
+ xev.type = ConfigureNotify;
+@@ -1526,25 +1526,9 @@
+ xev.border_width = attrib.border_width;
+ xev.above = None;
+
+- if (priv->frame)
+- {
+- XWindowAttributes fAttrib;
+- XWindowAttributes wAttrib;
+-
+- /* Add offset between wrapper and client */
+- if (XGetWindowAttributes (screen->dpy (), priv->wrapper, &wAttrib))
+- {
+- xev.x += wAttrib.x;
+- xev.y += wAttrib.y;
+- }
+-
+- /* Add offset between frame and client */
+- if (XGetWindowAttributes (screen->dpy (), priv->frame, &fAttrib))
+- {
+- xev.x += fAttrib.x;
+- xev.y += fAttrib.y;
+- }
+- }
++ /* Translate co-ordinates to root space */
++ XTranslateCoordinates (screen->dpy (), priv->id, screen->root (), 0, 0,
++ &xev.x, &xev.y, &parentRet);
+
+ /* We need to ensure that the stacking order is
+ * based on the current server stacking order so
=== added file 'debian/patches/fix_focus_on_wrong_window_896762.patch'
--- debian/patches/fix_focus_on_wrong_window_896762.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/fix_focus_on_wrong_window_896762.patch 2011-12-15 15:07:38 +0000
@@ -0,0 +1,20 @@
+=== modified file 'src/window.cpp'
+Index: compiz-0.9.6+bzr20110929/src/window.cpp
+===================================================================
+--- compiz-0.9.6+bzr20110929.orig/src/window.cpp 2011-12-15 22:47:02.906304014 +0800
++++ compiz-0.9.6+bzr20110929/src/window.cpp 2011-12-15 22:47:08.334330942 +0800
+@@ -2535,10 +2535,10 @@
+ if (!priv->shaded && (priv->state & CompWindowStateHiddenMask))
+ return false;
+
+- if (priv->geometry.x () + priv->width <= 0 ||
+- priv->geometry.y () + priv->height <= 0 ||
+- priv->geometry.x () >= (int) screen->width ()||
+- priv->geometry.y () >= (int) screen->height ())
++ if (priv->serverGeometry.x () + priv->serverGeometry.width () <= 0 ||
++ priv->serverGeometry.y () + priv->serverGeometry.height () <= 0 ||
++ priv->serverGeometry.x () >= (int) screen->width ()||
++ priv->serverGeometry.y () >= (int) screen->height ())
+ return false;
+
+ return true;
=== added file 'debian/patches/java_offset_frame_extents_878934.patch'
--- debian/patches/java_offset_frame_extents_878934.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/java_offset_frame_extents_878934.patch 2011-12-15 15:07:38 +0000
@@ -0,0 +1,199 @@
+=== modified file 'plugins/decor/src/decor.cpp'
+Index: compiz-0.9.6+bzr20110929/plugins/decor/src/decor.cpp
+===================================================================
+--- compiz-0.9.6+bzr20110929.orig/plugins/decor/src/decor.cpp 2011-12-15 22:47:02.878303874 +0800
++++ compiz-0.9.6+bzr20110929/plugins/decor/src/decor.cpp 2011-12-15 22:47:14.510361578 +0800
+@@ -825,6 +825,7 @@
+ {
+ Decoration *old, *decoration = NULL;
+ bool decorate = false;
++ bool shadowOnly = true;
+ int moveDx, moveDy;
+ int oldShiftX = 0;
+ int oldShiftY = 0;
+@@ -849,34 +850,36 @@
+ case CompWindowTypeMenuMask:
+ case CompWindowTypeNormalMask:
+ if (window->mwmDecor () & (MwmDecorAll | MwmDecorTitle))
+- decorate = (window->frame () ||
+- window->hasUnmapReference ()) ? true : false;
++ shadowOnly = false;
+ default:
+ break;
+ }
+
+ if (window->overrideRedirect ())
+- decorate = false;
++ shadowOnly = true;
+
+ if (window->wmType () & (CompWindowTypeDockMask | CompWindowTypeDesktopMask))
+- decorate = false;
++ shadowOnly = true;
+
+- if (decorate)
++ if (!shadowOnly)
+ {
+ if (!dScreen->optionGetDecorationMatch ().evaluate (window))
+- decorate = false;
++ shadowOnly = true;
+ }
+ }
+ else
+- decorate = true;
++ shadowOnly = false;
++
++ decorate = ((window->frame () ||
++ window->hasUnmapReference ()) && !shadowOnly) ||
++ isSwitcher;
+
+- if (decorate)
++ if (decorate || frameExtentsRequested)
+ {
+ if (decor && checkSize (decor))
+ decoration = decor;
+ else
+ {
+-
+ if (dScreen->dmSupports & WINDOW_DECORATION_TYPE_PIXMAP &&
+ dScreen->cmActive &&
+ !(dScreen->dmSupports & WINDOW_DECORATION_TYPE_WINDOW &&
+@@ -890,6 +893,11 @@
+ else if (dScreen->dmSupports & WINDOW_DECORATION_TYPE_WINDOW)
+ decoration = &dScreen->windowDefault;
+ }
++
++ /* Do not allow windows which are later undecorated
++ * to have a set _NET_FRAME_EXTENTS */
++ if (decorate)
++ frameExtentsRequested = false;
+ }
+ else
+ {
+@@ -944,7 +952,8 @@
+ moveDx = shiftX () - oldShiftX;
+ moveDy = shiftY () - oldShiftY;
+
+- updateFrame ();
++ if (decorate)
++ updateFrame ();
+ window->updateWindowOutputExtents ();
+ if (dScreen->cmActive)
+ cWindow->damageOutputExtents ();
+@@ -955,7 +964,8 @@
+ CompWindowExtents emptyExtents;
+ wd = NULL;
+
+- updateFrame ();
++ if (decorate)
++ updateFrame ();
+
+ memset (&emptyExtents, 0, sizeof (CompWindowExtents));
+
+@@ -1385,6 +1395,8 @@
+
+ this->dmSupports = dmSupports;
+
++ screen->updateSupportedWmHints ();
++
+ if (dmWin)
+ {
+ for (i = 0; i < DECOR_NUM; i++)
+@@ -2047,7 +2059,10 @@
+ {
+ screen->addSupportedAtoms (atoms);
+
+- atoms.push_back (requestFrameExtentsAtom);
++ /* Don't support _NET_REQUEST_FRAME_EXTENTS
++ * where there is no decorator running yet */
++ if (dmWin)
++ atoms.push_back (requestFrameExtentsAtom);
+ }
+
+ bool
+@@ -2155,7 +2170,8 @@
+ updateReg (true),
+ unshading (false),
+ shading (false),
+- isSwitcher (false)
++ isSwitcher (false),
++ frameExtentsRequested (false)
+ {
+ WindowInterface::setHandler (window);
+
+Index: compiz-0.9.6+bzr20110929/plugins/decor/src/decor.h
+===================================================================
+--- compiz-0.9.6+bzr20110929.orig/plugins/decor/src/decor.h 2011-09-29 14:53:38.000000000 +0800
++++ compiz-0.9.6+bzr20110929/plugins/decor/src/decor.h 2011-12-15 22:47:14.510361578 +0800
+@@ -242,6 +242,8 @@
+ bool unshading;
+ bool shading;
+ bool isSwitcher;
++
++ bool frameExtentsRequested;
+ };
+
+ class DecorPluginVTable :
+Index: compiz-0.9.6+bzr20110929/src/window.cpp
+===================================================================
+--- compiz-0.9.6+bzr20110929.orig/src/window.cpp 2011-12-15 22:47:08.334330942 +0800
++++ compiz-0.9.6+bzr20110929/src/window.cpp 2011-12-15 22:47:14.514361587 +0800
+@@ -6832,31 +6832,42 @@
+ priv->border.top != b->top ||
+ priv->border.bottom != b->bottom)
+ {
+- unsigned long data[4];
+-
+ priv->serverInput = *i;
+ priv->border = *b;
+
+ recalcActions ();
+
+- /* Use b for _NET_WM_FRAME_EXTENTS here because
+- * that is the representation of the actual decoration
+- * around the window that the user sees and should
+- * be used for placement and such */
+-
+- data[0] = b->left;
+- data[1] = b->right;
+- data[2] = b->top;
+- data[3] = b->bottom;
+-
+- XChangeProperty (screen->dpy (), priv->id,
+- Atoms::frameExtents,
+- XA_CARDINAL, 32, PropModeReplace,
+- (unsigned char *) data, 4);
+-
+ priv->updateSize ();
+ priv->updateFrameWindow ();
+ }
++
++ /* Use b for _NET_WM_FRAME_EXTENTS here because
++ * that is the representation of the actual decoration
++ * around the window that the user sees and should
++ * be used for placement and such */
++
++ /* Also update frame extents regardless of whether or not
++ * the frame extents actually changed, eg, a plugin could
++ * suggest that a window has no frame extents and that it
++ * might later get frame extents - this is mandatory if we
++ * say that we support it, so set them
++ * additionaly some applications might request frame extents
++ * and we must respond by setting the property - ideally
++ * this should only ever be done when some plugin actually
++ * need to change the frame extents or the applications
++ * requested it */
++
++ unsigned long data[4];
++
++ data[0] = b->left;
++ data[1] = b->right;
++ data[2] = b->top;
++ data[3] = b->bottom;
++
++ XChangeProperty (screen->dpy (), priv->id,
++ Atoms::frameExtents,
++ XA_CARDINAL, 32, PropModeReplace,
++ (unsigned char *) data, 4);
+ }
+
+ bool
=== modified file 'debian/patches/series'
--- debian/patches/series 2011-11-23 06:59:01 +0000
+++ debian/patches/series 2011-12-15 15:07:38 +0000
@@ -19,3 +19,7 @@
rev_2890_fix_879253.patch
fix-886978.patch
fix_slow_vsync_lp763005.patch
+fix_focus_on_wrong_window_896762.patch
+java_offset_frame_extents_878934.patch
+uwd_frame_padding_904746.patch
+fix_890947_synthetic_notifications.patch
=== added file 'debian/patches/uwd_frame_padding_904746.patch'
--- debian/patches/uwd_frame_padding_904746.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/uwd_frame_padding_904746.patch 2011-12-15 15:07:38 +0000
@@ -0,0 +1,33 @@
+=== modified file 'unity/unity_window_decorator/src/metacity.c'
+--- old/unity/unity_window_decorator/src/metacity.c 2011-09-29 12:42:33 +0000
++++ new/unity/unity_window_decorator/src/metacity.c 2011-12-15 14:13:59 +0000
+@@ -116,11 +116,18 @@
+ invisible_grab_area_properties =
+ meta_frame_style_get_invisible_grab_area_properties (frame_style);
+
+- if (!d->frame_window && invisible_grab_area_properties)
++ if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
+ {
+ frame_extents.left += invisible_grab_area_properties->left;
+ frame_extents.right += invisible_grab_area_properties->right;
++ frame_max_extents.left += invisible_grab_area_properties->left;
++ frame_max_extents.right += invisible_grab_area_properties->right;
++ }
++
++ if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
++ {
+ frame_extents.bottom += invisible_grab_area_properties->bottom;
++ frame_max_extents.bottom += invisible_grab_area_properties->bottom;
+ }
+
+ extents.top += titlebar_height;
+@@ -1133,7 +1140,7 @@
+ *x += _win_extents.left + 4;
+ *y += _win_extents.top + 2;
+ }
+- else if (invisible_grab_area_properties)
++ else if (invisible_grab_area_properties && flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
+ {
+ *x += invisible_grab_area_properties->left;
+ }
+
Follow ups