Bug 311720 - add rule to disobey configure requests
Summary: add rule to disobey configure requests
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 4.9.3
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: 4.11
Assignee: KWin default assignee
URL: http://git.reviewboard.kde.org/r/109691/
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-15 07:40 UTC by Travis Evans
Modified: 2013-03-28 19:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11
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 Travis Evans 2012-12-15 07:40:17 UTC
The tabbed/grouped windows is a great feature. One thing that I find irritating, though, is that when any window in a group attempts to programmatically change its own geometry (window size, maximized, minimized, etc.), it tends to affect the entire group, resulting in unwanted changes to all windows in that group, since apps are normally written with the assumption that their windows are independent of all others.

I think it would be nice to have a bit better control over what happens in a grouped environment. I'd like to be able to set the group's geometry once and have that override anything that windows try to do while grouped, while still being able to easily resize/minimize/maximize/etc. the group using the usual window decoration controls.

Reproducible: Always
Comment 1 Thomas Lübking 2012-12-15 09:18:01 UTC
that's gonna introduce a new problem. clients usually adjust their size to fit new inner demands, disobeying that will cut or squeeze content.
it would require per-client rules to either disobey config requests, only while tabbed or break tabbing on such.

What's the actual usecase ("nasty client")?
Comment 2 Travis Evans 2013-01-07 19:39:50 UTC
Hmm, sounds tricky. I haven't encountered any particular cases in a while for some reason. 

The best I can come up with is with an application called pwmanager, which is misbehaving today. I have a kwin rule for autogrouping it with some other apps including kmail. It's set to open my safe on startup. On launch, its pop-up password dialog was causing the other windows in its group to vanish (minimized, apparently), and it sometimes forcefully created its main window maximized on the other monitor of my dual-monitor setup instead of the one where the group actually exists. Attempting to unminimize its window resulted in none of the other grouped windows appearing at all, even though they're all supposed to be in the same group. Then, attempting to unminimize a different window in that group resulted in pwmanager quitting without an error message. This happened several times in a row, and only after several attempts did the window behave correctly.

That may or may not really be related to my original feature request, or could be an entirely different bug in kwin and/or pwmanager altogether. All I know is I have no idea what was going on, and it's confusing and annoying the hell out of me. :-)

I'll try to give a better example if I encounter one.
Comment 3 Thomas Lübking 2013-01-08 21:37:52 UTC
The KDE3 software?

Random guess, alter the rule for it so that in "size & position" you have:

"Ignore Initial Placement" "force" "yes"
"obey geometry restrictions" "force" "no"

> pwmanager quitting without an error message
that sounds like a segfault.
a kde3 application might not be able to run drkonqui in a kde4 environment (i frankly don't know) but you could run it from gdb to check for segfaults - that is however not a Problem of the windowmanager; it might however still be interesting to see how "the most nasty thinkable client" reacts on such environment. Is it http://passwordmanager.sourceforge.net/index.php ?
Comment 4 Travis Evans 2013-03-24 00:17:11 UTC
Sorry about the lack of response for a while. I believe the program is indeed the one you linked to.

I did in fact have it segfault a lot on launch, though in those cases I could see the message in the terminal I launched it from. Sometimes it quit without such a message.

Since then, I have on occasion had various other programs (the Bitcoin/Litecoin Qt clients in particular seem to do this a lot, and sometimes Firefox as well) sometimes move/resize the group to some arbitrary size and position when launched, sometimes but not always, without any obvious pattern. I will experiment with some of the Kwin settings you mention and see if it seems to help.
Comment 5 Thomas Lübking 2013-03-28 19:31:34 UTC
Git commit 65d333625ffacf39f3178011decc918affe1719b by Thomas Lübking.
Committed on 24/03/2013 at 19:13.
Pushed by luebking into branch 'master'.

turn "ignore geometry" forcerule into a setrule

and btw. replace legacy "ignoreposition" by "ignoregeometry"

this will allow to use "apply initially" as "force" used to act
(ignore position on placement) and "force" to prevent clients
from reconfiguring themselves (to not break a tabgroup or to just
not be annoying)
Related: bug 252314
REVIEW: 109691
FIXED-IN: 4.11

M  +3    -0    kwin/geometry.cpp
M  +5    -5    kwin/kcmkwin/kwinrules/ruleswidget.cpp
M  +1    -1    kwin/kcmkwin/kwinrules/ruleswidget.h
M  +21   -6    kwin/kcmkwin/kwinrules/ruleswidgetbase.ui
M  +1    -1    kwin/manage.cpp
M  +8    -19   kwin/rules.cpp
M  +4    -6    kwin/rules.h

http://commits.kde.org/kde-workspace/65d333625ffacf39f3178011decc918affe1719b