diff options
author | emersion <contact@emersion.fr> | 2018-04-06 10:26:32 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-04-06 10:26:32 -0400 |
commit | 290c9162901008d306b68566e4a5c2a778d19db8 (patch) | |
tree | 4323a9130346ca4d836b0ae70c03877e13310bfc /sway/desktop | |
parent | Avoid arranging windows while reloading config (diff) | |
download | sway-290c9162901008d306b68566e4a5c2a778d19db8.tar.gz sway-290c9162901008d306b68566e4a5c2a778d19db8.tar.zst sway-290c9162901008d306b68566e4a5c2a778d19db8.zip |
Send surface enter/leave events to view children
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 10 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index c66cc39a..8361aab3 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -118,6 +118,15 @@ static void set_activated(struct sway_view *view, bool activated) { | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | static void for_each_surface(struct sway_view *view, | ||
122 | wlr_surface_iterator_func_t iterator, void *user_data) { | ||
123 | if (xdg_shell_v6_view_from_view(view) == NULL) { | ||
124 | return; | ||
125 | } | ||
126 | wlr_xdg_surface_v6_for_each_surface(view->wlr_xdg_surface_v6, iterator, | ||
127 | user_data); | ||
128 | } | ||
129 | |||
121 | static void _close(struct sway_view *view) { | 130 | static void _close(struct sway_view *view) { |
122 | if (xdg_shell_v6_view_from_view(view) == NULL) { | 131 | if (xdg_shell_v6_view_from_view(view) == NULL) { |
123 | return; | 132 | return; |
@@ -146,6 +155,7 @@ static const struct sway_view_impl view_impl = { | |||
146 | .get_prop = get_prop, | 155 | .get_prop = get_prop, |
147 | .configure = configure, | 156 | .configure = configure, |
148 | .set_activated = set_activated, | 157 | .set_activated = set_activated, |
158 | .for_each_surface = for_each_surface, | ||
149 | .close = _close, | 159 | .close = _close, |
150 | .destroy = destroy, | 160 | .destroy = destroy, |
151 | }; | 161 | }; |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index e3da1da7..10bfcc89 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -58,6 +58,9 @@ static void unmanaged_handle_map(struct wl_listener *listener, void *data) { | |||
58 | surface->lx = xsurface->x; | 58 | surface->lx = xsurface->x; |
59 | surface->ly = xsurface->y; | 59 | surface->ly = xsurface->y; |
60 | desktop_damage_whole_surface(xsurface->surface, surface->lx, surface->ly); | 60 | desktop_damage_whole_surface(xsurface->surface, surface->lx, surface->ly); |
61 | |||
62 | // TODO: we don't send surface enter/leave events to xwayland unmanaged | ||
63 | // surfaces, but xwayland doesn't support HiDPI anyway | ||
61 | } | 64 | } |
62 | 65 | ||
63 | static void unmanaged_handle_unmap(struct wl_listener *listener, void *data) { | 66 | static void unmanaged_handle_unmap(struct wl_listener *listener, void *data) { |