diff -Nru compiz-0.9.11+14.04.20140423/compizconfig/gsettings/src/gsettings.c compiz-0.9.11.1+14.04.20140623/compizconfig/gsettings/src/gsettings.c --- compiz-0.9.11+14.04.20140423/compizconfig/gsettings/src/gsettings.c 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/compizconfig/gsettings/src/gsettings.c 2014-06-23 10:08:04.000000000 -0400 @@ -423,13 +423,19 @@ static void updateSetting (CCSBackend *backend, CCSContext *context, CCSPlugin *plugin, CCSSetting *setting) { + Bool status; CCSIntegratedSetting *integrated = ccsGSettingsBackendGetIntegratedSetting (backend, setting); - ccsBackendReadInit (backend, context); - if (!readOption (backend, setting)) + if (ccsGetIntegrationEnabled (context) && + integrated) { - ccsResetToDefault (setting, TRUE); + status = readIntegratedOption (backend, setting, integrated); } + else + status = readOption (backend, setting); + + if (!status) + ccsResetToDefault (setting, TRUE); if (ccsGetIntegrationEnabled (context) && integrated) diff -Nru compiz-0.9.11+14.04.20140423/compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting.c compiz-0.9.11.1+14.04.20140623/compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting.c --- compiz-0.9.11+14.04.20140423/compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting.c 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting.c 2014-06-23 10:08:04.000000000 -0400 @@ -244,8 +244,6 @@ /* g_settings_set_value consumes the reference */ if (newVariant) ccsGSettingsWrapperSetValue (priv->wrapper, gsettingsTranslatedName, newVariant); - else - ccsGSettingsWrapperResetKey (priv->wrapper, gsettingsTranslatedName); g_variant_unref (variant); free (gsettingsTranslatedName); diff -Nru compiz-0.9.11+14.04.20140423/debian/changelog compiz-0.9.11.1+14.04.20140623/debian/changelog --- compiz-0.9.11+14.04.20140423/debian/changelog 2014-06-24 09:57:05.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/debian/changelog 2014-06-24 09:57:06.000000000 -0400 @@ -1,3 +1,32 @@ +compiz (1:0.9.11.1+14.04.20140623-0ubuntu1) trusty; urgency=medium + + [ Chris Townsend ] + * Fix issue where window decorations would be placed under the Panel + when opening a new window from an already open window. This is due + to the already open window being taller or just as tall without be + maximized than the workspace. (LP: #1303462) + * Only constrain the non-modifier scrolling to the vertical scrolling + buttons - buttons 4 & 5. (LP: #1311303) + * Fix issue where maximized windows would get moved to different + workspaces when disconnecting/connecting an external monitor. + Windows should stay in the same workspace they are in when the + monitor event occurs. (LP: #1304531) + * Fix issue where horizontal and vertical keyboard resizing could not + happen at the same time. (LP: #347390) + + [ Marco Trevisan (TreviƱo) ] + * Event: set the screen grabbed also when we get a NotifyWhileGrabbed + Focus{In,Out} event (LP: #1305586) + + [ Lukas Vacek ] + * Fix issue where custom keyboard shortcuts would get reset to + defaults when rebooting or restarting Compiz. (LP: #1063617) + + [ Ubuntu daily release ] + * New rebuild forced + + -- Ubuntu daily release Mon, 23 Jun 2014 14:08:17 +0000 + compiz (1:0.9.11+14.04.20140423-0ubuntu1) trusty; urgency=low [ Ryan Tandy ] diff -Nru compiz-0.9.11+14.04.20140423/plugins/place/src/place.cpp compiz-0.9.11.1+14.04.20140623/plugins/place/src/place.cpp --- compiz-0.9.11+14.04.20140423/plugins/place/src/place.cpp 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/plugins/place/src/place.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -123,6 +123,8 @@ state |= compiz::place::WindowAbove; if (window->state () & CompWindowStateBelowMask) state |= compiz::place::WindowBelow; + if (window->state () & CompWindowStateMaximizedVertMask || window->state () & CompWindowStateMaximizedHorzMask) + state |= compiz::place::WindowMaximized; return state; } diff -Nru compiz-0.9.11+14.04.20140423/plugins/place/src/screen-size-change/include/screen-size-change.h compiz-0.9.11.1+14.04.20140623/plugins/place/src/screen-size-change/include/screen-size-change.h --- compiz-0.9.11+14.04.20140423/plugins/place/src/screen-size-change/include/screen-size-change.h 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/plugins/place/src/screen-size-change/include/screen-size-change.h 2014-06-23 10:08:04.000000000 -0400 @@ -36,6 +36,7 @@ { namespace place { + const unsigned int WindowMaximized = 1 << 2; class ScreenSizeChangeObject { @@ -50,6 +51,7 @@ virtual const CompPoint & getViewport () const = 0; virtual const CompRect & getWorkarea (const compiz::window::Geometry &g) const = 0; virtual const compiz::window::extents::Extents & getExtents () const = 0; + virtual unsigned int getState () const = 0; compiz::window::Geometry adjustForSize (const CompSize &oldSize, const CompSize &newSize); diff -Nru compiz-0.9.11+14.04.20140423/plugins/place/src/screen-size-change/src/screen-size-change.cpp compiz-0.9.11.1+14.04.20140623/plugins/place/src/screen-size-change/src/screen-size-change.cpp --- compiz-0.9.11+14.04.20140423/plugins/place/src/screen-size-change/src/screen-size-change.cpp 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/plugins/place/src/screen-size-change/src/screen-size-change.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -39,7 +39,7 @@ { int vpX, vpY; compiz::window::Geometry g, vpRelRect; - int pivotX, pivotY; + int pivotX, pivotY, pivotWidth, pivotHeight; g = getGeometry (); compiz::window::Geometry og (g); @@ -50,10 +50,13 @@ /* FIXME: Should use saved geometry for maximized / fullscreen windows */ /* calculate target vp x, y index for window's pivot point */ - vpX = pivotX / oldSize.width (); + pivotWidth = (getState () & compiz::place::WindowMaximized) ? newSize.width () : oldSize.width (); + pivotHeight = (getState () & compiz::place::WindowMaximized) ? newSize.height () : oldSize.height (); + + vpX = pivotX / pivotWidth; if (pivotX < 0) vpX -= 1; - vpY = pivotY / oldSize.height (); + vpY = pivotY / pivotHeight; if (pivotY < 0) vpY -= 1; diff -Nru compiz-0.9.11+14.04.20140423/plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp compiz-0.9.11.1+14.04.20140623/plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp --- compiz-0.9.11+14.04.20140423/plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -62,6 +62,7 @@ const CompPoint & getViewport () const; const CompRect & getWorkarea (const cw::Geometry &g) const; const cw::extents::Extents & getExtents () const; + unsigned int getState () const; void setVp (const CompPoint &); void setWorkArea (const CompRect &); @@ -214,6 +215,12 @@ return mCurrentExtents; } +unsigned int +StubScreenSizeChangeObject::getState () const +{ + return 0; +} + void StubScreenSizeChangeObject::setVp (const CompPoint &p) { diff -Nru compiz-0.9.11+14.04.20140423/plugins/resize/src/logic/include/resize-logic.h compiz-0.9.11.1+14.04.20140623/plugins/resize/src/logic/include/resize-logic.h --- compiz-0.9.11+14.04.20140423/plugins/resize/src/logic/include/resize-logic.h 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/plugins/resize/src/logic/include/resize-logic.h 2014-06-23 10:08:04.000000000 -0400 @@ -176,6 +176,9 @@ unsigned int output, int &op, int &wap); + + unsigned int lastMaskX; + unsigned int lastMaskY; }; #endif /* RESIZELOGIC_H */ diff -Nru compiz-0.9.11+14.04.20140423/plugins/resize/src/logic/src/resize-logic.cpp compiz-0.9.11.1+14.04.20140623/plugins/resize/src/logic/src/resize-logic.cpp --- compiz-0.9.11+14.04.20140423/plugins/resize/src/logic/src/resize-logic.cpp 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/plugins/resize/src/logic/src/resize-logic.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -65,7 +65,9 @@ offWorkAreaConstrained (true), options (NULL), cScreen (NULL), - gScreen (NULL) + gScreen (NULL), + lastMaskX (0), + lastMaskY (0) { rKeys[0].name = "Left"; rKeys[0].dx = -1; @@ -411,6 +413,19 @@ mask = rKeys[i].resizeMask; + if ((mask & ResizeLeftMask || mask & ResizeRightMask) && (mask != lastMaskX)) + { + pointerDx *= -1; + + lastMaskX = mask; + } + if ((mask & ResizeUpMask || mask & ResizeDownMask) && (mask != lastMaskY)) + { + pointerDy *= -1; + + lastMaskY = mask; + } + mScreen->updateGrab (grabIndex, cursor[i]); } break; @@ -439,14 +454,14 @@ accumulatePointerMotion (xRoot, yRoot); } - if (mask & ResizeLeftMask) + if (mask & ResizeLeftMask || lastMaskX & ResizeLeftMask) wi -= pointerDx; - else if (mask & ResizeRightMask) + else if (mask & ResizeRightMask || lastMaskX & ResizeRightMask) wi += pointerDx; - if (mask & ResizeUpMask) + if (mask & ResizeUpMask || lastMaskY & ResizeUpMask) he -= pointerDy; - else if (mask & ResizeDownMask) + else if (mask & ResizeDownMask || lastMaskY & ResizeDownMask) he += pointerDy; if (w->state () & CompWindowStateMaximizedVertMask) diff -Nru compiz-0.9.11+14.04.20140423/src/event.cpp compiz-0.9.11.1+14.04.20140623/src/event.cpp --- compiz-0.9.11+14.04.20140423/src/event.cpp 2014-04-23 10:55:09.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/src/event.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -2333,6 +2333,8 @@ case FocusOut: if (event->xfocus.mode == NotifyUngrab) privateScreen.eventManager.ungrabNotified (); + else if (event->xfocus.mode == NotifyWhileGrabbed) + privateScreen.eventManager.grabNotified (); break; case EnterNotify: if (event->xcrossing.root == privateScreen.rootWindow()) diff -Nru compiz-0.9.11+14.04.20140423/src/screen.cpp compiz-0.9.11.1+14.04.20140623/src/screen.cpp --- compiz-0.9.11+14.04.20140423/src/screen.cpp 2014-04-23 10:55:09.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/src/screen.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -3421,12 +3421,11 @@ if (ignore & ~modHandler->ignoredModMask ()) continue; - /* Do not allow binding of the scroll wheel for windows other than the desktop + /* Do not allow binding of vertical scrolling for windows other than the desktop * unless there is a modifier defined */ if (window && !(window->type () & CompWindowTypeDesktopMask) && - bind.button > 3 && - bind.button < 8 && + (bind.button == Button4 || bind.button == Button5) && !mods) continue; diff -Nru compiz-0.9.11+14.04.20140423/src/window/extents/src/windowextents.cpp compiz-0.9.11.1+14.04.20140623/src/window/extents/src/windowextents.cpp --- compiz-0.9.11+14.04.20140423/src/window/extents/src/windowextents.cpp 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/src/window/extents/src/windowextents.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -43,6 +43,7 @@ case NorthGravity: case NorthWestGravity: case NorthEastGravity: + case CenterGravity: rv.setY (extents.top); break; case SouthGravity: diff -Nru compiz-0.9.11+14.04.20140423/src/window.cpp compiz-0.9.11.1+14.04.20140623/src/window.cpp --- compiz-0.9.11+14.04.20140423/src/window.cpp 2014-04-23 10:54:46.000000000 -0400 +++ compiz-0.9.11.1+14.04.20140623/src/window.cpp 2014-06-23 10:08:04.000000000 -0400 @@ -3553,11 +3553,20 @@ int mask = 0; CompPoint viewport; - if (old.intersects (CompRect (0, 0, screen->width (), screen->height ()))) + if (old.intersects (CompRect (0, 0, screen->width (), screen->height ())) && + !(state & CompWindowStateMaximizedHorzMask || state & CompWindowStateMaximizedVertMask)) viewport = screen->vp (); + else if ((state & CompWindowStateMaximizedHorzMask || state & CompWindowStateMaximizedVertMask) && + window->moved ()) + viewport = initialViewport; else screen->viewportForGeometry (old, viewport); + if (viewport.x () > screen->vpSize ().width () - 1) + viewport.setX (screen->vpSize ().width () - 1); + if (viewport.y () > screen->vpSize ().height () - 1) + viewport.setY (screen->vpSize ().height () - 1); + int x = (viewport.x () - screen->vp ().x ()) * screen->width (); int y = (viewport.y () - screen->vp ().y ()) * screen->height (); @@ -4021,6 +4030,8 @@ if (placed) priv->placed = true; + + priv->initialViewport = defaultViewport (); } bool @@ -4674,6 +4685,8 @@ if (overrideRedirect ()) return; + priv->initialViewport = screen->vp (); + state = constrainWindowState (state, priv->actions); state &= MAXIMIZE_STATE; @@ -5637,8 +5650,8 @@ if (!(priv->type & CompWindowTypeDesktopMask)) { - /* Ungrab Buttons 4-7 for scrolling if the window is not the desktop window */ - for (int i = 4; i <= 7; i++) + /* Ungrab Buttons 4 & 5 for vertical scrolling if the window is not the desktop window */ + for (int i = Button4; i <= Button5; ++i) XUngrabButton (screen->dpy (), i, AnyModifier, frame); } } @@ -5832,6 +5845,10 @@ xwc.y = serverGeometry ().y () + wy; configureXWindow (valueMask, &xwc); + + if ((state () & CompWindowStateMaximizedHorzMask || state () & CompWindowStateMaximizedVertMask) && + (defaultViewport () == screen->vp ())) + priv->initialViewport = screen->vp (); } } @@ -6664,6 +6681,9 @@ if (xwc.x < workarea.x ()) xwc.x = workarea.x () + movement.x (); + + if (xwc.x - boffset.x () < workarea.x ()) + xwc.x += boffset.x (); } if (xwc.y + xwc.height > workarea.y2 ()) @@ -6672,6 +6692,9 @@ if (xwc.y < workarea.y ()) xwc.y = workarea.y () + movement.y (); + + if (xwc.y - boffset.y () < workarea.y ()) + xwc.y += boffset.y (); } if (priv->actions & CompWindowActionResizeMask)