Bug 356557 - Add "Fullscreen window" matching
Summary: Add "Fullscreen window" matching
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-12 14:02 UTC by jeremy9856
Modified: 2015-12-30 20:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jeremy9856 2015-12-12 14:02:59 UTC
I think it's useful to provide a "Fullscreen window" matching in the "window matching" tab of kwin rule to specify some rules only when the window is in fullscreen.

Thanks.

Reproducible: Always
Comment 1 Thomas Lübking 2015-12-12 14:12:34 UTC
Since the geometry is one of the controlled properties, this is prone to cyclic or contradicting rules - you should at least explain *why* you think it would be useful.

Looking for the game mode kwin script?
http://kde-look.org/content/show.php/GameMode?content=156659
Comment 2 jeremy9856 2015-12-12 14:20:58 UTC
It can be useful for video playback for exemple and probably other use case. 

When the video player is in windowed mode you may want compositing but when you switch in fullscreen or when you launch it directly in fullscreen you may want to disable the compositing.

It's a valid use case for every app that can benefit of disabled compositing in fulscreen but let the user enjoy compositing in windowed mode.
Comment 3 jeremy9856 2015-12-12 14:23:20 UTC
The script seems to do what I mean but it could be better to have it integrated in Kwin don't you think since some people have gone as far as created a specialized script ?
Comment 4 Thomas Lübking 2015-12-12 14:33:46 UTC
"Some people" actually happens to be "me" :-P
Comment 5 jeremy9856 2015-12-12 14:48:43 UTC
I didn't know that ^_^
Great work thanks !

Obviously, you like/need this feature so do you think we can implement something similar in Kwin ?
Comment 6 Martin Flöser 2015-12-14 07:49:53 UTC
rules on fullscreen seem wrong to me as that is kind of the dynamic adjustment what scripts are about. In fact the motivation seems to be about games and for that we have the linked script.

> do you think we can implement something similar in Kwin ?

The question is: should we ship Thomas's script by default? I'm not sure about it as it introduces string comparisons for all windows at all time. I'm very unsure whether we should introduce runtime penalties for all users for games. After all: games could just set the xproperty.
Comment 7 Thomas Lübking 2015-12-14 08:33:13 UTC
(In reply to Martin Gräßlin from comment #6)
> I'm not sure about it as it introduces string comparisons for all windows at all time.

If QtScript isn't totally broken: only on fullscreen state changes ;-)

> I'm very unsure whether we should introduce runtime penalties for all users
> for games. After all: games could just set the xproperty.
Iff shipped w/ kwin, we'd probably disable it by default, also because the the user will ultimately have to configure the list of matched windows (ie. there needed to be a config UI)

PS: despite called "game mode", the list of GAMES is presently
"vlc", "smplayer", "dragon", "mplayer", "ffplay", "kodi" ;-)


