Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5f2e0b72 authored by David Edmundson's avatar David Edmundson

[wayland] WlShell cache the pre-maximised geometry before going fullscreen

Summary:
In shell surface, maximise mode and fullscreen are exclusive
fullscreen->toplevel should restore the state we had before maximising

Test Plan: testMaximisedToFullscreen unit test

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16921
parent 2e42f4c1
......@@ -944,10 +944,17 @@ void ShellClient::setFullScreen(bool set, bool user)
set = rules()->checkFullScreen(set && !isSpecialWindow());
setShade(ShadeNone);
bool was_fs = isFullScreen();
if (was_fs)
if (was_fs) {
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event
else
m_geomFsRestore = geometry();
} else {
// in shell surface, maximise mode and fullscreen are exclusive
// fullscreen->toplevel should restore the state we had before maximising
if (m_shellSurface && m_maximizeMode == MaximizeMode::MaximizeFull) {
m_geomFsRestore = m_geomMaximizeRestore;
} else {
m_geomFsRestore = geometry();
}
}
m_fullScreen = set;
if (was_fs == isFullScreen())
return;
......
Markdown is supported
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