If the window of spice-gtk is partially outside of the physical screen, like so: .----------------------. | physical screen | .-----------------. | | spice-gtk | | | widget | | | | | | | | | | | | | | '-----------------' | | | '----------------------' This doesn't work for linux and for windows. For linux, the problem is that the grab area is wrongly set to: .----------------------. | | .---------------. | |.-------------.| | || grab area || | || || | || || | |'-------------'| | '---------------' | | | | | '----------------------' and we actually want it to be the whole screen. For windows we can use WH_MOUSE_LL for SetWindowsHookEx But there is an even better implementation that we need to copy from spicec.
Created attachment 56711 [details] [review] widget: fix mouse wrapping failing when the window is outside Use a anchor mouse position after every move, similar to spicec to avoid reaching transparent border on the screen. We try to move to the center of the screen, but gdk_display_warp_pointer () will move the cursor within the grabbed window (so it still receives mouse events even on Windows) Tested with Linux and Windows clients. Fixes bug:
ACK.
pushed. commit fdbd5c1b5eb8596b574ad651afb74a7c59a14484 Author: Marc-André Lureau <marcandre.lureau@redhat.com> Date: Tue Feb 7 14:36:14 2012 +0100
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.