GNOME Bugzilla – Bug 745752
wayland: cursor is out of screen after logging
Last modified: 2015-03-09 13:31:33 UTC
Created attachment 298727 [details] [review] Set cursor initial position to the center of primary monitor It happens me all the time - when I start gnome-shell, the cursor is not visible. Did some debugging and found out that it is displayed, just on some coordinates like: -4538 x 123 or similar. When I'm lucky, I just get it somehow to the screen... Don't know if it does the same under X11. Attached patch moves cursor to the center of primary monitor after backend init.
(In reply to Marek Chalupa from comment #0) > It happens me all the time - when I start gnome-shell, the cursor is not > visible. Did some debugging and found out that it is displayed, just on some > coordinates like: -4538 x 123 or similar. When I'm lucky, I just get it This should definitely no happen and doesn't for me. Clutter initializes the pointer coordinates on https://git.gnome.org/browse/clutter/tree/clutter/evdev/clutter-device-manager-evdev.c#n727 > somehow to the screen... Don't know if it does the same under X11. The X server takes care of this for us. > Attached patch moves cursor to the center of primary monitor after backend > init. If we really need this then it should be in the native backend. See also bug 745121 .
(In reply to Rui Matos from comment #1) > (In reply to Marek Chalupa from comment #0) > > It happens me all the time - when I start gnome-shell, the cursor is not > > visible. Did some debugging and found out that it is displayed, just on some > > coordinates like: -4538 x 123 or similar. When I'm lucky, I just get it > > This should definitely no happen and doesn't for me. Clutter initializes the > pointer coordinates on > https://git.gnome.org/browse/clutter/tree/clutter/evdev/clutter-device- > manager-evdev.c#n727 Yes, I don't know why I was getting the weird values - I can't reproduce it anymore. However, even after having clutter to initialize the device properly, the cursor can appear off the screen. When the displays are arranged so that the clutter's initial position is not in visible area (atm the initial position is 16x16): |------------------| x | | |-----------| | | | | | | | |-----------|------------------| And I can confirm it is true. > > somehow to the screen... Don't know if it does the same under X11. > > The X server takes care of this for us. > > > Attached patch moves cursor to the center of primary monitor after backend > > init. > > If we really need this then it should be in the native backend. See also bug > 745121 . Yes, that's definitely true.
Created attachment 298870 [details] [review] Make sure the pointer is in the visible area after native backend init This patch depends on 745121
Review of attachment 298870 [details] [review]: Ah, right, we could still be outside the visible area if there's no monitor at (0,0) . So, you were probably seeing those values because you moved your pointer and in this case since the pointer wasn't inside the visible area, the constraining callback wasn't working.