mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
correctly detect when cursor is over titlebar
this was broken when we added ssd_part_types other than NONE that are not decoration
This commit is contained in:
parent
54e99cd240
commit
24215a3085
1 changed files with 5 additions and 1 deletions
|
|
@ -194,19 +194,23 @@ process_cursor_motion(struct server *server, uint32_t time)
|
||||||
server->seat.cursor->x, server->seat.cursor->y, &surface,
|
server->seat.cursor->x, server->seat.cursor->y, &surface,
|
||||||
&sx, &sy, &view_area);
|
&sx, &sy, &view_area);
|
||||||
|
|
||||||
|
/* Set cursor */
|
||||||
if (!view) {
|
if (!view) {
|
||||||
|
/* root, etc. */
|
||||||
cursor_set(&server->seat, XCURSOR_DEFAULT);
|
cursor_set(&server->seat, XCURSOR_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
|
/* resize handles */
|
||||||
uint32_t resize_edges = ssd_resize_edges(view_area);
|
uint32_t resize_edges = ssd_resize_edges(view_area);
|
||||||
if (resize_edges) {
|
if (resize_edges) {
|
||||||
cursor_name_set_by_server = true;
|
cursor_name_set_by_server = true;
|
||||||
cursor_set(&server->seat,
|
cursor_set(&server->seat,
|
||||||
wlr_xcursor_get_resize_name(resize_edges));
|
wlr_xcursor_get_resize_name(resize_edges));
|
||||||
} else if (view_area != LAB_SSD_NONE) {
|
} else if (ssd_part_contains(LAB_SSD_PART_TITLEBAR, view_area)) {
|
||||||
/* title and buttons */
|
/* title and buttons */
|
||||||
cursor_set(&server->seat, XCURSOR_DEFAULT);
|
cursor_set(&server->seat, XCURSOR_DEFAULT);
|
||||||
cursor_name_set_by_server = true;
|
cursor_name_set_by_server = true;
|
||||||
} else if (cursor_name_set_by_server) {
|
} else if (cursor_name_set_by_server) {
|
||||||
|
/* window content */
|
||||||
cursor_set(&server->seat, XCURSOR_DEFAULT);
|
cursor_set(&server->seat, XCURSOR_DEFAULT);
|
||||||
cursor_name_set_by_server = false;
|
cursor_name_set_by_server = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue