Activating the mouse grab causes the GTK+ 3 display to stop updating. As a simple test, start Fuse as ./fuse --kempston-mouse, enter PRINT FLASH 1;"Working" and then click in the Fuse window - the blue "mouse" icon comes on at the bottom, but the text stops flashing. Nothing(?) seems capable of restarting the display, but the emulator is clearly still working - keyboard clicks, BEEP 1,0 etc all make noise as expected.
gdk_device_(un)grab functions with gdk_seat_(un)grab doesn't seem to make a difference.GTK+ 3.22.30 if that makes any difference.
It works for me on X11:
GDK_BACKEND=x11 ./fuse --kempston-mouse --no-sound
and crash on Wayland:
GDK_BACKEND=wayland ./fuse --kempston-mouse --no-sound
Obviously we shouldn't use XWarpPointer on Wayland. I don't know the current status quo of relative/locking pointer, some years ago it was a missing feature on Wayland:
http://www.phoronix.com/scan.php?page=news_item&px=MTMxMjQ
At least on my machine, this seems to be related to XWarpPointer even on X11; removing the call means that everything works.
Some further trial and error guessing shows that changing the window used as
dest_wtoXWarpPointerfromgtkui_drawing_areatogtkui_windowmakes things work on my machine (on both GTK 2.x and 3.x). Sergio, could you test this on your machine?And some more extensive testing shows that we do actually want
gtkui_drawing_areaon GTK+ 2.x. So therefore:gtkui_drawing_areaas before.gtkui_window.This is now all done in the bug-435-improve-kempston-mouse-handling branch. Please give it a test if you can...
On Wayland, the values returned seem to be junk. I'll create a separate bug for that.
Merged as there were no objections :-)
Sorry for the slow reply. I've seen a small issue. With Wayland backend I can't move the main window by dragging the title bar as the mouse is grabbed. With X11 backend the window can be moved as the mouse is only grabbed when clicking the drawing area.
I've figured out that Fuse shouldn't stop other handlers when the mouse is not grabbed. That allows moving and resizing the window on Wayland. Patch attached. I'll commit in a few days.
Regression fixed in [ec1c37]. Will be released in the next version of v1.5.7
Related
Commit: [ec1c37]