55 lines
2.2 KiB
Diff
55 lines
2.2 KiB
Diff
From c80438f489b941496084e196aa2003077121e17e Mon Sep 17 00:00:00 2001
|
|
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
Date: Wed, 9 Oct 2024 11:37:57 +0200
|
|
Subject: [PATCH 09/10] 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>
|
|
(cherry picked from commit 9927eaa9638c4e678adeb8dbb39b5fbee7a00c86)
|
|
---
|
|
src/wayland/meta-wayland-xdg-shell.c | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
|
|
index 249f08b6dc..5ef548723a 100644
|
|
--- a/src/wayland/meta-wayland-xdg-shell.c
|
|
+++ b/src/wayland/meta-wayland-xdg-shell.c
|
|
@@ -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;
|
|
--
|
|
2.49.0
|
|
|