ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.05k stars 200 forks source link

pointer_enter/exit and plane ownership issue #1558

Open rich-playtron opened 3 days ago

rich-playtron commented 3 days ago

Hi,

There seems to be an issue with gamescope and Fedora 40 running winewayland with --expose-wayland param. gamescope is crashing when the mouse pointer leaves or enters the gamescope pane. I've tracked it down to the user data for non-gamescope wayland surfaces being non-null. The user data from those surfaces is being interpreted as a CWaylandPane pointer, and boom.

I've put in a fix on my end, but being relatively new to gamescope I thought it might be best to bring it up here, and see if you have a preferred way to fix the issue, or perhaps it's just user error! My temp workaround is to track the pointers to the planes gamescope creates and sanity check the pointer in the surface user data is actually a CWaylandPlane* when the pointer enter/leave events come in to the input thread.

I'd be happy to make a PR with your preferred fix, if it is indeed an issue that needs fixing. Thanks!

sharkautarch commented 3 days ago

@rich-playtron Feel free to make a PR, even if the gamescope devs decide they want to go about things differently compared to your PR, it can still be helpful insofar as it allows people to compare the behavior of vanilla gamescope vs the behavior w/ the PR applied.

misyltoad commented 3 days ago

Can you send a backtrace and your proposed patch?

matte-schwartz commented 2 days ago

Sounds similar to https://github.com/ValveSoftware/gamescope/issues/1434#issuecomment-2310901864 maybe?