Bottom line: this is rather a matter of distribution policy; what do we ship with kwin and how much is the focus on GHNS. (Eg. i'd propose to move the "minimize all" script to GHNS w/ KWin 6)
Comment 8 jeremy9856 2015-12-14 08:53:33 UTC
(In reply to Martin Gräßlin from comment #6)
> rules on fullscreen seem wrong to me as that is kind of the dynamic
> adjustment what scripts are about. In fact the motivation seems to be about
> games and for that we have the linked script.

I didn't talk about games but video players. I'm really disappointed by the fact that you set the bug report to "WON'T FIX" because I really think that it is useful to have a fullscreen matching feature built in Kwin. Thomas even create a script for this.
Comment 9 Thomas Lübking 2015-12-14 09:06:13 UTC
Please notice that there's nothing such as a buil-in script, it's only a matter of distribution policy.
Whether your distro installs the script with kwin, in a side package or you fetch it from the GHNS servers makes absolutely no technical difference on its invocation.
Comment 10 jeremy9856 2015-12-14 09:14:35 UTC
What I mean is that it should be a built in feature of Kwin ;)
Comment 11 Thomas Lübking 2015-12-14 09:17:50 UTC
To gain less flexibility?
Despite Martins concern, the scripting overhead is neglectable - switching fullscreen state doesn't happen that often (and far more expensive things than a string comparism happen in that moment anyway - let alone the plasmashell overhead when you suspend the compositor and it reloads its theme...)
Comment 12 jeremy9856 2015-12-14 09:20:40 UTC
(In reply to Thomas Lübking from comment #11)
> To gain less flexibility?

Why ? Having a fullscreen matching feature built in Kwin don't avoid the possible use of the script it one need it ?
Comment 13 Thomas Lübking 2015-12-14 09:22:59 UTC
As suggested before: matching the fullscreen state in the rules is not only irregular (the matching applies to static attributes, we made an exception for the title due to popular client "bugs" which change them to the actual title after mapping them) but also prone to cause malicious rules. It doesn't belong into this system at all.
Comment 14 jeremy9856 2015-12-14 09:25:54 UTC
I really don't understand. You already do some kind of detection for the "unredirected fullscreen window" feature...
Comment 15 Thomas Lübking 2015-12-14 09:43:30 UTC
Which is not part of the rule system (as your request initially pointed) and totally broken/useless to begin with (because it doesn't cover unmanaged windows which many games actually are while otoh, you usually don't want that when turning your browser or word processor fullscreen) - it is constant subject to "let's remove this nonsense" discussions (also because we need to downforce it on intel chips for causing bug #252817 - isn't it scary that I can still remember the bug id?)

We could turn that into a "completely suspend the compositor when a window goes fullscreen" but that would just carry the mentioned flaws as well.

What exactly is your exact concern about using the script system which was especially created to allow flexible and custom manipulation of the flow control in kwin?
Comment 16 jeremy9856 2015-12-14 09:58:18 UTC
> What exactly is your exact concern about using the script system which was especially created to allow flexible and custom manipulation of the flow control in kwin?

I don't have any concern about using the script but, as I didn't even know that the script existed, I think that only a very few people will find it and use it whereas a built in feature is more easily discoverable.
Comment 17 Thomas Lübking 2015-12-14 18:57:23 UTC
That probably means we've to tell the HIG team that their efforts to stash the compositing kcm from end users failed miserably ;-P

On the bottom line, you say "kwin has this nice and powerful scripting system, but it's completely useless as no user can find it", right?

Did you miss
a) the config module
b) what it means  (rename "scripts" to "extensions"?)
c) that it could do what you want (ie. the script should be shipped by default to be visible w/o clicking the GHNS button)

oc. (c) questions the entire GHNS system since everyone might have his "ahhhh, I could have used this script to arrange my windows in circles, I just didn't know it exists - should be shipped by default" moment ...)
Comment 18 jeremy9856 2015-12-15 13:11:19 UTC
I knew that scripts exist for kwin but I didn't even think to look at them. I thought (and still think) that was a feature for really specific and advanced things like "video wall". For that particular and somewhat basic feature I really think that we should not have to find some kind of script to make it work and have at least a built in "Fullscreen window" matching. 

You are seeing this as a developer or as an advanced user but try for a minute to think as simple, not tech savvy user. Do you really think that a simple user that just want to watch some videos or play a game in good conditions will think that there is a feature to install scripts for kwin. He probably don't know what a compositor is, he don't know what kwin is and he probably never went to the compositor settings.

I don't really care of this at the end for me because I know what kwin is, how to set it up and now, thanks to you, I will think that there is scripts for it. But what about the simple user that is the vast majority of users ? Kwin should handle theses obvious cases automatically and ease the life of the user.

