cursor.c: set damage for changing button states

This commit is contained in:
Johan Malm 2021-02-15 18:04:04 +00:00
parent 0850a2edc4
commit 0e69c9ee9f

View 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;