summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@intel.com>2012-07-16 17:12:24 +0300
committerKristian Høgsberg <krh@bitplanet.net>2012-07-16 11:35:36 -0400
commite01f340e083cdf9454740f320a18df0d8d4d69c4 (patch)
tree6900737d2ee60a59af83e494e2b09e2344fc2809
parentfc6979cdf438952c775f839eaa11b05d8aff6fdc (diff)
xwayland: fix EnterNotify position
enter handler wasn't updating sprite coordinates based on the Wayland event just sent, failing when forwarding the correct EnterNotify to the X client. There was a doubt regarding whether ProcessInputEvents should be called just after SetCursorPosition or not in order to dequeue the event. When the cursor is in motion it obviously will trigger PIE, so to verify it without moving I used the switcher binding (mod + tab), so the cursor would enter another (frame) window that was unmapped, change to the right cursor and PIE would have to be triggered right after. In fact that was the case and I simply assumed a direct call to PIE wasn't really needed there. Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
-rw-r--r--hw/xfree86/xwayland/xwayland-input.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index a06cf2004..b129faedf 100644
--- a/hw/xfree86/xwayland/xwayland-input.c
+++ b/hw/xfree86/xwayland/xwayland-input.c
@@ -268,12 +268,17 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
struct xwl_seat *xwl_seat = data;
DeviceIntPtr dev = xwl_seat->pointer;
int i;
+ int sx = wl_fixed_to_int(sx_w);
+ int sy = wl_fixed_to_int(sy_w);
+ ScreenPtr pScreen = xwl_seat->xwl_screen->screen;
xwl_seat->xwl_screen->serial = serial;
xwl_seat->pointer_enter_serial = serial;
xwl_seat->focus_window = wl_surface_get_user_data(surface);
+ (*pScreen->SetCursorPosition) (dev, pScreen, sx, sy, TRUE);
+
SetDeviceRedirectWindow(xwl_seat->pointer, xwl_seat->focus_window->window);
/* Ideally, X clients shouldn't see these button releases. When