Commit 68f58076 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

Fix sendToScreen for fullscreen apps

screen() only gets updated after AbstractClient::sendToScreen if invoked
by a shortcut or menu (as opposed to moveresize), so we can't use it in
AbstractClient::updateGeometryRestoresForFullscreen as it points to the
old screen.
parent a461ff91
......@@ -1004,7 +1004,7 @@ void AbstractClient::finishMoveResize(bool cancel)
checkScreen(); // needs to be done because clientFinishUserMovedResized has not yet re-activated online alignment
if (screen() != moveResizeStartScreen()) {
if (isFullScreen() || isElectricBorderMaximizing()) {
updateGeometryRestoresForFullscreen();
updateGeometryRestoresForFullscreen(screen());
}
workspace()->sendClientToScreen(this, screen()); // checks rule validity
if (maximizeMode() != MaximizeRestore) {
......@@ -3268,7 +3268,7 @@ void AbstractClient::sendToScreen(int newScreen)
}
if (isFullScreen()) {
updateGeometryRestoresForFullscreen();
updateGeometryRestoresForFullscreen(newScreen);
checkWorkspacePosition(oldGeom);
} else {
// align geom_restore - checkWorkspacePosition operates on it
......@@ -3292,9 +3292,9 @@ void AbstractClient::sendToScreen(int newScreen)
(*it)->sendToScreen(newScreen);
}
void AbstractClient::updateGeometryRestoresForFullscreen()
void AbstractClient::updateGeometryRestoresForFullscreen(int screen)
{
QRect screenArea = workspace()->clientArea(MaximizeArea, screen(), desktop());
QRect screenArea = workspace()->clientArea(MaximizeArea, screen, desktop());
QRect newFullScreenGeometryRestore = screenArea;
if (!(maximizeMode() & MaximizeVertical)) {
newFullScreenGeometryRestore.setHeight(geometryRestore().height());
......
......@@ -453,7 +453,7 @@ public:
*/
bool isSpecialWindow() const;
void sendToScreen(int screen);
void updateGeometryRestoresForFullscreen();
void updateGeometryRestoresForFullscreen(int screen);
const QKeySequence &shortcut() const {
return _shortcut;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment