[gtk: 1/2] x11: fix crash on idle compute size without layout
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] x11: fix crash on idle compute size without layout
- Date: Wed, 6 Jan 2021 22:13:03 +0000 (UTC)
commit 53af35d25636118ad513b21fee670b38b0c2a814
Author: Rafostar <40623528+Rafostar users noreply github com>
Date: Sun Jan 3 18:02:31 2021 +0100
x11: fix crash on idle compute size without layout
On x11 toplevel layout is not created before toplevel
is presented, but GTK tries to update it on idle
which leads to a crash due to accessing property
of undefined object. Treat soon to be created layout
as a layout with default values upon creation (resizable).
gdk/x11/gdksurface-x11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index d67dacf77c..207c34e419 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -291,7 +291,7 @@ compute_toplevel_size (GdkSurface *surface,
GdkGeometry geometry;
GdkSurfaceHints mask;
- if (gdk_toplevel_layout_get_resizable (impl->toplevel_layout))
+ if (!impl->toplevel_layout || gdk_toplevel_layout_get_resizable (impl->toplevel_layout))
{
geometry.min_width = size.min_width;
geometry.min_height = size.min_height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]