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 includes adaption to new screenedge and xcb invocation (compared to 4.10) BUG: 314625 FIXED-IN: 4.10.1 REVIEW: 108867
This commit is contained in:
parent
b71d686a19
commit
004bdee7a2
5 changed files with 19 additions and 70 deletions
|
@ -1187,7 +1187,7 @@ void EffectsHandlerImpl::destroyInputWindow(xcb_window_t w)
|
|||
if (pos.second == w) {
|
||||
xcb_unmap_window(connection(), w);
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
ScreenEdges::self()->raisePanelProxies();
|
||||
Workspace::self()->stackScreenEdgesUnderOverrideRedirect();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
14
layers.cpp
14
layers.cpp
|
@ -144,6 +144,20 @@ 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()
|
||||
{
|
||||
Xcb::restackWindows(QVector<xcb_window_t>() << supportWindow->winId() << ScreenEdges::self()->windows());
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Propagates the managed clients to the world.
|
||||
Called ONLY from updateStackingOrder().
|
||||
|
|
|
@ -1063,70 +1063,6 @@ void ScreenEdges::performMousePoll()
|
|||
emit mousePollingTimerEvent(Workspace::self()->cursorPos());
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 ScreenEdges::raisePanelProxies()
|
||||
{
|
||||
QVector<Xcb::WindowId> ownWindows = windows();
|
||||
Xcb::Tree tree(rootWindow());
|
||||
QVector<Xcb::WindowAttributes> attributes(tree->children_len);
|
||||
QVector<Xcb::WindowGeometry> geometries(tree->children_len);
|
||||
|
||||
Xcb::WindowId *windows = tree.children();
|
||||
QRect screen = QRect(0, 0, displayWidth(), displayHeight());
|
||||
QVector<Xcb::WindowId> proxies;
|
||||
|
||||
int count = 0;
|
||||
for (unsigned int i = 0; i < tree->children_len; ++i) {
|
||||
if (ownWindows.contains(windows[i])) {
|
||||
// one of our screen edges
|
||||
continue;
|
||||
}
|
||||
attributes[count] = Xcb::WindowAttributes(windows[i]);
|
||||
geometries[count] = Xcb::WindowGeometry(windows[i]);
|
||||
count++;
|
||||
}
|
||||
|
||||
for (int i=0; i<count; ++i) {
|
||||
Xcb::WindowAttributes attr(attributes.at(i));
|
||||
if (attr.isNull() || attr->map_state == XCB_MAP_STATE_UNMAPPED) {
|
||||
continue;
|
||||
}
|
||||
Xcb::WindowGeometry geometry(geometries.at(i));
|
||||
if (geometry.isNull()) {
|
||||
continue;
|
||||
}
|
||||
const QRect geo(geometry.rect());
|
||||
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->_class != XCB_WINDOW_CLASS_INPUT_ONLY && (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 << attr.window();
|
||||
}
|
||||
Xcb::restackWindowsWithRaise(proxies);
|
||||
}
|
||||
|
||||
QVector< xcb_window_t > ScreenEdges::windows() const
|
||||
{
|
||||
QVector<xcb_window_t> wins;
|
||||
|
|
|
@ -249,11 +249,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.
|
||||
|
|
|
@ -199,6 +199,10 @@ public:
|
|||
|
||||
Outline* outline();
|
||||
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
void stackScreenEdgesUnderOverrideRedirect();
|
||||
#endif
|
||||
|
||||
public:
|
||||
QPoint cascadeOffset(const Client *c) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue