[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kwin] /: allow FS mapping of geometry restricted windows
From:       Martin_Gräßlin <mgraesslin () kde ! org>
Date:       2014-07-10 11:42:43
Message-ID: E1X5CkN-0003Da-NG () scm ! kde ! org
[Download RAW message or body]

Git commit 75a298a4fbea8ec8dccd2e78aaa5ecc6f830846f by Martin Gräßlin, on behalf of Thomas Lübking.
Committed on 05/06/2014 at 18:23.
Pushed by graesslin into branch 'master'.

allow FS mapping of geometry restricted windows

and copy isSpecialWindow() check as rulebook input
to setFullscreen()

Client::isFullScreenable() checks:
* fullscreen rule
* fullscreen_hack (-> for normal windows)
* geometry restrictions
* special window

Client::manage() for fullscreeining checks:
* fullscreen rule (with correct "initial" parameter)
* fullscreen_hack

-> this breaks the fullscreen rule for geometry restricted windows
and causes inconsistent behavior between client requests at runtime
(which do not test ::isFullScreenable()) and on mapping.

Otoh, the specialWindow() protection should apply generally - those
kind of windows should not be fullscreened since the user can not
exit this state via kwin for them - and there's hardly a good reason
for them to be fullscreen, esp. not to enter that state at runtime

REVIEW: 118442
CCBUG: 335617

Cherry-picked from kde-workspace
43229afee9fac4303e3d280ea63f96f034b3ffb5

M  +1    -1    geometry.cpp
M  +1    -1    manage.cpp

http://commits.kde.org/kwin/75a298a4fbea8ec8dccd2e78aaa5ecc6f830846f

diff --git a/geometry.cpp b/geometry.cpp
index 35bbe51..8e7e59d 100644
--- a/geometry.cpp
+++ b/geometry.cpp
@@ -2390,7 +2390,7 @@ void Client::setFullScreen(bool set, bool user)
         return;
     if (user && !userCanSetFullScreen())
         return;
-    set = rules()->checkFullScreen(set);
+    set = rules()->checkFullScreen(set && !isSpecialWindow());
     setShade(ShadeNone);
     bool was_fs = isFullScreen();
     if (was_fs)
diff --git a/manage.cpp b/manage.cpp
index 892685f..b8c1454 100644
--- a/manage.cpp
+++ b/manage.cpp
@@ -527,7 +527,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
             demandAttention();
         if (info->state() & NET::Modal)
             setModal(true);
-        if (fullscreen_mode != FullScreenHack && isFullScreenable())
+        if (fullscreen_mode != FullScreenHack)
             setFullScreen(rules()->checkFullScreen(info->state() & NET::FullScreen, !isMapped), false);
     }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic