]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Do not overwrite cursor for app view
authorWenhua Zhao <whzhao@gmail.com>
Sun, 29 Nov 2020 05:42:06 +0000 (05:42 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 29 Nov 2020 08:03:44 +0000 (08:03 +0000)
src/cursor.c

index 749275127f2db70ffa3eee52afbca60d38515e89..4890c9cef259e880905635234ff76c8ca9cb2e28 100644 (file)
@@ -147,7 +147,7 @@ process_cursor_motion(struct server *server, uint32_t time)
        double sx, sy;
        struct wlr_seat *wlr_seat = server->seat.seat;
        struct wlr_surface *surface = NULL;
-       int view_area;
+       int view_area = LAB_DECO_NONE;
        char *cursor_name = NULL;
        struct view *view =
                desktop_view_at(server, server->seat.cursor->x, server->seat.cursor->y,
@@ -188,7 +188,9 @@ process_cursor_motion(struct server *server, uint32_t time)
                        cursor_name = "bottom_right_corner";
                        break;
                case 0:
-                       cursor_name = view_area == LAB_DECO_NONE ? NULL: XCURSOR_DEFAULT;
+                       if (view_area != LAB_DECO_NONE) {
+                               cursor_name = XCURSOR_DEFAULT;
+                       }
                        break;
                }
        }