You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.7 KiB
49 lines
1.7 KiB
1 month ago
|
From 0fe26e5b6d1e6f03a99623edf6a6f4c6caa2e142 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@redhat.com>
|
||
|
Date: Tue, 15 Oct 2024 14:56:33 +0200
|
||
|
Subject: [PATCH 1/2] wayland/wl-shell: Make sure created window has a proper
|
||
|
size
|
||
|
|
||
|
The wl_shell_window construction is a bit messy, and was not properly
|
||
|
resizing when a window was created after a buffer was attached. This,
|
||
|
when the window was the dummy window in wl-paste, caused a SIGFPE as the
|
||
|
window was incorrectly assumed to be 0x0, i.e. size being 0.
|
||
|
---
|
||
|
src/wayland/meta-wayland-wl-shell.c | 6 ++++--
|
||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/wayland/meta-wayland-wl-shell.c b/src/wayland/meta-wayland-wl-shell.c
|
||
|
index 964c185b23..51d88cea2b 100644
|
||
|
--- a/src/wayland/meta-wayland-wl-shell.c
|
||
|
+++ b/src/wayland/meta-wayland-wl-shell.c
|
||
|
@@ -481,7 +481,7 @@ sync_wl_shell_parent_relationship (MetaWaylandSurface *surface,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-static void
|
||
|
+static MetaWindow *
|
||
|
create_wl_shell_surface_window (MetaWaylandSurface *surface)
|
||
|
{
|
||
|
MetaWaylandWlShellSurface *wl_shell_surface =
|
||
|
@@ -513,6 +513,8 @@ create_wl_shell_surface_window (MetaWaylandSurface *surface)
|
||
|
if (meta_wayland_surface_get_window (child))
|
||
|
sync_wl_shell_parent_relationship (child, surface);
|
||
|
}
|
||
|
+
|
||
|
+ return window;
|
||
|
}
|
||
|
|
||
|
static void
|
||
|
@@ -597,7 +599,7 @@ wl_shell_surface_role_apply_state (MetaWaylandSurfaceRole *surface_role,
|
||
|
* convenient for us. */
|
||
|
if (surface->buffer_ref->buffer && !window)
|
||
|
{
|
||
|
- create_wl_shell_surface_window (surface);
|
||
|
+ window = create_wl_shell_surface_window (surface);
|
||
|
}
|
||
|
else if (!surface->buffer_ref->buffer && window)
|
||
|
{
|
||
|
--
|
||
|
2.44.0.501.g19981daefd.dirty
|
||
|
|