diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-19 12:51:40 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-19 12:51:40 -0400 |
commit | facfb9415debd77fe18b4dbc1ee82f3ba25f5ee6 (patch) | |
tree | 55283f9312f145c3963d53fd52f377301e4e18f9 | |
parent | e01f340e083cdf9454740f320a18df0d8d4d69c4 (diff) |
xwayland: Hide cursor on leave, show again on enter
This makes sure we change the cursor on enter. If the pointer enters from
a wayland client the X server would not have seen any cursor change that
client made, so this makes sure we always set the cursor on enter.
-rw-r--r-- | hw/xfree86/xwayland/xwayland-input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c index b129faedf..d9f352f88 100644 --- a/hw/xfree86/xwayland/xwayland-input.c +++ b/hw/xfree86/xwayland/xwayland-input.c @@ -294,6 +294,8 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, for (i = 0; i < dev->button->numButtons; i++) if (BitIsOn(dev->button->down, i)) xf86PostButtonEvent(dev, TRUE, i, 0, 0, 0); + + (*pScreen->DisplayCursor)(dev, pScreen, dev->spriteInfo->sprite->current); } static void @@ -301,11 +303,14 @@ pointer_handle_leave(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface) { struct xwl_seat *xwl_seat = data; + DeviceIntPtr dev = xwl_seat->pointer; + ScreenPtr pScreen = xwl_seat->xwl_screen->screen; xwl_seat->xwl_screen->serial = serial; xwl_seat->focus_window = NULL; SetDeviceRedirectWindow(xwl_seat->pointer, PointerRootWin); + (*pScreen->DisplayCursor)(dev, pScreen, NullCursor); } static void |