Bug 324011 - insert a "Display borders on maximized windows" setting
Summary: insert a "Display borders on maximized windows" setting
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: win deco (show other bugs)
Version: 4.11.0
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
: 330502 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-25 12:16 UTC by Vito De Tullio
Modified: 2015-06-17 18:42 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch (5.76 KB, patch)
2013-08-26 19:57 UTC, Hugo Pereira Da Costa
Details
patch to keep plastik borders on maximized windows (3.96 KB, patch)
2014-02-11 02:06 UTC, Thomas Lübking
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vito De Tullio 2013-08-25 12:16:07 UTC
As per https://bugs.kde.org/show_bug.cgi?id=299245#c5 now kwin lost the setting to let the user resize a maximize window from the bottom right corner. By suggestion on the bug comments

"Make a demand to your favorite decoration to offer showing borders even on maximized windows."

so, here I am.

Reproducible: Always

Steps to Reproduce:
1. open a window
2. go fullscreen
3. put the mouse in a corner or at the edge
4. hold the mouse button and drag
Actual Results:  
The window borders disappear

Expected Results:  
The borders are shown
the maximized window un-maximize and resize according to the mouse position
Comment 1 Thomas Lübking 2013-08-25 12:33:13 UTC
(In reply to comment #1)
> As per https://bugs.kde.org/show_bug.cgi?id=299245#c5 now kwin lost the
> setting to let the user resize a maximize window from the bottom right
> corner.

To clarify this:
the window is still resizable and there's nothing that would somehow prevent oxygen's resize corner or so.

We just removed the setting that controlled whether a maximized window could be moved and "lie" to decorations (since hiding the borders -as interpreted by many decorations- seemed far more reasonable than showing them)

Reason is that the moveResizeMaximized setting (originally in order to prevent accidental moves) caused reports
- ppl. who wanted no decoration, but still move the window
- ppl. complaining that aero snap would work on dragging away the window (when moveResizeMaximized was true)
- ppl. complaining the (relabeled) setting would not work (turning out their deco just does not interpret it this way)
- ... (yes, many more)

-> Clean up was required.
Maximized windows are now movable/resizable, accidental movement is still prevented, decos should please announce and configure their behavior on maximization (if such feature is supported) themselves.
Comment 2 Hugo Pereira Da Costa 2013-08-26 16:47:55 UTC
1/ Not sur I understand the bug properly
2/ tested the following:
- in
Comment 3 Hugo Pereira Da Costa 2013-08-26 16:51:32 UTC
aah crap.
Ok. Trying again:

- in workspace behavior, if I uncheck "Maximize window by dragging ..."
when I maximize a window, and drag it from title bar, the window is moved, but the window border is still not visible, and you end up with a middle of the sceen window which has no border, see: http://wstaw.org/m/2013/08/26/plasma-desktopAQ6351.png

@Vito: is this what you are complaining about ? 
@Thomas: is this the intended behavior ? A different bug ? Something that should be fixed in oxygen ? In kwin ? 
(I'm running kwin from trunk)
Comment 4 Thomas Lübking 2013-08-26 16:54:39 UTC
He wants an option to have borders on maximized windows - something that explicitly replaces "options()->moveResizeMaximizedWindows()" (which now always return false despite actually being more or less true - don't ask. The setting got removed and the assumption was that ppl. will want to have borderless maximized windows - even though they're now movable)

Since oxygen basically supports borderless maximized windows, and if you consider borders on maximized windows reasonable setting, just add a checkbox ;-)
Comment 5 Thomas Lübking 2013-08-26 17:02:24 UTC
(In reply to comment #3)
> aah crap.
> Ok. Trying again:
> 
> - in workspace behavior, if I uncheck "Maximize window by dragging ..."
> when I maximize a window, and drag it from title bar, the window is moved,
> but the window border is still not visible, and you end up with a middle of

> @Thomas: is this the intended behavior?

Yes, the window is still maximized, just repositioned (you should have had to force the reposition against quite some snapping)
Either it will be (implicitly) unmaximized at some point (and gain back its border), or repositioned to the MaximizeArea or moved to another screen and maximized there.

Basically moveResizeMaximizedWindows() is now always enabled to not conflict with the snapping - before you would either not have been able to reposition the maximized window or had borders on the window.

It's really been a mess, therefore those changes to separate decoration behavior from movement behavior and resolve accidental movement prevention differently.

tl;dr
If you want borders on maximized windows configurable, you've to offer that setting (for oxygen) and not "abuse" the moveResizeMaximizedWindows() setting as hint on it (while that's been common, yes)
Comment 6 Hugo Pereira Da Costa 2013-08-26 19:57:06 UTC
Created attachment 81951 [details]
proposed patch

@Thomas
See patch attached (notably the section on oxygenclient.h)
Is this enough ? basically the isMaximized() is used later to decide the metrics and how to draw the decorations (with/without borders).

Or do I need to announce anything more to kwin itself ? (I'm not sure I read "decos should please announce and configure their behavior on maximization" properly from comment #1)

@Vito
Any chance you can test the patch before I push it (needs compilation of kde-workspace from master) ? is this what you are asking for ? (note: with the setting "on", I did test that you can resize a maximized window from the bottom right corner).

Also: there is a new string added to the config, so that it cannot make it into kde until kde-4.12
(if the patch is correct, I will push that to both master and frameworks).
Comment 7 Thomas Lübking 2013-08-26 20:07:14 UTC
(In reply to comment #6)
> Created attachment 81951 [details]
> proposed patch
> 
> @Thomas
> See patch attached (notably the section on oxygenclient.h)
> Is this enough?
Yes. There's more available now (you can ask for the "QuickTileMode quickTileMode()" when being asked for virtual void borders(int& left, int& right, int& top, int& bottom) and skip resp. borders) but otherwise functionally nothing changed.
Just the movability is no longer present as even slightest hint on whether to show a border or not)

The patch is correct as long as the *.ui stuff is ;-)

> Or do I need to announce anything more to kwin itself?
No. Pure deco inside feature - has always been =)

