D16710: [wayland] Fix window sizing when restoring a window that was initially fullscreen
Sebastian Krzyszkowiak <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
dos added a comment.
In D16710#416696 <https://phabricator.kde.org/D16710#416696>, @zzag wrote:
> Well, you could get coordinates of the top-left corner of the placement area for the client, though I personally think it would be better to place the client. If I recall correctly, we do something like that on X11 when maximize restore geometry is not valid.
Something like this?
diff --git a/shell_client.cpp b/shell_client.cpp
index 66956aed3..5e314ef22 100644
--- a/shell_client.cpp
+++ b/shell_client.cpp
@@ -986,6 +986,8 @@ void ShellClient::setFullScreen(bool set, bool user)
// this can happen when the window was first shown already fullscreen,
// so let the client set the size by itself
setGeometry(QRect(QPoint(0, 0), QSize(0, 0)));
+ QRect area = workspace()->clientArea(PlacementArea, this);
+ placeIn(area);
}
}
updateWindowRules(Rules::Fullscreen|Rules::Position|Rules::Size);
Those two (0,0)s above feel hacky, should I set the position to the placement area corner regardless of placing the window afterwards? Or is there a better way to send configure request with (0,0) size to the client?
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D16710
To: dos, #kwin, davidedmundson
Cc: zzag, graesslin, davidedmundson, kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart