]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor.c: set damage for changing button states
authorJohan Malm <jgm323@gmail.com>
Mon, 15 Feb 2021 18:04:04 +0000 (18:04 +0000)
committerJohan Malm <jgm323@gmail.com>
Mon, 15 Feb 2021 18:04:04 +0000 (18:04 +0000)
src/cursor.c

index 7adfed4d40820330577023532a449efe68014e01..899a13b75e3db53a9aebc1f60fe1fe70e061f240 100644 (file)
@@ -130,8 +130,7 @@ process_cursor_motion(struct server *server, uint32_t time)
                return;
        }
 
-       /* Otherwise, find the view under the pointer and send the event along.
-        */
+       /* Otherwise, find the view under the pointer and send the event along */
        double sx, sy;
        struct wlr_seat *wlr_seat = server->seat.seat;
        struct wlr_surface *surface = NULL;
@@ -187,6 +186,9 @@ process_cursor_motion(struct server *server, uint32_t time)
                        server->seat.xcursor_manager, cursor_name, server->seat.cursor);
        }
 
+       /* Required for iconify/maximize/close button mouse-over deco */
+       damage_all_outputs(server);
+
        if (surface) {
                bool focus_changed =
                        wlr_seat->pointer_state.focused_surface != surface;
@@ -304,7 +306,8 @@ cursor_button(struct wl_listener *listener, void *data)
        /* Handle _press_ on view */
        desktop_focus_view(&server->seat, view);
 
-       resize_edges = get_resize_edges(view, server->seat.cursor->x, server->seat.cursor->y);
+       resize_edges = get_resize_edges(view, server->seat.cursor->x,
+                                       server->seat.cursor->y);
        if (resize_edges != 0) {
                interactive_begin(view, LAB_INPUT_STATE_RESIZE, resize_edges);
                return;