diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2018-07-29 20:02:00 +0300 |
---|---|---|
committer | Ilia Bozhinov <ammen99@gmail.com> | 2018-07-29 21:58:33 +0300 |
commit | 2e6eb097b6e23b8923bbfc68b1843d5ccde1955b (patch) | |
tree | c233864ae1c86a68df205d6a8ead79613f54796f /rootston/xdg_shell.c | |
parent | f1b65b34a6caff8db7c729b6362ec57f2707aa1a (diff) |
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
Diffstat (limited to 'rootston/xdg_shell.c')
-rw-r--r-- | rootston/xdg_shell.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c index d04d37e1..0c438be4 100644 --- a/rootston/xdg_shell.c +++ b/rootston/xdg_shell.c @@ -6,6 +6,7 @@ #include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_xdg_shell.h> #include <wlr/util/log.h> +#include "rootston/cursor.h" #include "rootston/desktop.h" #include "rootston/input.h" #include "rootston/server.h" @@ -33,6 +34,7 @@ static void popup_handle_destroy(struct wl_listener *listener, void *data) { static void popup_handle_map(struct wl_listener *listener, void *data) { struct roots_xdg_popup *popup = wl_container_of(listener, popup, map); view_damage_whole(popup->view_child.view); + input_update_cursor_focus(popup->view_child.view->desktop->server->input); } static void popup_handle_unmap(struct wl_listener *listener, void *data) { |