mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-07 13:29:49 -05:00
rootston: focus newly-created surfaces
Whenever a new surface is created, we have to update the cursor focus, even if there's no input event. So, we generate one motion event, and reuse the code to update the proper cursor focus. We need to do this for all surface roles - toplevels, popups, subsurfaces. Fixes #1162
This commit is contained in:
parent
f1b65b34a6
commit
2e6eb097b6
8 changed files with 37 additions and 11 deletions
|
|
@ -423,6 +423,7 @@ struct roots_subsurface *subsurface_create(struct roots_view *view,
|
|||
view_child_init(&subsurface->view_child, view, wlr_subsurface->surface);
|
||||
subsurface->destroy.notify = subsurface_handle_destroy;
|
||||
wl_signal_add(&wlr_subsurface->events.destroy, &subsurface->destroy);
|
||||
input_update_cursor_focus(view->desktop->server->input);
|
||||
return subsurface;
|
||||
}
|
||||
|
||||
|
|
@ -468,6 +469,7 @@ void view_map(struct roots_view *view, struct wlr_surface *surface) {
|
|||
|
||||
wl_list_insert(&view->desktop->views, &view->link);
|
||||
view_damage_whole(view);
|
||||
input_update_cursor_focus(view->desktop->server->input);
|
||||
}
|
||||
|
||||
void view_unmap(struct roots_view *view) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue