mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
src/cursor.c: refactor nested if-statements
This commit is contained in:
parent
f19645aa25
commit
0b0e438adb
1 changed files with 7 additions and 8 deletions
|
|
@ -303,15 +303,14 @@ process_cursor_motion(struct server *server, uint32_t time)
|
||||||
sx = server->seat.cursor->x - lx;
|
sx = server->seat.cursor->x - lx;
|
||||||
sy = server->seat.cursor->y - ly;
|
sy = server->seat.cursor->y - ly;
|
||||||
|
|
||||||
if (view && view->type == LAB_XDG_SHELL_VIEW) {
|
/* Take into account invisible xdg-shell CSD borders */
|
||||||
/* Take into account invisible CSD borders */
|
if (view && view->type == LAB_XDG_SHELL_VIEW
|
||||||
if (view->xdg_surface) {
|
&& view->xdg_surface) {
|
||||||
struct wlr_box geo;
|
struct wlr_box geo;
|
||||||
wlr_xdg_surface_get_geometry(view->xdg_surface, &geo);
|
wlr_xdg_surface_get_geometry(view->xdg_surface, &geo);
|
||||||
sx += geo.x;
|
sx += geo.x;
|
||||||
sy += geo.y;
|
sy += geo.y;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
wlr_seat_pointer_notify_motion(server->seat.seat, time, sx, sy);
|
wlr_seat_pointer_notify_motion(server->seat.seat, time, sx, sy);
|
||||||
} else if (surface && !input_inhibit_blocks_surface(
|
} else if (surface && !input_inhibit_blocks_surface(
|
||||||
&server->seat, surface->resource)) {
|
&server->seat, surface->resource)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue