diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-11-07 22:08:40 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-11-23 10:58:50 +0100 |
commit | ebecc5404b899b462f4c414663780ba72adbab28 (patch) | |
tree | 3b0db34e8adb8f48c0bab0092f240c0ac241d5cd /include/wlr | |
parent | 754179dacd4c8cbd06d6c646cda9c5e23edcb707 (diff) |
surface: Make send_enter store entered outputs
wlr_surface_send_enter now stores outputs that have been entered.
Combined with a new 'bind' event on wlr_output, this allows us to delay
enter events as necessary until the respective wl_output global has been
bound.
Closes: https://github.com/swaywm/wlroots/issues/2466
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_output.h | 7 | ||||
-rw-r--r-- | include/wlr/types/wlr_surface.h | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index cb742706..8cc4afcf 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -166,6 +166,8 @@ struct wlr_output { struct wl_signal commit; // wlr_output_event_commit // Emitted right after the buffer has been presented to the user struct wl_signal present; // wlr_output_event_present + // Emitted after a client bound the wl_output global + struct wl_signal bind; // wlr_output_event_bind struct wl_signal enable; struct wl_signal mode; struct wl_signal scale; @@ -233,6 +235,11 @@ struct wlr_output_event_present { uint32_t flags; // enum wlr_output_present_flag }; +struct wlr_output_event_bind { + struct wlr_output *output; + struct wl_resource *resource; +}; + struct wlr_surface; /** diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 2cd4ac5d..abb05600 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -67,6 +67,15 @@ struct wlr_surface_role { void (*precommit)(struct wlr_surface *surface); }; +struct wlr_surface_output { + struct wlr_surface *surface; + struct wlr_output *output; + + struct wl_list link; // wlr_surface::current_outputs + struct wl_listener bind; + struct wl_listener destroy; +}; + struct wlr_surface { struct wl_resource *resource; struct wlr_renderer *renderer; @@ -126,6 +135,8 @@ struct wlr_surface { // wlr_subsurface::parent_pending_link struct wl_list subsurface_pending_list; + struct wl_list current_outputs; // wlr_surface_output::link + struct wl_listener renderer_destroy; void *data; |