Bug 317760 - Maximized windows not always restored to their original size
Summary: Maximized windows not always restored to their original size
Status: RESOLVED DUPLICATE of bug 296171
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 4.10.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-03 05:03 UTC by Jared B.
Modified: 2013-04-03 08:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
kwin1.png (61.61 KB, image/jpeg)
2013-04-03 05:04 UTC, Jared B.
Details
kwin2.png (17.92 KB, image/jpeg)
2013-04-03 05:05 UTC, Jared B.
Details
kwin3.png (65.59 KB, image/jpeg)
2013-04-03 05:06 UTC, Jared B.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jared B. 2013-04-03 05:03:06 UTC
I'm not sure how to easily explain what's happening without providing an example, so I'll start with that.  Note:  I have a dual-monitor setup - all screenshots below are only showing one monitor (with the affected application) just to reduce the image sizes.

I have konsole configured to open vertically maximized, as shown:
<a href="http://www.legroom.net/public/kwin1.jpg"><img src="http://www.legroom.net/public/kwin1s.jpg" width="200" height="150"/></a>

I do this by configuring Special Windows Settings for konsole and setting these options:
Position - Apply Initially - 1600,0
Size - Apply Initially - 663,1200

Next, I maximize konsole:
<a href="http://www.legroom.net/public/kwin2.jpg"><img src="http://www.legroom.net/public/kwin2s.jpg" width="200" height="150"/></a>

Then, when I restore the window size, it changes the height, like this:
<a href="http://www.legroom.net/public/kwin13jpg"><img src="http://www.legroom.net/public/kwin3s.jpg" width="200" height="150"/></a>

That's the bug I'm reporting.  Just to finish detailing the problem, though, I must manually drag the bottom window border to the bottom of the screen to have it take up the full height again, so it looks like it did when I initially logged in.

If I maximize and restore it now, it works as expected - the window size is restored to it's full screen height.  But, if I close konsole and reopen it (which will again reset it to that same initial position), maximizing and restoring the window will result in the broken behavior initially described.

This behavior began occurring in KDE 4.9.  I'm using konsole as an example here, but it will occur with any application.  Eg., if I configure dolphin to start similarly sized but aligned against the right edge of the screen, when I maximize and restore it the windows size will be similarly wrong.

As mentioned above I"m using a dual-monitor setup.  All of the examples above were done on my secondary monitor, but I get the same behavior on my primary.  I'm not sure if this is confined to a multi-monitor configuration or not.  This issue does occur on both my home and work systems, but both have dual monitors.  I don't have access to another system at the moment to test.

Obviously, desired behavior here would be for the window to always be restored back to it's original size.  Having the size changed for no apparent reason like that is rather frustrating.

Reproducible: Always
Comment 1 Jared B. 2013-04-03 05:04:52 UTC
Created attachment 78589 [details]
kwin1.png

Just learned that bugzilla doesn't support HTML.  :-)  Attaching screenshots for reference.  They're numbered in the order they're described.
Comment 2 Jared B. 2013-04-03 05:05:20 UTC
Created attachment 78590 [details]
kwin2.png
Comment 3 Jared B. 2013-04-03 05:06:00 UTC
Created attachment 78591 [details]
kwin3.png
Comment 4 Thomas Lübking 2013-04-03 08:31:39 UTC
The core issue is that the initial size makes the window being considered vertically maximized (kludge around KMainWindow defect, cannot be fixed before KF5)

"Restore" withdraws maximization state of either dimension (that's expected, see other bug referenced in the dupe. Esp. that button does not somehow provide an undo list) and thus restores to the completely unmaximized state.

If you just want to withdraw the horizontal maximization, use the action configured for that (rmb by default)

*** This bug has been marked as a duplicate of bug 296171 ***