> "decos should please announce and configure their behavior on maximization"
Yes, sorry - i meant "towards the user", ie. you need a setting in your config dialog.

> the setting "on", I did test that you can resize a maximized window from the
> bottom right corner).

Isn't the resizecorner available anymore?
Comment 8 Vito De Tullio 2013-08-26 20:30:35 UTC
> @Vito
> Any chance you can test the patch before I push it 
> (needs compilation of kde-workspace from master) ? 
> is this what you are asking for ? 
> (note: with the setting "on", I did test that you can resize 
> a maximized window from the bottom right corner).

I need to download + compile master... not for this week, I think I could have the time next weekend.

But if it's for 4.12 I think we have the time :D
Comment 9 Hugo Pereira Da Costa 2013-08-26 20:32:58 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Created attachment 81951 [details]
> > proposed patch
> > 
> > @Thomas
> > See patch attached (notably the section on oxygenclient.h)
> > Is this enough?
> Yes. There's more available now (you can ask for the "QuickTileMode
> quickTileMode()" when being asked for virtual void borders(int& left, int&
> right, int& top, int& bottom) and skip resp. borders) but otherwise
> functionally nothing changed.
> Just the movability is no longer present as even slightest hint on whether
> to show a border or not)
> 
> The patch is correct as long as the *.ui stuff is ;-)
> 
> > Or do I need to announce anything more to kwin itself?
> No. Pure deco inside feature - has always been =)
> 
> > "decos should please announce and configure their behavior on maximization"
> Yes, sorry - i meant "towards the user", ie. you need a setting in your
> config dialog.
> 
Ok. All good then.

> > the setting "on", I did test that you can resize a maximized window from the
> > bottom right corner).
> 
> Isn't the resizecorner available anymore?

