How to disable the window context menu during playing games?

Questions about Wine on Linux
Locked
vityafx
Level 2
Level 2
Posts: 13
Joined: Sun Jan 07, 2018 2:21 pm

How to disable the window context menu during playing games?

Post by vityafx »

Quite often while I play games (doom, wolfenstein) through the wine the window control context menu appears from the taskbar and I am not able to close it (I'd prefer not to have it shown at all). How to fix this?

Image
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: How to disable the window context menu during playing ga

Post by Bob Wya »

vityafx wrote:Quite often while I play games (doom, wolfenstein) through the wine the window control context menu appears from the taskbar and I am not able to close it (I'd prefer not to have it shown at all). How to fix this?
...
@vityafx

This is related to Wine Bug 40828 - Switching resolution in desktop mode makes task bar redraw on top of full screen game ...
In that the Wine Virtual Desktop taskbar tends to steal focus from windows overlaying it.
This is an annoying issue that even affects modern games likes Doom 2016 - when run from Steam.

I wrote a patch - that still applies cleanly to Wine / Wine Staging that is attached to that bug report.
The patch is pretty simple - just introduces a registry key which when set disables the system tray embedding.
This also has the side effect of disabling the Wine Virtual Desktop Taskbar.
The patch was considered to much of a hack to be included in mainline Wine (I did submit it).

Sorry but the only way to use the patch is to build Wine from Source.
Easy enough on Gentoo (or Arch) - not so easy on other Linux distributions.

Bob
vityafx
Level 2
Level 2
Posts: 13
Joined: Sun Jan 07, 2018 2:21 pm

Re: How to disable the window context menu during playing ga

Post by vityafx »

Bob Wya wrote:
vityafx wrote:Quite often while I play games (doom, wolfenstein) through the wine the window control context menu appears from the taskbar and I am not able to close it (I'd prefer not to have it shown at all). How to fix this?
...
@vityafx

This is related to Wine Bug 40828 - Switching resolution in desktop mode makes task bar redraw on top of full screen game ...
In that the Wine Virtual Desktop taskbar tends to steal focus from windows overlaying it.
This is an annoying issue that even affects modern games likes Doom 2016 - when run from Steam.

I wrote a patch - that still applies cleanly to Wine / Wine Staging that is attached to that bug report.
The patch is pretty simple - just introduces a registry key which when set disables the system tray embedding.
This also has the side effect of disabling the Wine Virtual Desktop Taskbar.
The patch was considered to much of a hack to be included in mainline Wine (I did submit it).

Sorry but the only way to use the patch is to build Wine from Source.
Easy enough on Gentoo (or Arch) - not so easy on other Linux distributions.

Bob
Thanks for your help! I hope this will be fixed someday in master so we won't have such problems anymore without hacky patches.
Cybermax
Level 4
Level 4
Posts: 218
Joined: Fri Dec 01, 2017 5:26 pm

Re: How to disable the window context menu during playing ga

Post by Cybermax »

Bob Wya wrote: I wrote a patch - that still applies cleanly to Wine / Wine Staging that is attached to that bug report.
The patch is pretty simple - just introduces a registry key which when set disables the system tray embedding.
This also has the side effect of disabling the Wine Virtual Desktop Taskbar.
The patch was considered to much of a hack to be included in mainline Wine (I did submit it).

Bob
I wonder if that patch could be tweaked for making wine desktop pop up on a selectable geometry space?

I mean.. X11 tend to start at +0+0 (Top left corner), and end at.. whatever resolution your screens make up. Thats nice enough, unless you have like me - a 2nd monitor on your LEFT side, and want to play on my primary monitor in front of me.. Cos the X11 desktop starts at +0+0 and the wine virtual desktop will automagically start at +0+0 if i choose a size that fits my display. (for me 1920x1080) to get fullscreen virtual desktop.

If i put 1919x1080 it will pop up on my "primary" display, but ofc will NOT be fullscreen, as it will adapt to the menu's and whatnot that my displaymanager puts out..

Solution for me was to use devilspie tho, but i still think it would be nice to have the feature to choose where the virtual desktop should start. My devilspie script moves the wine virtual desktop to +1920+0, and removes decoration, so i do get fullscreen that way.

Maybe it would work for this issue to?

Devilspie script:

Code: Select all

(if
(matches (application_name) "Wine desktop")
(begin
(undecorate)
(geometry "+1920+0")
(set_workspace 1)
(focus)
(above)
)
)
Just change the "geometry" to something else suiting your monitor setup.. +0+0 for single monitor, but the "undecorate" function should theoretically remove menu stuff? :)

C
Locked