[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-17 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

Martin Flöser  changed:

   What|Removed |Added

  Latest Commit||https://commits.kde.org/kwi
   ||n/139b4dc82a9423e42285a469a
   ||b7f7cc4139d7054
 Status|REOPENED|RESOLVED
   Version Fixed In||5.10.4
 Resolution|--- |FIXED

--- Comment #11 from Martin Flöser  ---
Git commit 139b4dc82a9423e42285a469ab7f7cc4139d7054 by Martin Flöser.
Committed on 17/07/2017 at 14:51.
Pushed by graesslin into branch 'Plasma/5.10'.

Properly swap the quick tile side when pressing the shortcut again

Summary:
The quick tile shortcuts have a feature of moving the window to the next
screen if one presses the same shortcut again.
E.g. if a window is quick tiled to the left on the right most screen,
quick tile again to left should move it to the left screen and quick tile
right. Thus it swaps the borders.

This wasn't handled correctly, especially not for modes like top and
bottom. If a window is quick tiled to the top an impossible mode was
generated: Left | Right. Doesn't make sense.

This change fixes the mode swapping and extends our quick tile testing
to cover the situation.
FIXED-IN: 5.10.4

Test Plan: Extended test case

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6708

M  +32   -18   autotests/integration/quick_tiling_test.cpp
M  +3-1geometry.cpp

https://commits.kde.org/kwin/139b4dc82a9423e42285a469ab7f7cc4139d7054

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-16 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

--- Comment #10 from Martin Flöser  ---
No, what I fixed is differently. When going from top to top, the top was
removed and replaced by right and left, which doesn't make sense because a
window cannot be right and left at the same time. This is the maximized you
experienced.

I fixed the code to keep it at top, but still move to the next screen. It's a
bug fix, I tried to make it not invasive. The more proper solution would be to
add the vertical support as you suggest, but that would be a new feature.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-15 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=382313

--- Comment #9 from [email protected] ---
The code you quoted is only supposed move a left-tiled window to the monitor to
the left if called with a QuickTileLeft action. Similarly for right, but not
top or bottom hence line 3366 ("continue; // not in horizontal line"). This
could be extended to support vertical monitor setups (one atop of another) but
that's not what I have and that's not what the code is currently supposed to do
as far as I can tell. It should only move to another screen if there's a screen
in the direction of the quicktile action, at least that's what I can glean from
the code but more importantly that would be the most sensible behavior. I
haven't tested your patch; perhaps what I mentioned is what you fixed.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-15 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

Martin Flöser  changed:

   What|Removed |Added

URL||https://phabricator.kde.org
   ||/D6708
  Component|general |core
  Flags||Wayland+, X11+

--- Comment #8 from Martin Flöser  ---
Patch at: https://phabricator.kde.org/D6708

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-14 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

--- Comment #7 from Martin Flöser  ---
For top and bottom the expected behavior should have been just moving it to the
other screen and keeping the state. This had a bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-14 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

Martin Flöser  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---
 Ever confirmed|0   |1

--- Comment #6 from Martin Flöser  ---
I just started to add a unit test for the behavior (as that was not yet
covered) and there is something fishy.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-14 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

Martin Flöser  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Martin Flöser  ---
I'm sorry, but what you consider a bug is the expected behavior. I just checked
the code and found the following comment:

// If trying to tile to the side that the window is already tiled to
move the window to the next
// screen if it exists, otherwise toggle the mode (set QuickTileNone)

see https://cgit.kde.org/kwin.git/tree/geometry.cpp?h=Plasma%2F5.10#n3351

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-14 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

--- Comment #4 from Martin Flöser  ---
Oh the global shortcut. I thought you meant quick tile when moving the window

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-13 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=382313

--- Comment #3 from [email protected] ---
Created attachment 106601
  --> https://bugs.kde.org/attachment.cgi?id=106601&action=edit
quick tile bottom

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-13 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=382313

--- Comment #2 from Martin Flöser  ---
We don't have a quick tile to bottom

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 382313] Quick Tile to the Top twice moves window to another screen

2017-07-13 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=382313

--- Comment #1 from [email protected] ---
Furthermore, quick tiling to the bottom three times (from maximized window)
also produces this behavior. In my opinion, doing 'Quick Tile to the Bottom' on
a window that covers the bottom half of the screen should certainly should
maximize the window; if anything it should minimize it or do nothing.

-- 
You are receiving this mail because:
You are watching all bug changes.