As a side note, there is even a standard feature to help here that is not implemented (_NET_WM_BYPASS_COMPOSITOR) : https://bugs.kde.org/show_bug.cgi?id=349910
Martin even say that I should implement it myself... (http://blog.martin-graesslin.com/blog/2015/12/gaming-on-linux-move-to-next-generation/#comment-70226)

And like I said to Martin, again to simplify the user experience not really for myself (http://blog.martin-graesslin.com/blog/2015/12/gaming-on-linux-move-to-next-generation/#comment-70212) :

> If unredirection of fullscreen windows is not well integrated maybe it worth it to improve this because even if games are better served with disabling compositing kwin and kde are perceived as bad for gaming.

> I understand the frustration with the intel driver but someday it could be good to reactivate the fullscreen unredirection feature for the users of intel hardware. After all it will undoubtedly work one day.

> I’m not a dev so I can’t help to implement _NET_WM_BYPASS_COMPOSITOR but it’s weird that you have your own system but don’t use and not interested in something standard.

Don't misunderstand I don't complaint, I just think we can have a much better user experience on KDE and I try to help. Anyway I'm really really thankful for all your wonderful work !
Comment 19 Thomas Lübking 2015-12-29 12:11:19 UTC
Don't do that again.
We explained why it doesn't fit into rules and Martin (the maintainer) thus set this wontfix. And it won't. Such match can and will not appear in the rules.
Comment 20 jeremy9856 2015-12-29 12:34:17 UTC
It's sad that Linux can't be more user friendly...

Like I said :

> Do you really think that a simple user that just want to watch some videos or play a game in good conditions will think that there is a feature to install scripts for kwin...
Comment 21 Thomas Lübking 2015-12-29 12:51:19 UTC
This has *nothing* to do with "user friendlyness" - so stop such insinuations, they won't get your anywhere you want.

You asked for an approach that is plain wrong (to avoid harsher judgements), so it won't happen. Was that clear enough?

That doesn't say anything about "how can we improve the situation" let alone "we refuse to improve the situation". It only says: this particular solution will certainly not happen.

There's an open bug about supporting that arrogant netwm property, so there's no point in bumping this one - leaving aside that a window rule is hardly more convenient than instaling a script.
Comment 22 jeremy9856 2015-12-30 13:13:54 UTC
(In reply to Thomas Lübking from comment #21)

OK sorry but, and I will say it only once, stop talking to me like this please.

I just hope that something more user friendly than a script will be done to improve the situation of full screen video playback and gaming.
Comment 23 Thomas Lübking 2015-12-30 14:38:45 UTC
Like "what"?
Telling you that your wish is "wrong" (as had been explained several times before), asking to stop "pointless" insinuations or clarifying what denying this wish implies and what not?

If you should have misunderstood "arrogant netwm property", I had PM'd you some time ago close details about the grief with that particular property, so really, try to not stir up my anger.
Comment 24 jeremy9856 2015-12-30 15:27:47 UTC
I don't want to argue with you. If you don't see that you talk badly to me I can't help.

> try to not stir up my anger.

You are getting upset alone I'm afraid...
Comment 25 Thomas Lübking 2015-12-30 15:50:29 UTC
So you just claim I spoke "badly" and demand to stop that but refuse to explain why you feel offended by stating some simple facts?
If you want something, specify it and don't avoid simple answers. Otherwise you really can't expect anything.
Comment 26 jeremy9856 2015-12-30 16:26:25 UTC
(In reply to Thomas Lübking from comment #25)

If you don't understand what I meant you can reread the comments. I don't want to spend more time on this, so can we stop with this and move along please ? I think we have better things to do and I already say what I want.
Comment 27 Thomas Lübking 2015-12-30 17:09:51 UTC
ok, sorry i missed that you're just trolling. thanks for wasting my time and welcome to my sa blacklist.
Comment 28 jeremy9856 2015-12-30 19:47:09 UTC
Wow I said I was sorry to reopen the bug report, just said to you to speak to me better and I didn't wanted to enter in your game without arguing and you say I'm trolling, you must be crazy...

It's weird to me because you seemed to be a nice person before that...
Comment 29 jeremy9856 2015-12-30 20:12:53 UTC
There is already too much hate on internet and I hope that we can forget this and make peace.