ahah. It is, but only for "windows with no border", that is: when you configure window border to be "no border", and then, it is disabled for maximized windows ... 
Ok. So then, I guess I "could" enable it for all maximized windows (when border is not displayed), and this, disregarding the "border width" settings. 
That is: pretty much the opposite of what we have now ... 
But then again: people would complain that they can't resize from the left side/right side/bottom side ... 
So I'm not sure it is worth it.
How does bespin deal with this ?
Comment 10 Thomas Lübking 2013-08-26 20:49:22 UTC
(In reply to comment #9)
> How does bespin deal with this ?
You can have the screen corner or not - it's then there all the time (but since the input frame is there, it's hardly required)

About dealing with the maximized/noborder change: not at all.
Had we slightly considered ppl. were actually interested in keeping the border (as actual resize/movability is still provided), the config ui had remained, the value been read and ultimately served to configure exactly this (with a warning for deco devs to get rid of it and the acceptance of occasional "does not work", ie. "deco doesn't actually do that" reports)

The ability to *not* have scrollbars etc. on the screen edge was simply regarded a no-feature (thus also snapping rather to the client and not the decoration)
Comment 11 Hugo Pereira Da Costa 2013-08-27 08:32:59 UTC
Git commit 1e21fe110f2d5dbe9d9f909faf18d75c4dd05080 by Hugo Pereira Da Costa.
Committed on 26/08/2013 at 19:47.
Pushed by hpereiradacosta into branch 'master'.

Added "Display window borders for maximized windows" option.

M  +4    -1    kwin/clients/oxygen/config/oxygenconfigwidget.cpp
M  +23   -16   kwin/clients/oxygen/config/ui/oxygenconfigurationui.ui
M  +1    -1    kwin/clients/oxygen/oxygenclient.h
M  +5    -0    kwin/clients/oxygen/oxygenconfigdata.kcfg

http://commits.kde.org/kde-workspace/1e21fe110f2d5dbe9d9f909faf18d75c4dd05080
Comment 12 Hugo Pereira Da Costa 2013-08-27 08:41:51 UTC
Git commit 8a0e134f6a2171856d163df66761922fdaad3557 by Hugo Pereira Da Costa.
Committed on 26/08/2013 at 19:47.
Pushed by hpereiradacosta into branch 'frameworks-scratch'.

Added "Display window borders for maximized windows" option.

M  +4    -1    kwin/clients/oxygen/config/oxygenconfigwidget.cpp
M  +23   -16   kwin/clients/oxygen/config/ui/oxygenconfigurationui.ui
M  +1    -1    kwin/clients/oxygen/oxygenclient.h
M  +5    -0    kwin/clients/oxygen/oxygenconfigdata.kcfg

http://commits.kde.org/kde-workspace/8a0e134f6a2171856d163df66761922fdaad3557
Comment 13 Hugo Pereira Da Costa 2013-09-03 15:20:54 UTC
so ... since I understood the problem right, and implemented a fix, 
I'm marking this bug as FIXED.
Feel free to reopen if I missed something.
Comment 14 Yarny 2013-12-29 12:50:46 UTC
Hi, I just found this bug (via Bug 299245) after I realized that the MoveResizeMaximizedWindows option is gone in kde 4.11.3 (using openSUSE 13.1).
My question: Does the fix of Huga Pereira Da Costa only affect the Oxygen decoration?  Background: My users are mainly using the Redmond decoration and I'm wondering if a separate bugreport is needed for each decoration.
Comment 15 Thomas Lübking 2013-12-29 13:04:57 UTC
any decoration that wishes to provide different borddrs depending on the window state will have to be patched, yes.
but the redmond decoration has been dropped years ago, you should not be using it at all.
Comment 16 Yarny 2013-12-29 16:03:39 UTC
> but the redmond decoration has been dropped years ago
Sad to hear this;  but thanks, so a bug report against this decoration would be in vain.
Is there a list of supported window decorations?  openSUSE delivers a lot and I don't want to post bug reports against unsupported ones.  (I searched kde-look.org, but I couldn't even find Oxygen there, so it's probably the wrong place).
Comment 17 Thomas Lübking 2013-12-29 16:38:31 UTC
oxygen
aurorae
--
laptop
b2

