mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-04 04:06:09 -05:00
xwayland: add set_size_hints signal
Currently there is no way for the compositor to be notified when an Xwayland client sets/modifies its size hints.
This commit is contained in:
parent
ba76d37b0b
commit
f735439543
2 changed files with 5 additions and 0 deletions
|
|
@ -221,6 +221,7 @@ struct wlr_xwayland_surface {
|
|||
struct wl_signal set_startup_id;
|
||||
struct wl_signal set_window_type;
|
||||
struct wl_signal set_hints;
|
||||
struct wl_signal set_size_hints;
|
||||
struct wl_signal set_decorations;
|
||||
struct wl_signal set_strut_partial;
|
||||
struct wl_signal set_override_redirect;
|
||||
|
|
|
|||
|
|
@ -239,6 +239,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
|
|||
wl_signal_init(&surface->events.set_startup_id);
|
||||
wl_signal_init(&surface->events.set_window_type);
|
||||
wl_signal_init(&surface->events.set_hints);
|
||||
wl_signal_init(&surface->events.set_size_hints);
|
||||
wl_signal_init(&surface->events.set_decorations);
|
||||
wl_signal_init(&surface->events.set_strut_partial);
|
||||
wl_signal_init(&surface->events.set_override_redirect);
|
||||
|
|
@ -601,6 +602,7 @@ static void xwayland_surface_destroy(struct wlr_xwayland_surface *xsurface) {
|
|||
assert(wl_list_empty(&xsurface->events.set_startup_id.listener_list));
|
||||
assert(wl_list_empty(&xsurface->events.set_window_type.listener_list));
|
||||
assert(wl_list_empty(&xsurface->events.set_hints.listener_list));
|
||||
assert(wl_list_empty(&xsurface->events.set_size_hints.listener_list));
|
||||
assert(wl_list_empty(&xsurface->events.set_decorations.listener_list));
|
||||
assert(wl_list_empty(&xsurface->events.set_strut_partial.listener_list));
|
||||
assert(wl_list_empty(&xsurface->events.set_override_redirect.listener_list));
|
||||
|
|
@ -951,6 +953,8 @@ static void read_surface_normal_hints(struct wlr_xwm *xwm,
|
|||
xsurface->size_hints->max_width = -1;
|
||||
xsurface->size_hints->max_height = -1;
|
||||
}
|
||||
|
||||
wl_signal_emit_mutable(&xsurface->events.set_size_hints, NULL);
|
||||
}
|
||||
|
||||
#define MWM_HINTS_FLAGS_FIELD 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue