wayland: Emit the configure signal
Emit the configure signal from the xdg_toplevel's apply_state function. A plugin gets a chance to tweak the initial configuration before it gets applied. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4076>
This commit is contained in:
parent
c597feaa67
commit
9927eaa963
@ -27,6 +27,7 @@
|
||||
#include "compositor/compositor-private.h"
|
||||
#include "core/boxes-private.h"
|
||||
#include "core/window-private.h"
|
||||
#include "meta/meta-window-config.h"
|
||||
#include "wayland/meta-wayland-outputs.h"
|
||||
#include "wayland/meta-wayland-popup.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
@ -877,6 +878,7 @@ meta_wayland_xdg_toplevel_apply_state (MetaWaylandSurfaceRole *surface_role,
|
||||
if (!xdg_surface_priv->configure_sent)
|
||||
{
|
||||
MetaWaylandWindowConfiguration *configuration;
|
||||
g_autoptr (MetaWindowConfig) window_config = NULL;
|
||||
int bounds_width, bounds_height, geometry_scale;
|
||||
MtkRectangle rect;
|
||||
|
||||
@ -908,6 +910,14 @@ meta_wayland_xdg_toplevel_apply_state (MetaWaylandSurfaceRole *surface_role,
|
||||
geometry_scale);
|
||||
}
|
||||
|
||||
window_config =
|
||||
meta_window_config_new_from_wayland_window_configuration (window,
|
||||
configuration);
|
||||
meta_window_emit_configure (window, window_config);
|
||||
meta_wayland_window_configuration_apply_window_config (window,
|
||||
configuration,
|
||||
window_config);
|
||||
|
||||
meta_wayland_xdg_toplevel_send_configure (xdg_toplevel, configuration);
|
||||
meta_wayland_window_configuration_free (configuration);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user