Bug 345423 - (Vertically) maximized windows cannot be QuickTiled (to a corner)
Summary: (Vertically) maximized windows cannot be QuickTiled (to a corner)
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.2.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/123...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-22 14:00 UTC by Yichao Yu
Modified: 2015-04-07 22:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.3
thomas.luebking: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yichao Yu 2015-03-22 14:00:43 UTC
With the kf5 version of kwin_x11, the quick tiling to corners sometimes. AFAICT, it happens if:
1. The window is tiled to one side when it was created (which can be done by tiling the window to one side and reopen it since either the program or kwin remembers the window size) AND
2. It has not been resized (including maximizing) after being created


Reproducible: Always
Comment 1 Yichao Yu 2015-03-22 14:05:00 UTC
Oh sorry. By "not working" I mean it tiles to one side rather than tiles to the corner. The preview (shadow) is correct though.
Comment 2 Thomas Lübking 2015-03-22 14:29:54 UTC
Windows are _not_ restored in a quicktiled with a restarting process (the state isn't exported and clients are rather not aware of the concept)

A window that was QT to an edge (not corner) will likely be vertically maximized (by kwin, hack that needs to stay at least as there're KMainWindow's from SC4 around)

The problem is that the window is not unmaximized before attempting to QT it, resp. honors the vertical maximization geometry - that's a regression compared to SC4
Comment 3 Yichao Yu 2015-03-22 14:41:02 UTC
Actually vertically maximized window can be QT'ed to corner. Just that they can't if they started in such a state.
Comment 4 Thomas Lübking 2015-03-22 14:54:34 UTC
Maximize a window (any window at any time) vertically (middle click the  maximize button by default) and try to QT it.

Then apply

diff --git a/geometry.cpp b/geometry.cpp
index 0d4c82d..acd0bf7 100644
--- a/geometry.cpp
+++ b/geometry.cpp
@@ -3133,7 +3133,7 @@ void Client::setQuickTileMode(QuickTileMode mode, bool keyboard)
     setElectricBorderMode(mode); // used by ::electricBorderMaximizeGeometry(.)
 
     // restore from maximized so that it is possible to tile maximized windows with one hit or by dragging
-    if (maximizeMode() == MaximizeFull) {
+    if (maximizeMode() != MaximizeRestore) {
 
         TabSynchronizer syncer(this, TabGroup::QuickTile|TabGroup::Geometry|TabGroup::Maximized);



and try again ;-)
Comment 5 Thomas Lübking 2015-04-07 22:30:39 UTC
Git commit 08b7b4818b97003ca25d2f5a3d90475ec9554e47 by Thomas Lübking.
Committed on 07/04/2015 at 21:59.
Pushed by luebking into branch 'master'.

unmaximize from partial to enter quick tiling
FIXED-IN: 5.3

M  +1    -1    geometry.cpp

http://commits.kde.org/kwin/08b7b4818b97003ca25d2f5a3d90475ec9554e47