mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
fix decorations on wayland backend
This commit is contained in:
parent
9d87d4e336
commit
fc627afd18
3 changed files with 8 additions and 3 deletions
|
@ -115,7 +115,7 @@ static void roots_cursor_update_position(struct roots_cursor *cursor,
|
||||||
seat_view_deco_leave(cursor->pointer_view);
|
seat_view_deco_leave(cursor->pointer_view);
|
||||||
cursor->pointer_view = NULL;
|
cursor->pointer_view = NULL;
|
||||||
}
|
}
|
||||||
bool set_compositor_cursor = !view && cursor->cursor_client;
|
bool set_compositor_cursor = !view && !surface && cursor->cursor_client;
|
||||||
if (view && surface) {
|
if (view && surface) {
|
||||||
struct wl_client *view_client =
|
struct wl_client *view_client =
|
||||||
wl_resource_get_client(view->wlr_surface->resource);
|
wl_resource_get_client(view->wlr_surface->resource);
|
||||||
|
@ -211,7 +211,7 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
|
||||||
struct roots_desktop *desktop = seat->input->server->desktop;
|
struct roots_desktop *desktop = seat->input->server->desktop;
|
||||||
bool is_touch = device->type == WLR_INPUT_DEVICE_TOUCH;
|
bool is_touch = device->type == WLR_INPUT_DEVICE_TOUCH;
|
||||||
|
|
||||||
struct wlr_surface *surface;
|
struct wlr_surface *surface = NULL;
|
||||||
double sx, sy;
|
double sx, sy;
|
||||||
struct roots_view *view =
|
struct roots_view *view =
|
||||||
desktop_view_at(desktop, lx, ly, &surface, &sx, &sy);
|
desktop_view_at(desktop, lx, ly, &surface, &sx, &sy);
|
||||||
|
|
|
@ -400,7 +400,8 @@ static bool view_at(struct roots_view *view, double lx, double ly,
|
||||||
if (view_get_deco_part(view, view_sx, view_sy)) {
|
if (view_get_deco_part(view, view_sx, view_sy)) {
|
||||||
*sx = view_sx;
|
*sx = view_sx;
|
||||||
*sy = view_sy;
|
*sy = view_sy;
|
||||||
return view;
|
*surface = NULL;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wlr_box_contains_point(&box, view_sx, view_sy) &&
|
if (wlr_box_contains_point(&box, view_sx, view_sy) &&
|
||||||
|
|
|
@ -573,6 +573,10 @@ static void seat_view_destroy(struct roots_seat_view *seat_view) {
|
||||||
seat->cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
|
seat->cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (seat_view == seat->cursor->pointer_view) {
|
||||||
|
seat->cursor->pointer_view = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
wl_list_remove(&seat_view->view_destroy.link);
|
wl_list_remove(&seat_view->view_destroy.link);
|
||||||
wl_list_remove(&seat_view->link);
|
wl_list_remove(&seat_view->link);
|
||||||
free(seat_view);
|
free(seat_view);
|
||||||
|
|
Loading…
Reference in a new issue