wlserver: Handle tapping overrides off screen

This clamp was stopping us from clicking off the current surface, which we want now.
This commit is contained in:
Joshua Ashton 2022-01-31 01:46:18 +00:00 committed by Joshie
parent 15dc09adfb
commit 779d8f1bee

View file

@ -292,12 +292,6 @@ static void wlserver_handle_touch_down(struct wl_listener *listener, void *data)
x *= focusedWindowScaleX; x *= focusedWindowScaleX;
y *= focusedWindowScaleY; y *= focusedWindowScaleY;
if ( x < 0.0f ) x = 0.0f;
if ( y < 0.0f ) y = 0.0f;
if ( x > wlserver.mouse_focus_surface->current.width ) x = wlserver.mouse_focus_surface->current.width;
if ( y > wlserver.mouse_focus_surface->current.height ) y = wlserver.mouse_focus_surface->current.height;
wlserver.mouse_surface_cursorx = x; wlserver.mouse_surface_cursorx = x;
wlserver.mouse_surface_cursory = y; wlserver.mouse_surface_cursory = y;
@ -389,12 +383,6 @@ static void wlserver_handle_touch_motion(struct wl_listener *listener, void *dat
x *= focusedWindowScaleX; x *= focusedWindowScaleX;
y *= focusedWindowScaleY; y *= focusedWindowScaleY;
if ( x < 0.0f ) x = 0.0f;
if ( y < 0.0f ) y = 0.0f;
if ( x > wlserver.mouse_focus_surface->current.width ) x = wlserver.mouse_focus_surface->current.width;
if ( y > wlserver.mouse_focus_surface->current.height ) y = wlserver.mouse_focus_surface->current.height;
wlserver.mouse_surface_cursorx = x; wlserver.mouse_surface_cursorx = x;
wlserver.mouse_surface_cursory = y; wlserver.mouse_surface_cursory = y;