Bug 348640 - resizing an edge of a quick-tiled window often changes other edges too
Summary: resizing an edge of a quick-tiled window often changes other edges too
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.3.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/123...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-03 15:30 UTC by Flupp
Modified: 2015-07-17 08:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
thomas.luebking: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flupp 2015-06-03 15:30:25 UTC
When a window is quick tiled, dragging an edge for resizing does not only change the position of this edge, but also of other edges.

Especially in a two-screen setup, unpredictable things may happen (cf. video).

I do the following in the video (please excuse the missing mouse pointer):
1. quick tiling at upper right corner of left screen, dragging left edge
2. quick tiling at right edge of left screen, dragging left edge
3. quick tiling at upper right corner of left screen, dragging lower edge
4. quick tiling at lower right corner of left screen, dragging upper edge

Reproducible: Always

Steps to Reproduce:
1. open a window
2. quick tile the window
3. resize the window by dragging an edge

Actual Results:  
Other edges might jump to another position.

Expected Results:  
Every edge except the dragged one stay in place.

I am using Arch Linux. My screen setup ks the following:

% xrandr
Screen 0: minimum 8 x 8, current 2944 x 1280, maximum 32767 x 32767
…
HDMI2 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.60*+
…
HDMI3 connected 1024x1280+1920+0 left (normal left inverted right x axis y axis) 359mm x 287mm
   1280x1024     60.02*+
…
Comment 1 Thomas Lübking 2015-06-03 15:52:34 UTC
It' s the deco/updateborders/checkWorkspacePosition dance

diff --git a/geometry.cpp b/geometry.cpp
index ea7b587..7617102 100644
--- a/geometry.cpp
+++ b/geometry.cpp
@@ -2581,6 +2581,7 @@ bool Client::startMoveResize()
     if (quick_tile_mode != QuickTileNone && mode != PositionCenter) { // Cannot use isResize() yet
         // Exit quick tile mode when the user attempts to resize a tiled window
         quick_tile_mode = QuickTileNone; // Do so without restoring original geometry
+        geom_restore = geometry();
         emit quickTileModeChanged();
     }


I'll add the patch to the series in https://git.reviewboard.kde.org/r/123882/
Comment 2 Thomas Lübking 2015-06-10 07:46:33 UTC
Git commit e830f08defc3c38ec79542faeacbc5aea2cb2327 by Thomas Lübking.
Committed on 10/06/2015 at 06:50.
Pushed by luebking into branch 'master'.

update geom_restore when silently breaking QT mode

the next checkWorkspacePosition (now triggered by
deco border update) would falsely restore the
pre-tiling geometry
REVIEW: 123882

M  +1    -0    geometry.cpp

http://commits.kde.org/kwin/e830f08defc3c38ec79542faeacbc5aea2cb2327
Comment 3 jos poortvliet 2015-07-13 08:00:22 UTC
@thomas did/will this also make it to 5.3.2/5.3.3 or is it a 5.4 thing?
Comment 4 Thomas Lübking 2015-07-13 15:13:48 UTC
5.4 only, this stuff (and notably shading) was massively broken throughout at least all 5.x, so (and since the patch is pretty invasive) I deemed it master (now becoming 5.4) only.

Should be safe to backport, though.
Comment 5 jos poortvliet 2015-07-13 20:34:43 UTC
I care because of the sticky resizing script - see https://github.com/Flupp/sticky-window-snapping/issues/1#issuecomment-121047112 ;-)

This patch makes things work better but still a tad unpredictable, see my description. Might be that this'll be fixed in 5.4, I hope - if not, well, I guess I'll file a bug...

As usual, Thomas, thanks, great work!
Comment 6 jos poortvliet 2015-07-17 08:12:21 UTC
After some more testing it seems that the patch solves the bug completely - the fault was on my side (need to log out and log in again for it to really work).

Thanks a bunch, again! This was the one thing holding me from upgrading to Plasma 5 at the office, so 5.4 will be the release that I have moved over all my systems :D