Bug 339434 - Screen corners should be disabled in fullscreen
Summary: Screen corners should be disabled in fullscreen
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 4.11.11
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 363588 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-09-26 15:14 UTC by Daniel Boff
Modified: 2016-05-27 12:01 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Boff 2014-09-26 15:14:33 UTC
I am playing dota 2 in fullscreen mode. In this game you can pan the camera by moving the mouse to the edge of the screen.

For me, this work for left, right, top and bottom. However, diagonal pans are only possible when using screen corners to invoke effects under kde. (I.e. In KDE you can use a screen corner to activate the present windows effect). The effect itself WON'T activate, but the camera is simple not moving diagonal but either horizontally or vertically, depending on which edge of the screen the mouse touched first.

I have desktop effects deactivated for fullscreen applications and I am sure that I am running the game in fullscreen mode. I don't know if this happens in any other game as I don't own another RTS like game. Also, deactivating desktop effects manually doesn't solve this issue, only deactivating all screen corners solves this.

I am not totally sure if this is a regression or if this bug has always been there, but I just noticed this a week ago or so (so probably it is a regression as I am playing this game now for quite some time).

Reproducible: Always

Steps to Reproduce:
1. Use i.e. the left, bottom screen corner to invoke present windows
2. Start a game in dota
3. Try to move the camera diagonally (left, bottom)
4. The camera will not move diagonally

Actual Results:  
The camera will only move diagonally if screen corners are not used.
Comment 1 Daniel Boff 2014-09-26 15:26:46 UTC
Just a remark: I was using 2 monitors instead of my usual 1 monitor and I believe this is when the problem started. I am now using 1 monitor again but this problem persists. 

Is there any config where kwin might store my montior setup and it thinks that my screen corner is on monitor 2 although it really is on monitor 1 ? (just  a thought)
Comment 2 Martin Flöser 2014-09-26 15:51:24 UTC
KWin's screen edges get disabled if there is an active fullscreen window, but for the corners. These are kept active to allow activating e.g. PresentWindows.

There is no config option to disable this.
Comment 3 Thomas Lübking 2014-09-26 15:52:45 UTC
See:
- https://bugs.kde.org/show_bug.cgi?id=271607
- https://git.reviewboard.kde.org/r/108513/
- https://git.reviewboard.kde.org/r/106722/

It's not a regression.
The screenedge would however be unregistered if compositing is suspended altogether.

> I have desktop effects deactivated for fullscreen applications and I am sure that I am running the game in fullscreen mode.

a) The config item is "mislabeled" (the window is just not redirected, but how do you tell that a user ;-)
    It has no impact on compositing in general (nor are effects unloaded - although present windows oc. has no visible result with an unredirected FS window on top of the stack)
b) The solution is (resourcewise) inferior to suspending the compositor entirely during playing the game, also unredirection was forcefully disabled for intel chips (incredibly crash prone)

If you don't want to suspend the compositor by hand, this can be automated with either a script:
http://kde-look.org/content/show.php/GameMode?content=156659

or a "special window" rule.
Comment 4 Daniel Boff 2014-09-26 18:26:28 UTC
Okay, thank you! I am trying this script and you were right, with disabling composting all together it works.

Should we keep this report open, or should I close it? ( I am not sure if this is really the solution that everybody should be fine with...)
Comment 5 Thomas Lübking 2014-09-26 19:24:41 UTC
I frankly don't think that a global setting could be a solution - your demands will change when the FS window is a browser or image viewer, maybe even a video player.

The "normal" approach for (SDL) games is to grab the mouse and receive all input exclusively.

Whether a solution like originally requested in bug #271607 would work for you, depends on whether the client is managed at all (seems so) and detectable (doesn't, there no properties set  at all)
Notice that i just tried WC3 on wine - it however also actually grabs the pointer here.
Comment 6 Martin Flöser 2014-09-27 05:39:32 UTC
I set it to wontfix. At least on X11 a game should grab the mouse when it needs such functionality. On Wayland that's currently not possible anyway, but the edges also don't steal mouse events any more.
Comment 7 Thomas Lübking 2016-05-27 10:56:24 UTC
*** Bug 363588 has been marked as a duplicate of this bug. ***
Comment 8 flashingisillegal 2016-05-27 11:54:36 UTC
(In reply to Thomas Lübking from comment #3)
> See:
> - https://bugs.kde.org/show_bug.cgi?id=271607
> - https://git.reviewboard.kde.org/r/108513/
> - https://git.reviewboard.kde.org/r/106722/
> 
> It's not a regression.
> The screenedge would however be unregistered if compositing is suspended
> altogether.
> 
> > I have desktop effects deactivated for fullscreen applications and I am sure that I am running the game in fullscreen mode.
> 
> a) The config item is "mislabeled" (the window is just not redirected, but
> how do you tell that a user ;-)
>     It has no impact on compositing in general (nor are effects unloaded -
> although present windows oc. has no visible result with an unredirected FS
> window on top of the stack)
> b) The solution is (resourcewise) inferior to suspending the compositor
> entirely during playing the game, also unredirection was forcefully disabled
> for intel chips (incredibly crash prone)
> 
> If you don't want to suspend the compositor by hand, this can be automated
> with either a script:
> http://kde-look.org/content/show.php/GameMode?content=156659
> 
> or a "special window" rule.

This didn't work for me. With compositor disabled hot corners still activate over fullscreen applications.
Comment 9 Thomas Lübking 2016-05-27 12:01:16 UTC
Only borders/corners assigned to compositor effects would be disabled, not eg. virtual desktop switching or autohiding panels etc.

Virtualbox scenario?