mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
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
This commit is contained in:
parent
754179dacd
commit
ebecc5404b
4 changed files with 95 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue