mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
cursor: do not clamp motion coordinates for xdg-shell surfaces
...when pointer moves off the xdg-shell surface which is possible when for example grabbing a scroll-bar or selecting text. Clamping results in undetected pointer motion when applied in the direction of movement (for example clamping at view->y masks vertical movement when the y-coordinate is greater than view->y), which in turn can appear as sporadic to the end-user.
This commit is contained in:
parent
921c877f79
commit
f19645aa25
1 changed files with 0 additions and 8 deletions
|
|
@ -304,14 +304,6 @@ process_cursor_motion(struct server *server, uint32_t time)
|
||||||
sy = server->seat.cursor->y - ly;
|
sy = server->seat.cursor->y - ly;
|
||||||
|
|
||||||
if (view && view->type == LAB_XDG_SHELL_VIEW) {
|
if (view && view->type == LAB_XDG_SHELL_VIEW) {
|
||||||
/*
|
|
||||||
* X11 apps expect to be able to receive motion events outside
|
|
||||||
* the window area (this is necessary for client-side move/resize
|
|
||||||
* handles to work properly). So only clamp the motion coordinates
|
|
||||||
* for XDG surfaces.
|
|
||||||
*/
|
|
||||||
sx = sx < 0 ? 0 : (sx > view->w ? view->w : sx);
|
|
||||||
sy = sy < 0 ? 0 : (sy > view->h ? view->h : sy);
|
|
||||||
/* Take into account invisible CSD borders */
|
/* Take into account invisible CSD borders */
|
||||||
if (view->xdg_surface) {
|
if (view->xdg_surface) {
|
||||||
struct wlr_box geo;
|
struct wlr_box geo;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue