input-capture: Fix off-by-one for barrier validation
Assuming two 1920x1080 screens next to each other: a horizontal barrier starting at 1920 going east is always outside the left screen. Assuming two 1920x1080 screens on top of each other: a vertical barrier starting at 1080 going south is always outside the top screen. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3319>
This commit is contained in:

committed by
Marge Bot

parent
909cc6c240
commit
b7078ddab7
@ -640,7 +640,7 @@ get_barrier_adjacency (MtkRectangle *rect,
|
||||
return LINE_ADJACENCY_NONE;
|
||||
|
||||
if (y_max < rect->y ||
|
||||
y_min > rect->y + rect->height)
|
||||
y_min >= rect->y + rect->height)
|
||||
return LINE_ADJACENCY_NONE;
|
||||
|
||||
if (rect->x + rect->width == x || rect->x == x)
|
||||
@ -664,7 +664,7 @@ get_barrier_adjacency (MtkRectangle *rect,
|
||||
return LINE_ADJACENCY_NONE;
|
||||
|
||||
if (x_max < rect->x ||
|
||||
x_min > rect->x + rect->width)
|
||||
x_min >= rect->x + rect->width)
|
||||
return LINE_ADJACENCY_NONE;
|
||||
|
||||
if (rect->y + rect->height == y || rect->y == y)
|
||||
|
Reference in New Issue
Block a user