Bug 279051 - Maximize button behaves incorrectly after moving a maximized window to a different display
Summary: Maximize button behaves incorrectly after moving a maximized window to a diff...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 15:27 UTC by Ivan D Vasin
Modified: 2011-08-23 21:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
X.org server configuration (1.02 KB, text/plain)
2011-08-01 15:27 UTC, Ivan D Vasin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan D Vasin 2011-08-01 15:27:47 UTC
Created attachment 62426 [details]
X.org server configuration

Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

this is with KWin 4.7.0 (the last version listed in the dropdown is 4.3.2.  bug #268674, anyone?).

i use multiple display extensively at work, and i never noticed anything like this before upgrading to KDE 4.7.  so i'm pretty sure this is a regression.

Reproducible: Always

Steps to Reproduce:
1. launch any GUI application and wait for its window to open.
2. middle-click the window's Maximize button.
3. move the window to a different display, to a different position on that display than the position it had on the previous display.
4. middle-click the window's Maximize button.

Actual Results:  
* the window stays on the latter display.
* the window is un-maximized.
* the window is moved to the vertical position (relative to the display's origin) it had on the previous display.
* the window is moved to the horizontal position (relative to the display's origin) it had on the previous display.

Expected Results:  
* the window stays on the latter display.
* the window is un-maximized.
* the window is moved to the vertical position (relative to the display's origin) it had on the previous display.
* the window's horizontal position is unchanged.

OS: Linux (x86_64) release 3.0.0-7-generic
Compiler: gcc
Comment 1 Ivan D Vasin 2011-08-09 17:26:33 UTC
i should modify the expected results:
* the window stays on the latter display.
* if the window is still maximized on the second display, then it becomes un-maximized, and vice versa.
* if the window becomes un-maximized, then it is moved to the vertical position (relative to the display's origin) it had on the previous display.
* the window's horizontal position is unchanged.

in other words, middle-clicking the Maximize button should always toggle the window's vertical maximized state, regardless of which display it is on or on which display it was originally maximized.

currently, if the original display is shorter than the latter display, then the window is no longer maximized after being moved, but middle-clicking Maximize does not maximize it.  instead, its height is restored to the original height before being maximized on the original display.
Comment 2 Thomas Lübking 2011-08-15 20:23:58 UTC
Related to bug #279529 - not catched by the fix, but same source ("windows are maximized in either direction because they are tagged that way and not because they randomly hit screen corners"

I'll cook up a review request dealing with partial max states.
Comment 3 Thomas Lübking 2011-08-23 21:02:24 UTC
Git commit ea91e9dea63cf58fcf0d45d7e2f4783d0b70b8bb by Thomas Lübking.
Committed on 23/08/2011 at 22:51.
Pushed by luebking into branch 'KDE/4.7'.

check workspace position after screen change of any max'd client

also only unset max'd state when resizing, but not when moving a max'd client
BUG: 279051
CCBUG: 279529
REVIEW: 102414

M  +1    -1    kwin/client.h
M  +11   -5    kwin/geometry.cpp

http://commits.kde.org/kde-workspace/ea91e9dea63cf58fcf0d45d7e2f4783d0b70b8bb
Comment 4 Thomas Lübking 2011-08-23 21:45:59 UTC
Git commit 7142d5557d252f21ec739352708520e4d9fe64d4 by Thomas Lübking.
Committed on 23/08/2011 at 22:51.
Pushed by luebking into branch 'master'.

check workspace position after screen change of any max'd client

also only unset max'd state when resizing, but not when moving a max'd client
BUG: 279051
CCBUG: 279529
REVIEW: 102414
(cherry picked from commit ea91e9dea63cf58fcf0d45d7e2f4783d0b70b8bb)

Conflicts:

	kwin/geometry.cpp

M  +1    -1    kwin/client.h
M  +11   -5    kwin/geometry.cpp

http://commits.kde.org/kde-workspace/7142d5557d252f21ec739352708520e4d9fe64d4