do not try to raise possible panel proxies
but drop screenedges below the supportWindow instead that's why it exists, that's deterministic, that's faster BUG: 314625 FIXED-IN: 4.10.1 REVIEW: 108867icc-effect-5.14.5
parent
c016589fcd
commit
199f14d578
|
@ -1027,7 +1027,7 @@ void EffectsHandlerImpl::destroyInputWindow(Window w)
|
|||
if (pos.second == w) {
|
||||
XUnmapWindow(display(), w);
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
Workspace::self()->screenEdge()->raisePanelProxies();
|
||||
Workspace::self()->stackScreenEdgesUnderOverrideRedirect();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
23
layers.cpp
23
layers.cpp
|
@ -140,6 +140,29 @@ void Workspace::updateStackingOrder(bool propagate_new_clients)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
/*!
|
||||
* Some fullscreen effects have to raise the screenedge on top of an input window, thus all windows
|
||||
* this function puts them back where they belong for regular use and is some cheap variant of
|
||||
* the regular propagateClients function in that it completely ignores managed clients and everything
|
||||
* else and also does not update the NETWM property.
|
||||
* Called from Effects::destroyInputWindow so far.
|
||||
*/
|
||||
void Workspace::stackScreenEdgesUnderOverrideRedirect()
|
||||
{
|
||||
QVector<Window> stack;
|
||||
stack << supportWindow->winId();
|
||||
QVector<Window> edges(m_screenEdge.windows());
|
||||
stack.reserve(edges.count() + 1);
|
||||
for (QVector<Window>::const_iterator it = edges.constBegin(), end = edges.constEnd(); it != end; ++it) {
|
||||
if (*it != None) {
|
||||
stack << *it;
|
||||
}
|
||||
}
|
||||
XRestackWindows(display(), stack.data(), stack.count());
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Propagates the managed clients to the world.
|
||||
Called ONLY from updateStackingOrder().
|
||||
|
|
|
@ -398,55 +398,6 @@ void ScreenEdge::ensureOnTop()
|
|||
delete [] windows;
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTICE THIS IS A HACK
|
||||
* or at least a quite cumbersome way to handle conflictive electric borders
|
||||
* (like for autohiding panels or whatever)
|
||||
* the SANE solution is a central electric border daemon and a protocol
|
||||
* what this function does is to search for windows on the screen edges that are
|
||||
* * not our own screenedge
|
||||
* * either very slim
|
||||
* * or InputOnly
|
||||
* and raises them on top of everything else, including our own screen borders
|
||||
* this is typically (and for now ONLY) called when an effect input window is destroyed
|
||||
* (which raised our electric borders)
|
||||
*/
|
||||
|
||||
void ScreenEdge::raisePanelProxies()
|
||||
{
|
||||
XWindowAttributes attr;
|
||||
Window dummy;
|
||||
Window* windows = NULL;
|
||||
unsigned int count = 0;
|
||||
QRect screen = QRect(0, 0, displayWidth(), displayHeight());
|
||||
QVector<Window> proxies;
|
||||
XQueryTree(display(), rootWindow(), &dummy, &dummy, &windows, &count);
|
||||
for (unsigned int i = 0; i < count; ++i) {
|
||||
if (m_screenEdgeWindows.contains(windows[i]))
|
||||
continue;
|
||||
if (XGetWindowAttributes(display(), windows[i], &attr)) {
|
||||
if (attr.map_state == IsUnmapped) // a thousand Qt group leader dummies ...
|
||||
continue;
|
||||
const QRect geo(attr.x, attr.y, attr.width, attr.height);
|
||||
if (geo.width() < 1 || geo.height() < 1)
|
||||
continue;
|
||||
if (!(geo.width() > 1 || geo.height() > 1))
|
||||
continue; // random 1x1 dummy windows, all your corners are belong to us >-)
|
||||
if (attr.c_class != InputOnly && (geo.width() > 3 && geo.height() > 3))
|
||||
continue;
|
||||
if (geo.x() != screen.x() && geo.right() != screen.right() &&
|
||||
geo.y() != screen.y() && geo.bottom() != screen.bottom())
|
||||
continue;
|
||||
proxies << windows[i];
|
||||
}
|
||||
}
|
||||
if (!proxies.isEmpty()) {
|
||||
XRaiseWindow(display(), proxies.data()[ 0 ]);
|
||||
XRestackWindows(display(), proxies.data(), proxies.count());
|
||||
}
|
||||
if (windows)
|
||||
XFree(windows);
|
||||
}
|
||||
|
||||
const QVector< Window >& ScreenEdge::windows()
|
||||
{
|
||||
|
|
|
@ -91,11 +91,6 @@ public:
|
|||
* to do this if an effect input window is active.
|
||||
*/
|
||||
void ensureOnTop();
|
||||
/**
|
||||
* Raise FOREIGN border windows to the real top of the screen. We usually need
|
||||
* to do this after an effect input window was active.
|
||||
*/
|
||||
void raisePanelProxies();
|
||||
/**
|
||||
* Called when the user entered an electric border with the mouse.
|
||||
* It may switch to another virtual desktop.
|
||||
|
|
|
@ -207,6 +207,7 @@ public:
|
|||
Outline* outline();
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
ScreenEdge* screenEdge();
|
||||
void stackScreenEdgesUnderOverrideRedirect();
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue