diff options
author | Sam Spilsbury <smspillaz@gmail.com> | 2011-01-02 16:29:03 +0800 |
---|---|---|
committer | Sam Spilsbury <smspillaz@gmail.com> | 2011-01-02 16:29:03 +0800 |
commit | 3f18c469842cdad1317fd6d1dfd33a77ffe177da (patch) | |
tree | fd96dcf5b967c79e831279ecd9662f0587bf80f6 | |
parent | 86493819db2cc050a4b233d2390405868a903bad (diff) | |
parent | 2ced0ab6af7508ced8f5dfb75c8803708bfe341c (diff) | |
download | compiz-with-glib-mainloop-3f18c469842cdad1317fd6d1dfd33a77ffe177da.tar.gz compiz-with-glib-mainloop-3f18c469842cdad1317fd6d1dfd33a77ffe177da.tar.bz2 |
Merge branch 'master' of git://git.compiz.org/compiz/core into glibmm-experimental
-rw-r--r-- | plugins/move/src/move.cpp | 3 | ||||
-rw-r--r-- | plugins/resize/src/resize.cpp | 3 | ||||
-rw-r--r-- | plugins/scale/src/scale.cpp | 21 | ||||
-rw-r--r-- | src/event.cpp | 20 | ||||
-rw-r--r-- | src/plugin.cpp | 5 | ||||
-rw-r--r-- | src/window.cpp | 4 |
6 files changed, 34 insertions, 22 deletions
diff --git a/plugins/move/src/move.cpp b/plugins/move/src/move.cpp index 77556a5..300d337 100644 --- a/plugins/move/src/move.cpp +++ b/plugins/move/src/move.cpp @@ -127,6 +127,9 @@ moveInitiate (CompAction *action, w->grabNotify (x, y, mods, grabMask); + if (screen->getOption ("raise_on_click")->value ().b ()) + w->updateAttributes (CompStackingUpdateModeAboveFullscreen); + if (state & CompAction::StateInitKey) { int xRoot, yRoot; diff --git a/plugins/resize/src/resize.cpp b/plugins/resize/src/resize.cpp index d38e604..7371e0b 100644 --- a/plugins/resize/src/resize.cpp +++ b/plugins/resize/src/resize.cpp @@ -452,6 +452,9 @@ resizeInitiate (CompAction *action, w->grabNotify (x, y, state, grabMask); + if (screen->getOption ("raise_on_click")->value ().b ()) + w->updateAttributes (CompStackingUpdateModeAboveFullscreen); + /* using the paint rectangle is enough here as we don't have any stretch yet */ rs->getPaintRectangle (&box); diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp index 6939aa4..f257135 100644 --- a/plugins/scale/src/scale.cpp +++ b/plugins/scale/src/scale.cpp @@ -908,9 +908,6 @@ PrivateScaleScreen::scaleTerminate (CompAction *action, Window xid; - action->setState (action->state () & ~(CompAction::StateTermKey | - CompAction::StateTermButton)); - if (ss->priv->actionShouldToggle (action, state)) return false; @@ -967,6 +964,9 @@ PrivateScaleScreen::scaleTerminate (CompAction *action, ss->priv->cScreen->damageScreen (); } + if (state & CompAction::StateInitKey) + action->setState (action->state () | CompAction::StateTermKey); + ss->priv->lastActiveNum = 0; return false; @@ -1036,19 +1036,20 @@ PrivateScaleScreen::scaleInitiate (CompAction *action, { SCALE_SCREEN (::screen); - if (ss->priv->state != ScaleScreen::Wait && - ss->priv->state != ScaleScreen::Out) - { - ss->priv->type = type; - return ss->priv->scaleInitiateCommon (action, state, options); - } - else if (ss->priv->actionShouldToggle (action, state)) + if (ss->priv->actionShouldToggle (action, state) && + (ss->priv->state == ScaleScreen::Wait || + ss->priv->state == ScaleScreen::Out)) { if (ss->priv->type == type) return scaleTerminate (action, CompAction::StateCancel, options); } + else + { + ss->priv->type = type; + return ss->priv->scaleInitiateCommon (action, state, options); + } } return false; diff --git a/src/event.cpp b/src/event.cpp index ee4ddfd..fb4b592 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -1084,8 +1084,10 @@ CompScreen::handleEvent (XEvent *event) if (!w->overrideRedirect ()) priv->setWmState (WithdrawnState, w->id ()); - w->priv->placed = false; + w->priv->placed = false; + w->priv->managed = false; w->priv->unmanaging = true; + if (w->priv->frame) { w->priv->unreparent (); @@ -1397,37 +1399,39 @@ CompScreen::handleEvent (XEvent *event) unsigned int xwcm = 0; XWindowChanges xwc; int gravity; + int value_mask; unsigned int source; + gravity = (event->xclient.data.l[0] & 0xFF); + value_mask = (event->xclient.data.l[0] & 0xF00) >> 8; + source = (event->xclient.data.l[0] & 0xF000) >> 12; + memset (&xwc, 0, sizeof (xwc)); - if (event->xclient.data.l[0] & (1 << 8)) + if (value_mask & CWX) { xwcm |= CWX; xwc.x = event->xclient.data.l[1]; } - if (event->xclient.data.l[0] & (1 << 9)) + if (value_mask & CWY) { xwcm |= CWY; xwc.y = event->xclient.data.l[2]; } - if (event->xclient.data.l[0] & (1 << 10)) + if (value_mask & CWWidth) { xwcm |= CWWidth; xwc.width = event->xclient.data.l[3]; } - if (event->xclient.data.l[0] & (1 << 11)) + if (value_mask & CWHeight) { xwcm |= CWHeight; xwc.height = event->xclient.data.l[4]; } - gravity = event->xclient.data.l[0] & 0xFF; - source = (event->xclient.data.l[0] >> 12) & 0xF; - w->moveResize (&xwc, xwcm, gravity, source); } } diff --git a/src/plugin.cpp b/src/plugin.cpp index dd5bc7e8..7aff05f 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -351,11 +351,12 @@ CompScreen::finiPluginForScreen (CompPlugin *p) bool CompPlugin::screenInitPlugins (CompScreen *s) { - CompPlugin::List::iterator it = plugins.begin (); + CompPlugin::List::reverse_iterator it = plugins.rbegin (); CompPlugin *p = NULL; - while (it != plugins.end ()) + /* Plugins is a btf list, so iterate it in reverse */ + while (it != plugins.rend ()) { p = (*it); diff --git a/src/window.cpp b/src/window.cpp index 93b5c2c..3a75b34 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1345,7 +1345,7 @@ CompWindow::unmap () if (priv->unmapRefCnt > 0) return; - if (priv->managed && !priv->placed) + if (priv->unmanaging) { XWindowChanges xwc; unsigned int xwcm; @@ -1364,7 +1364,7 @@ CompWindow::unmap () if (xwcm) configureXWindow (xwcm, &xwc); - priv->managed = false; + priv->unmanaging = false; } if (priv->struts) |