diff options
author | Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> | 2010-12-08 14:47:37 +0200 |
---|---|---|
committer | Adam Endrodi <ext-adam.endrodi@nokia.com> | 2010-12-14 14:57:00 +0200 |
commit | 311de2a92541db0e4fb41340a1e67f0b20548d31 (patch) | |
tree | 581054ba81757ae18acd63eb8b27a15b25d0a7b9 | |
parent | 40f5659c4441fb48fde5b12c65d833a62a82ebe3 (diff) |
Remove old dock code and obsolete _DUI_STATUSBAR_OVERLAY
- if dock support is later wanted, it needs to be written so that it's
compatible with the current stacking and resizing code
-rw-r--r-- | src/mcompatoms_p.h | 4 | ||||
-rw-r--r-- | src/mcompositemanager.cpp | 53 | ||||
-rw-r--r-- | src/mcompositemanager_p.h | 1 |
3 files changed, 3 insertions, 55 deletions
diff --git a/src/mcompatoms_p.h b/src/mcompatoms_p.h index 480b000..18dd3cc 100644 --- a/src/mcompatoms_p.h +++ b/src/mcompatoms_p.h @@ -86,9 +86,8 @@ public: _NET_CLIENT_LIST_STACKING, WM_CHANGE_STATE, - // DUI-specific + // MEEGO(TOUCH)-specific _MEEGOTOUCH_DECORATOR_WINDOW, - _DUI_STATUSBAR_OVERLAY, _MEEGOTOUCH_GLOBAL_ALPHA, _MEEGOTOUCH_VIDEO_ALPHA, _MEEGO_STACKING_LAYER, @@ -124,7 +123,6 @@ public: static MCompAtoms *instance(); Type windowType(Window w); bool isDecorator(Window w); - bool statusBarOverlayed(Window w); int getPid(Window w); bool hasState(Window w, Atom a); QVector<Atom> getAtomArray(Window w, Atom array_atom); diff --git a/src/mcompositemanager.cpp b/src/mcompositemanager.cpp index 2a2d92a..a065ad7 100644 --- a/src/mcompositemanager.cpp +++ b/src/mcompositemanager.cpp @@ -80,8 +80,6 @@ Atom MCompAtoms::atoms[MCompAtoms::ATOMS_TOTAL]; Window MCompositeManagerPrivate::stack[TOTAL_LAYERS]; MCompAtoms *MCompAtoms::d = 0; -static bool hasDock = false; -static QRect availScreenRect = QRect(); static KeyCode switcher_key = 0; // temporary launch indicator. will get replaced later @@ -174,8 +172,6 @@ MCompAtoms::MCompAtoms() "WM_CHANGE_STATE", "_MEEGOTOUCH_DECORATOR_WINDOW", - // TODO: remove this when statusbar in-scene approach is done - "_DUI_STATUSBAR_OVERLAY", "_MEEGOTOUCH_GLOBAL_ALPHA", "_MEEGOTOUCH_VIDEO_ALPHA", "_MEEGO_STACKING_LAYER", @@ -255,12 +251,6 @@ bool MCompAtoms::isDecorator(Window w) return (cardValueProperty(w, atoms[_MEEGOTOUCH_DECORATOR_WINDOW]) == 1); } -// Remove this when statusbar in-scene approach is done -bool MCompAtoms::statusBarOverlayed(Window w) -{ - return (cardValueProperty(w, atoms[_DUI_STATUSBAR_OVERLAY]) == 1); -} - int MCompAtoms::getPid(Window w) { return cardValueProperty(w, atoms[_NET_WM_PID]); @@ -444,17 +434,6 @@ static void skiptaskbar_wm_state(int toggle, Window window) } } -static bool need_geometry_modify(Window window) -{ - MCompAtoms *atom = MCompAtoms::instance(); - - if (atom->hasState(window, ATOM(_NET_WM_STATE_FULLSCREEN)) || - (atom->statusBarOverlayed(window))) - return false; - - return true; -} - static void fullscreen_wm_state(MCompositeManagerPrivate *priv, int toggle, Window window, QVector<Atom> *net_wm_state = 0) @@ -490,10 +469,6 @@ static void fullscreen_wm_state(MCompositeManagerPrivate *priv, MDecoratorFrame::instance()->setManagedWindow(win); MDecoratorFrame::instance()->setOnlyStatusbar(false); MDecoratorFrame::instance()->raise(); - } else if (win && need_geometry_modify(window) && - !availScreenRect.isEmpty()) { - QRect r = availScreenRect; - XMoveResizeWindow(dpy, window, r.x(), r.y(), r.width(), r.height()); } if (win && win->propertyCache()->isMapped()) priv->dirtyStacking(false); @@ -1446,7 +1421,7 @@ void MCompositeManagerPrivate::configureRequestEvent(XConfigureRequestEvent *e) pc = prop_caches.value(e->window); // sandbox these windows. we own them - if ((pc && pc->isDecorator()) || atom->isDecorator(e->window)) + if ((pc && pc->isDecorator()) || (!pc && atom->isDecorator(e->window))) return; /*qDebug() << __func__ << "CONFIGURE REQUEST FOR:" << e->window @@ -1519,23 +1494,12 @@ void MCompositeManagerPrivate::mapRequestEvent(XMapRequestEvent *e) MCompAtoms::Type wtype = pc->windowType(); QRect a = pc->realGeometry(); - if (!hasDock) { - hasDock = (wtype == MCompAtoms::DOCK); - if (hasDock) - dock_region = QRegion(a.x(), a.y(), a.width(), a.height()); - } int xres = ScreenOfDisplay(dpy, DefaultScreen(dpy))->width; int yres = ScreenOfDisplay(dpy, DefaultScreen(dpy))->height; if (wtype == MCompAtoms::FRAMELESS || wtype == MCompAtoms::DESKTOP || wtype == MCompAtoms::INPUT) { - if (hasDock) { - QRect r = (QRegion(QApplication::desktop()->screenGeometry()) - dock_region).boundingRect(); - if (availScreenRect != r) - availScreenRect = r; - if (need_geometry_modify(e->window)) - XMoveResizeWindow(dpy, e->window, r.x(), r.y(), r.width(), r.height()); - } else if (a.width() != xres && a.height() != yres) { + if (a.width() != xres && a.height() != yres) { XResizeWindow(dpy, e->window, xres, yres); } } @@ -3630,9 +3594,6 @@ void MCompositeManager::dumpState(const char *heading) qDebug( "composition: %s", isCompositing() ? "on" : "off"); qDebug( "xoverlay: 0x%lx, %s", d->xoverlay, d->overlay_mapped ? "mapped" : "unmapped"); - qDebug( "avail screen: %dx%d%+d%+d", - availScreenRect.width(), availScreenRect.height(), - availScreenRect.x(), availScreenRect.y()); qDebug( "current_app: 0x%lx", d->current_app); qDebug( "topmostApp: 0x%lx (index: %d)", @@ -3658,16 +3619,6 @@ void MCompositeManager::dumpState(const char *heading) d->close_button_win, r->width(), r->height(), r->x(), r->y()); - line = "dock_region: "; - if (!d->dock_region.isEmpty()) { - foreach (const QRect &rect, d->dock_region.rects()) - line += QString().sprintf(" %dx%d%+d%+d", - rect.width(), rect.height(), - rect.x(), rect.y()); - } else - line += " <Empty>"; - qDebug() << line.toLatin1().constData(); - // Stacking qDebug( "stacking_timer: %s", d->stacking_timer.isActive() ? "active" : "idle"); diff --git a/src/mcompositemanager_p.h b/src/mcompositemanager_p.h index 6a27174..d8e2ad6 100644 --- a/src/mcompositemanager_p.h +++ b/src/mcompositemanager_p.h @@ -150,7 +150,6 @@ public: QHash<Window, QList<XConfigureRequestEvent*> > configure_reqs; QHash<Window, MWindowPropertyCache*> prop_caches; QMultiHash<int, MCompositeManagerExtension* > m_extensions; - QRegion dock_region; int damage_event; int damage_error; |