diff options
author | Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> | 2010-11-19 10:58:18 +0200 |
---|---|---|
committer | Adam Endrodi <ext-adam.endrodi@nokia.com> | 2010-12-03 11:16:24 +0200 |
commit | 0b814ec075f5203eb1edbbb31fa62022fb5911f6 (patch) | |
tree | cd4fb4e0d4ea1ae41b5220c31653d1b06e05b535 | |
parent | 688b377f423629e18225280de3b8ed0759330fe1 (diff) |
add MCompositeManagerPrivate::changed_properties to signify when we should
check stacking/focus/etc. because of a property change
-rw-r--r-- | src/mcompositemanager.cpp | 11 | ||||
-rw-r--r-- | src/mcompositemanager_p.h | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/mcompositemanager.cpp b/src/mcompositemanager.cpp index 61fbeee..6d6b4b1 100644 --- a/src/mcompositemanager.cpp +++ b/src/mcompositemanager.cpp @@ -711,6 +711,7 @@ MCompositeManagerPrivate::MCompositeManagerPrivate(QObject *p) buttoned_win(0), glwidget(0), compositing(true), + changed_properties(false), stacking_timeout_check_visibility(false), stacking_timeout_timestamp(CurrentTime) { @@ -964,6 +965,7 @@ void MCompositeManagerPrivate::propertyEvent(XPropertyEvent *e) pc = prop_caches.value(e->window); if (pc->propertyEvent(e) && pc->isMapped()) { + changed_properties = true; // property change can affect stacking order if (pc->isDecorator()) // in case decorator's transiency changes, make us update the value pc->transientFor(); @@ -2128,11 +2130,12 @@ void MCompositeManagerPrivate::checkStacking(bool force_visibility_check, (unsigned char *)no_decors.toVector().data(), no_decors.size()); prev_only_mapped = QList<Window>(only_mapped); - + } + if (order_changed || changed_properties) { if (!device_state->displayOff()) pingTopmost(); + checkInputFocus(timestamp); } - checkInputFocus(timestamp); // WM_HINTS can change even if the order didn't if (order_changed || force_visibility_check) { static int xres = ScreenOfDisplay(QX11Info::display(), DefaultScreen(QX11Info::display()))->width; @@ -2190,8 +2193,8 @@ void MCompositeManagerPrivate::checkStacking(bool force_visibility_check, setWindowState(cw->window(), NormalState); } } - // FIXME: should be true only when order_changed or e.g. transiency changes - setCurrentApp(set_as_current_app, true); + setCurrentApp(set_as_current_app, order_changed || changed_properties); + changed_properties = false; } void MCompositeManagerPrivate::stackingTimeout() diff --git a/src/mcompositemanager_p.h b/src/mcompositemanager_p.h index 7e2917b..4179cfa 100644 --- a/src/mcompositemanager_p.h +++ b/src/mcompositemanager_p.h @@ -157,6 +157,7 @@ public: bool compositing; bool overlay_mapped; + bool changed_properties; MDeviceState *device_state; xcb_connection_t *xcb_conn; |