with the latter two on the edge for PW/2, ie. "notKDE5"

decos like
- bespin
- dekorator
- oxygen-transparent
- qtcurve
- skulpture
- smaragd

are maintained, but 3rd party.
Adding a conf key for the behavior to any deco of particular interest should be trivial (i think one or two of the legacy decos didn't invoke the moveResizeMaximizedWindows() hint, but apparently Redmond is not one of them)
Comment 18 Thomas Lübking 2014-01-28 13:25:48 UTC
*** Bug 330502 has been marked as a duplicate of this bug. ***
Comment 19 davidblunkett 2014-01-28 23:28:38 UTC
I'm unclear if this is fixed or not! 

It _appears_ from reading this that the problem is whether or not borders appear on maximised windows, a patch has been committed (6 months ago) but this doesn't seem to be live in my distro (kubuntu).

Does this patch return then resize max'd windows functionality prior to 4.11.3?
Is this patch accepted into 4.11.3?
Is it reasonable to expect this fix to filter through to the mainstream distros?
Comment 20 Thomas Lübking 2014-01-28 23:32:00 UTC
Patch is in master -> "KDE 5"

It will allow you to have borders on maximized windows *for the oxygen decoration* what has nothing to do with the ability to resize the window.
Comment 21 davidblunkett 2014-01-29 13:15:34 UTC
But presumably borders on max'd windows is what I require to restore the prebious functionality (resize with left mouse button as for any other window)?

Will this be back ported to 4.11.3 or will it be necessary to jump between 4.10 and 5.xx to avoid this problem?
Comment 22 Thomas Lübking 2014-01-29 17:34:57 UTC
kde-workspace of SC4 is feature frozen.
No new features nor user visible strings can be added.

Eg. dekorator always had a distinct setting for this and i'm at hand not sure about aurorae theme handling.
Other than that, you'll have to ask your distro for adding this (untranslated) patch downstream or patch and compile the oxygen deco yourself.
Comment 23 Vito De Tullio 2014-01-31 08:07:03 UTC
(In reply to comment #20)
> Patch is in master -> "KDE 5"
> 
> It will allow you to have borders on maximized windows *for the oxygen
> decoration* what has nothing to do with the ability to resize the window.

The ability to resize maximized windows is the reason of this bug, as stated in the first comment. AFAIK the only condition needed to allow this is to have borders. Is this sufficient?
Comment 24 Thomas Lübking 2014-01-31 13:17:28 UTC
i'm not sure whether i understood your question, but the window can be resized by
- alt+right mousebutton
- alt+f3 menu
- a shortcut (to the alt+f3 entry)
- on the titlebar (depending on the deco)

ie. the core does not prevent resizing.

fwwi, kwin can also operate w/o any decoration (titlebar/frame) and decorations provided a borderless mode before even there was additional support through blind input windows.

iow: the decoration has nothing to do with the ability to move/resize a window at all. it's just a very popular approach, implemented differently by different decorations.
Comment 25 davidblunkett 2014-01-31 14:49:41 UTC
I think we are after letting max'd windows be resized in the same way as non max'd windows - in my case left mouse-button drag of the borders - I know in a small number of cases this is not desirable (shirt sleeves dragging on mouse pads) but for everyone else this is a nice feature. On my pre 4.11 machine I must have used this 20 time already today and it is very annoying not to have it.
Comment 26 Jacob Brown 2014-02-10 16:41:25 UTC
I know this is marked as fixed because most people only care about re-sizing, but some people seriously want to see the window border.  It's been bugging me for the past few weeks that this option is gone.  Is there another issue open on the window border part of this?  And a related question:  Anyone happen to know what the package name is in Debian/Ubuntu so I can force my computer to downgrade that package?  Thanks!
Comment 27 Hugo Pereira Da Costa 2014-02-10 17:01:36 UTC
@Jacob
This is marked as fixed, because in KF5 there is an oxygen option to "show the window border on maximized window", and because it does exactly this: you get the window borders drawn, and you can resize from them. 
This has not been backported to KDE4 for reasons explained above (string freeze).
Comment 28 Thomas Lübking 2014-02-10 17:06:29 UTC
the last comments probably added some confusion.
you'd have to downgrade kwin, but that's probably not a good idea.
alternatively you could just compile a patched version of oxygen(-tansparent) or use a windo decoration that ignores the maximization state (bunch of aurorae themes should and dekorator has an explicit setting)
Comment 29 Hugo Pereira Da Costa 2014-02-10 17:12:24 UTC
well,
although one of the assignee for this bug, I am confused about what's confusing in my last comment. So maybe someone can explain it to me ...
Comment 30 Thomas Lübking 2014-02-10 17:18:07 UTC
not "the last comment" but "last comments", ie. the talk about resizing (before jacobs post)
Comment 31 Jacob Brown 2014-02-10 20:01:36 UTC
Oh I didn't realize this feature has been moved to Window Decorations themes.  I'm currently using Plastik for my Window Decorations theme (I can't stand Oxygen.)  Hope they fix it for Plastik sometime soon too....
Comment 32 Thomas Lübking 2014-02-11 02:06:34 UTC
Created attachment 85095 [details]
patch to keep plastik borders on maximized windows

The "feature" never existed, just a bunch of deco authors (*cough* including myself *cough*) "abused" a behavioral setting to implicitly change the border style (reasoned by that if you cannot resize the window anyway, there would be no point in showing borders)

Plastik would require a different bugreport.
Since it's however a QML decoration, you can patch it downstream (it's just a textfile)

-> See attached patch.
Applies to /usr/share/apps/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml
** warning: any update will naturally override the patch, but you could make a local copy in ~/.kde/share/apps/kwin
Comment 33 Jacob Brown 2014-02-11 18:44:40 UTC
Thank you so much Thomas!  After playing around with that main.qml file, I've gotten it so that it mostly looks how I like it.

  One thing I can't figure out:  When I have a window Maximized,  the window borders are no longer draggable (I cannot resize with mouse dragging the border).  I don't see a way to fix that in the main.qml file.  Is there another qml file somewhere I can change to fix this?
Comment 34 Thomas Lübking 2014-02-11 19:48:26 UTC
That would requirece changes to kde-workspace/kwin/clients/aurorae/src/aurorae.cpp - either ::isMaximized() or ::mousePosition()
(ie. also recompilation of the deco plugin would be required)
Comment 35 Bodo Eggert 2015-06-17 17:34:25 UTC
I've just upgraded to Debian Jessie (KDE4.14.2)  and there is no good way to resize a maximized window. By trying to drag, I just get a borderless, screen-sized, unresizable window, except if I go to (window menu) -> more actions -> resize, then I can resize the lower right edge.

Is this due to the old version / will downloading the latest KDE4 fix this regression?
Comment 36 Thomas Lübking 2015-06-17 17:37:56 UTC
Alt + RMB, oxygen deco setting should be available.
Comment 37 Bodo Eggert 2015-06-17 18:11:03 UTC
The alt, meta etc. modifiers first didn't seem to work, but maybe I had the wrong theme.

Now I get a classic-maximized-and-resizable window by Meta-RMB (I reassigned it from Alt).

I can't find a setting on oxygene (and I don't think this should be part of each decoration, ¢¢), but I guess it's OK for now. Thank you.
Comment 38 Hugo Pereira Da Costa 2015-06-17 18:15:40 UTC
http://wstaw.org/m/2015/06/17/plasma-desktopM18600.png
(I know the widget style I use is breeze, and so the window decoration, but the shown dialog really is *oxygen* decoration config)
Comment 39 Bodo Eggert 2015-06-17 18:42:32 UTC
That option is missing in Debian Jessie /  KDE4.14.2.

http://7eggert.selfhost.bz/tmp/kde4.14.2-oxygene.png