Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gtk-layer-shell for openSUSE:Factory
checked in at 2026-04-07 16:34:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gtk-layer-shell (Old)
and /work/SRC/openSUSE:Factory/.gtk-layer-shell.new.21863 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gtk-layer-shell"
Tue Apr 7 16:34:24 2026 rev:18 rq:1344922 version:0.10.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/gtk-layer-shell/gtk-layer-shell.changes
2025-10-30 17:11:14.198223591 +0100
+++
/work/SRC/openSUSE:Factory/.gtk-layer-shell.new.21863/gtk-layer-shell.changes
2026-04-07 16:50:56.921604690 +0200
@@ -1,0 +2,10 @@
+Tue Apr 7 09:01:45 UTC 2026 - Michael Vetter <[email protected]>
+
+- Update to 0.10.1:
+ * Fix: unmap when surface is immediately requested to close after opening
#218
+ * Fix: time out after 1 second of waiting for configure #220
+ * Fix: edge cases around montiros changing while being mapped #221
+ * gtk-priv: rename ast.py -> c_ast.py to avoid name collision with std lib
+ * Compat: bump supported GTK to v3.24.52
+
+-------------------------------------------------------------------
Old:
----
v0.10.0.tar.gz
New:
----
v0.10.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gtk-layer-shell.spec ++++++
--- /var/tmp/diff_new_pack.A4Hb5A/_old 2026-04-07 16:50:57.505628889 +0200
+++ /var/tmp/diff_new_pack.A4Hb5A/_new 2026-04-07 16:50:57.509629055 +0200
@@ -1,7 +1,7 @@
#
# spec file for package gtk-layer-shell
#
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: gtk-layer-shell
-Version: 0.10.0
+Version: 0.10.1
Release: 0
Summary: Library to create desktop components for Wayland
License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT
@@ -34,7 +34,7 @@
BuildRequires: pkgconfig(gdk-wayland-3.0)
BuildRequires: pkgconfig(gdk-x11-3.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
-BuildRequires: pkgconfig(gtk+-3.0) >= 3.24.44
+BuildRequires: pkgconfig(gtk+-3.0) >= 3.24.52
BuildRequires: pkgconfig(gtk+-broadway-3.0)
BuildRequires: pkgconfig(gtk+-wayland-3.0)
BuildRequires: pkgconfig(gtk+-x11-3.0)
++++++ v0.10.0.tar.gz -> v0.10.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/CHANGELOG.md
new/gtk-layer-shell-0.10.1/CHANGELOG.md
--- old/gtk-layer-shell-0.10.0/CHANGELOG.md 2025-10-29 21:43:54.000000000
+0100
+++ new/gtk-layer-shell-0.10.1/CHANGELOG.md 2026-04-04 05:37:50.000000000
+0200
@@ -2,6 +2,13 @@
## [Unreleased]
+## [0.10.1] - 3 Apr 2026
+- Fix: unmap when surface is immediately requested to close after opening,
[218](https://github.com/wmww/gtk-layer-shell/pull/218)
+- Fix: time out after 1 second of waiting for configure,
[220](https://github.com/wmww/gtk-layer-shell/pull/220)
+- Fix: edge cases around montiros changing while being mapped,
[221](https://github.com/wmww/gtk-layer-shell/pull/221)
+- gtk-priv: rename ast.py -> c_ast.py to avoid name collision with std lib
+- Compat: bump supported GTK to v3.24.52
+
## [0.10.0] - 29 Oct 2025
- API: add `gtk_layer_set_respect_close()`/`gtk_layer_get_respect_close()`
- Fix: ignore `.closed` event by default,
[209](https://github.com/wmww/gtk-layer-shell/issues/209)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/README.md
new/gtk-layer-shell-0.10.1/README.md
--- old/gtk-layer-shell-0.10.0/README.md 2025-10-29 21:43:54.000000000
+0100
+++ new/gtk-layer-shell-0.10.1/README.md 2026-04-04 05:37:50.000000000
+0200
@@ -1,6 +1,6 @@
# GTK Layer Shell (GTK3 version)
-__This project is complete and in maintenance mode.__ It will continue to
receive fixes and updates to new GTK3 versions for the foreseeable future, but
minimal development beyond that. New fetures will only be merged if they are
critical for existing apps and don't threaten stability. New projects are
recommended to use GTK4 instead.
+__This project is complete and in maintenance mode.__ It will continue to
receive fixes and updates to new GTK3 versions for the foreseeable future, but
minimal development beyond that. New features will only be merged if they are
critical for existing apps and don't threaten stability. New projects are
recommended to use GTK4 instead.

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/compatibility.md
new/gtk-layer-shell-0.10.1/compatibility.md
--- old/gtk-layer-shell-0.10.0/compatibility.md 2025-10-29 21:43:54.000000000
+0100
+++ new/gtk-layer-shell-0.10.1/compatibility.md 2026-04-04 05:37:50.000000000
+0200
@@ -33,4 +33,5 @@
| __v0.9.1__ | v3.20.0 - v3.24.49 | v3.24.49 | - |
| __v0.9.2__ | v3.20.0 - v3.24.49 | v3.24.51 | - |
| __v0.10.0__| v3.20.0 - v3.24.51 | v3.24.51 | - |
-| __master__ | v3.20.0 - v3.24.51 | v3.24.51 | - |
+| __v0.10.1__| v3.20.0 - v3.24.52 | v3.24.52 | - |
+| __master__ | v3.20.0 - v3.24.52 | v3.24.52 | - |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_pointer_data_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_pointer_data_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_pointer_data_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_pointer_data_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 2009 Carlos Garnacho <[email protected]>
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -54,7 +54,7 @@
// Version ID 1
// Diff from previous version:
// + struct wp_cursor_shape_device_v1 *shape_device;
-// Valid for GTK v3.24.49 - v3.24.52 (unreleased)
+// Valid for GTK v3.24.49 - v3.24.53 (unreleased)
struct _GdkWaylandPointerData_v3_24_49
{
GdkWindow *focus;
@@ -172,6 +172,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_pointer_frame_data_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_pointer_frame_data_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_pointer_frame_data_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_pointer_frame_data_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 2009 Carlos Garnacho <[email protected]>
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@
typedef struct _GdkWaylandPointerFrameData GdkWaylandPointerFrameData;
// Version ID 0
-// Valid for GTK v3.22.0 - v3.24.52 (unreleased)
+// Valid for GTK v3.22.0 - v3.24.53 (unreleased)
struct _GdkWaylandPointerFrameData_v3_22_0
{
GdkEvent *event;
@@ -136,6 +136,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_seat_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_seat_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_seat_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_seat_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 2009 Carlos Garnacho <[email protected]>
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -272,7 +272,7 @@
// - struct _GdkWaylandPointerData_v3_22_0 touch_info;
// + struct _GdkWaylandPointerData_v3_24_49 pointer_info;
// + struct _GdkWaylandPointerData_v3_24_49 touch_info;
-// Valid for GTK v3.24.49 - v3.24.52 (unreleased)
+// Valid for GTK v3.24.49 - v3.24.53 (unreleased)
struct _GdkWaylandSeat_v3_24_49
{
GdkSeat parent_instance;
@@ -424,6 +424,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_tablet_data_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_tablet_data_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_tablet_data_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_tablet_data_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 2009 Carlos Garnacho <[email protected]>
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -76,7 +76,7 @@
// Version ID 2
// Diff from previous version:
// + GList *events;
-// Valid for GTK v3.24.51 - v3.24.52 (unreleased)
+// Valid for GTK v3.24.51 - v3.24.53 (unreleased)
struct _GdkWaylandTabletData_v3_24_51
{
struct zwp_tablet_v2 *wp_tablet;
@@ -192,6 +192,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_touch_data_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_touch_data_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_wayland_touch_data_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_wayland_touch_data_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 2009 Carlos Garnacho <[email protected]>
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@
typedef struct _GdkWaylandTouchData GdkWaylandTouchData;
// Version ID 0
-// Valid for GTK v3.22.0 - v3.24.52 (unreleased)
+// Valid for GTK v3.22.0 - v3.24.53 (unreleased)
struct _GdkWaylandTouchData_v3_22_0
{
uint32_t id;
@@ -135,6 +135,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_class_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_class_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_class_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_class_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -129,7 +129,7 @@
// Version ID 1
// Diff from previous version:
// + gboolean (* titlebar_gesture) (GdkWindow *window, GdkTitlebarGesture
gesture);
-// Valid for GTK v3.24.35 - v3.24.52 (unreleased)
+// Valid for GTK v3.24.35 - v3.24.53 (unreleased)
struct _GdkWindowImplClass_v3_24_35
{
GObjectClass parent_class;
@@ -322,6 +322,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@
typedef struct _GdkWindowImpl GdkWindowImpl;
// Version ID 0
-// Valid for GTK v3.22.0 - v3.24.52 (unreleased)
+// Valid for GTK v3.22.0 - v3.24.53 (unreleased)
struct _GdkWindowImpl_v3_22_0
{
GObject parent;
@@ -130,6 +130,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_wayland_class_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_wayland_class_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_wayland_class_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_wayland_class_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright © 2010 Intel Corporation
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -39,7 +39,7 @@
// Diff from previous version:
// - struct _GdkWindowImplClass_v3_22_0 parent_class;
// + struct _GdkWindowImplClass_v3_24_35 parent_class;
-// Valid for GTK v3.24.35 - v3.24.52 (unreleased)
+// Valid for GTK v3.24.35 - v3.24.53 (unreleased)
struct _GdkWindowImplWaylandClass_v3_24_35
{
struct _GdkWindowImplClass_v3_24_35 parent_class;
@@ -140,6 +140,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_wayland_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_wayland_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_impl_wayland_priv.h
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_impl_wayland_priv.h
2026-04-04 05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright © 2010 Intel Corporation
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1201,7 +1201,7 @@
// - struct zxdg_imported_v1 *imported_transient_for;
// + struct zxdg_imported_v1 *imported_v1_transient_for;
// + struct zxdg_imported_v2 *imported_v2_transient_for;
-// Valid for GTK v3.24.44 - v3.24.52 (unreleased)
+// Valid for GTK v3.24.44 - v3.24.53 (unreleased)
struct _GdkWindowImplWayland_v3_24_44
{
struct _GdkWindowImpl_v3_22_0 parent_instance;
@@ -1401,6 +1401,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_priv.h
new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_priv.h
--- old/gtk-layer-shell-0.10.0/gtk-priv/h/gdk_window_priv.h 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/h/gdk_window_priv.h 2026-04-04
05:37:50.000000000 +0200
@@ -4,7 +4,7 @@
* This file is part of gtk-layer-shell
*
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright © 2025 gtk-priv/scripts/code.py
+ * Copyright © 2026 gtk-priv/scripts/code.py
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -205,7 +205,7 @@
// Diff from previous version:
// + guint synthesized_crossing_event_id;
// - guint synthesize_crossing_event_queued : 1;
-// Valid for GTK v3.24.11 - v3.24.52 (unreleased)
+// Valid for GTK v3.24.11 - v3.24.53 (unreleased)
struct _GdkWindow_v3_24_11
{
GObject parent_instance;
@@ -385,6 +385,7 @@
case 24049:
case 24050:
case 24051:
+ case 24052:
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/gtk-priv/scripts/ast.py
new/gtk-layer-shell-0.10.1/gtk-priv/scripts/ast.py
--- old/gtk-layer-shell-0.10.0/gtk-priv/scripts/ast.py 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/scripts/ast.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,257 +0,0 @@
-'''
-MIT License
-
-Copyright 2020 Sophie Winter
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-'''
-
-import logging
-import re
-
-from version import Version
-import code
-
-logger = logging.getLogger(__name__)
-
-def remove_comments(code):
- return re.sub(r'(/\*.*?\*/|//.*?\n)', '', code, flags=re.DOTALL)
-
-# These can be combined in any order, we do not check that it is valid
-std_types = set([
- 'void',
- 'int',
- 'char',
- 'signed',
- 'unsigned',
- 'short',
- 'long',
- 'float',
- 'double',
- 'uint32_t',
- 'gint',
- 'guint',
- 'gchar',
- 'gboolean',
- 'gpointer',
-])
-
-def is_std_type(name):
- for i in name.split():
- if not i in std_types:
- return False
- return True
-
-class CType:
- def __str__(self):
- return self.str_left(False) + self.str_right(False)
-
- def str_right(self, resolved):
- return ''
-
- def __eq__(self, other):
- return str(self) == str(other)
-
-class StdType(CType):
- def __init__(self, name):
- assert isinstance(name, str)
- assert is_std_type(name), name
- self.name = name
-
- def resolve(self, ctx):
- pass
-
- def str_left(self, resolved):
- return self.name
-
-class CustomType(CType):
- def __init__(self, name):
- assert isinstance(name, str)
- self.explicit_struct = False
- if name.startswith('struct'):
- name = name[6:].strip()
- self.explicit_struct = True
- self.explicit_enum = False
- if name.startswith('enum'):
- name = name[4:].strip()
- self.explicit_enum = True
- self.name = name
- self.version = None
- self.resolved_struct = None
-
- def resolve(self, ctx):
- if self.explicit_enum:
- struct = None
- elif self.explicit_struct:
- struct = ctx.project.lookup_struct_name(self.name)
- else:
- struct = ctx.project.lookup_typedef(self.name)
-
- if struct:
- self.resolved_struct = struct
- self.version = ctx.version
-
- def str_left(self, resolved):
- if self.resolved_struct and resolved:
- v = self.resolved_struct.lookup_version(self.version)
- return 'struct ' + v.versioned_struct_name()
- else:
- result = ''
- if self.explicit_struct:
- result += 'struct '
- if self.explicit_enum:
- result += 'enum '
- result += self.name
- return result
-
-class PtrType(CType):
- def __init__(self, inner):
- assert isinstance(inner, CType)
- self.inner = inner
-
- def resolve(self, ctx):
- self.inner.resolve(ctx)
-
- def str_left(self, resolved):
- result = self.inner.str_left(False)
- if not isinstance(self.inner, PtrType):
- result += ' '
- result += '*'
- return result
-
- def str_right(self, resolved):
- return self.inner.str_right(False)
-
-class ConstType(CType):
- def __init__(self, inner):
- assert isinstance(inner, CType)
- self.inner = inner
-
- def resolve(self, ctx):
- self.inner.resolve(ctx)
-
- def str_left(self, resolved):
- return 'const ' + self.inner.str_left(resolved)
-
- def str_right(self, resolved):
- return self.inner.str_right(resolved)
-
-# Note the first (and usually only) layer of "pointer" is consumed by this type
-# Do not wrap in a PtrType in most cases
-class FpType(CType):
- def __init__(self, return_type, arg_list):
- assert isinstance(return_type, CType)
- assert isinstance(arg_list, list)
- for i in arg_list:
- assert isinstance(i, PropertyNode), str(i) + ' is not a property
node'
- self.return_type = return_type
- self.arg_list = arg_list
-
- def resolve(self, ctx):
- self.return_type.resolve(ctx)
- for arg in self.arg_list:
- arg.resolve(ctx)
-
- def str_left(self, resolved):
- return str(self.return_type) + ' (*'
-
- def str_right(self, resolved):
- return ') (' + str(', '.join([str(t) for t in self.arg_list])) + ')'
-
-class ArrayType(CType):
- def __init__(self, inner, size):
- assert isinstance(inner, CType)
- assert isinstance(size, str)
- self.inner = inner
- self.size = size
-
- def resolve(self, ctx):
- self.inner.resolve(ctx)
-
- def str_left(self, resolved):
- if resolved:
- return self.inner.str_left(True)
- else:
- return self.inner.str_left(False) + '*'
-
- def str_right(self, resolved):
- if resolved:
- return '[' + self.size + ']' + self.inner.str_right(True)
- else:
- return self.inner.str_right(False)
-
-class AstNode:
- def __eq__(self, other):
- return str(self) == str(other)
-
-class PropertyNode(AstNode):
- def __init__(self, c_type, name, bit_field):
- assert isinstance(c_type, CType)
- assert name is None or isinstance(name, str)
- assert bit_field is None or isinstance(bit_field, int)
- self.c_type = c_type
- self.name = name
- self.statement = False
- self.bit_field = bit_field
-
- def resolve(self, ctx):
- self.c_type.resolve(ctx)
-
- def get_property_list(self, prefix):
- return [(self.c_type, prefix + self.name)]
-
- def __str__(self):
- result = self.c_type.str_left(True)
- if self.name:
- if not isinstance(self.c_type, PtrType):
- result += ' '
- result += self.name
- result += self.c_type.str_right(True)
- if self.bit_field:
- result += ' : ' + str(self.bit_field)
- if self.statement:
- result += ';\n'
- return result
-
-class ListNode(AstNode):
- def __init__(self, nodes):
- assert isinstance(nodes, list)
- for node in nodes:
- assert isinstance(node, AstNode)
- self.nodes = nodes
-
- def resolve(self, ctx):
- for node in self.nodes:
- node.resolve(ctx)
-
- def get_property_list(self, prefix):
- result = []
- for node in self.nodes:
- result += node.get_property_list(prefix)
- return result
-
- def __str__(self):
- return ''.join(str(node) for node in self.nodes)
-
-class SubStructNode(AstNode):
- def __init__(self, name, content):
- assert isinstance(name, str)
- assert isinstance(content, AstNode)
- self.name = name
- self.content = content
-
- def resolve(self, ctx):
- self.content.resolve(ctx)
-
- def get_property_list(self, prefix):
- return self.content.get_property_list(prefix + self.name + '.')
-
- def __str__(self):
- return (
- 'struct {' +
- ('\n' + code.INDENT).join([''] + str(self.content).splitlines()) +
- '\n} ' + self.name + ';\n')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/gtk-priv/scripts/c_ast.py
new/gtk-layer-shell-0.10.1/gtk-priv/scripts/c_ast.py
--- old/gtk-layer-shell-0.10.0/gtk-priv/scripts/c_ast.py 1970-01-01
01:00:00.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/scripts/c_ast.py 2026-04-04
05:37:50.000000000 +0200
@@ -0,0 +1,257 @@
+'''
+MIT License
+
+Copyright 2020 Sophie Winter
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+'''
+
+import logging
+import re
+
+from version import Version
+import code
+
+logger = logging.getLogger(__name__)
+
+def remove_comments(code):
+ return re.sub(r'(/\*.*?\*/|//.*?\n)', '', code, flags=re.DOTALL)
+
+# These can be combined in any order, we do not check that it is valid
+std_types = set([
+ 'void',
+ 'int',
+ 'char',
+ 'signed',
+ 'unsigned',
+ 'short',
+ 'long',
+ 'float',
+ 'double',
+ 'uint32_t',
+ 'gint',
+ 'guint',
+ 'gchar',
+ 'gboolean',
+ 'gpointer',
+])
+
+def is_std_type(name):
+ for i in name.split():
+ if not i in std_types:
+ return False
+ return True
+
+class CType:
+ def __str__(self):
+ return self.str_left(False) + self.str_right(False)
+
+ def str_right(self, resolved):
+ return ''
+
+ def __eq__(self, other):
+ return str(self) == str(other)
+
+class StdType(CType):
+ def __init__(self, name):
+ assert isinstance(name, str)
+ assert is_std_type(name), name
+ self.name = name
+
+ def resolve(self, ctx):
+ pass
+
+ def str_left(self, resolved):
+ return self.name
+
+class CustomType(CType):
+ def __init__(self, name):
+ assert isinstance(name, str)
+ self.explicit_struct = False
+ if name.startswith('struct'):
+ name = name[6:].strip()
+ self.explicit_struct = True
+ self.explicit_enum = False
+ if name.startswith('enum'):
+ name = name[4:].strip()
+ self.explicit_enum = True
+ self.name = name
+ self.version = None
+ self.resolved_struct = None
+
+ def resolve(self, ctx):
+ if self.explicit_enum:
+ struct = None
+ elif self.explicit_struct:
+ struct = ctx.project.lookup_struct_name(self.name)
+ else:
+ struct = ctx.project.lookup_typedef(self.name)
+
+ if struct:
+ self.resolved_struct = struct
+ self.version = ctx.version
+
+ def str_left(self, resolved):
+ if self.resolved_struct and resolved:
+ v = self.resolved_struct.lookup_version(self.version)
+ return 'struct ' + v.versioned_struct_name()
+ else:
+ result = ''
+ if self.explicit_struct:
+ result += 'struct '
+ if self.explicit_enum:
+ result += 'enum '
+ result += self.name
+ return result
+
+class PtrType(CType):
+ def __init__(self, inner):
+ assert isinstance(inner, CType)
+ self.inner = inner
+
+ def resolve(self, ctx):
+ self.inner.resolve(ctx)
+
+ def str_left(self, resolved):
+ result = self.inner.str_left(False)
+ if not isinstance(self.inner, PtrType):
+ result += ' '
+ result += '*'
+ return result
+
+ def str_right(self, resolved):
+ return self.inner.str_right(False)
+
+class ConstType(CType):
+ def __init__(self, inner):
+ assert isinstance(inner, CType)
+ self.inner = inner
+
+ def resolve(self, ctx):
+ self.inner.resolve(ctx)
+
+ def str_left(self, resolved):
+ return 'const ' + self.inner.str_left(resolved)
+
+ def str_right(self, resolved):
+ return self.inner.str_right(resolved)
+
+# Note the first (and usually only) layer of "pointer" is consumed by this type
+# Do not wrap in a PtrType in most cases
+class FpType(CType):
+ def __init__(self, return_type, arg_list):
+ assert isinstance(return_type, CType)
+ assert isinstance(arg_list, list)
+ for i in arg_list:
+ assert isinstance(i, PropertyNode), str(i) + ' is not a property
node'
+ self.return_type = return_type
+ self.arg_list = arg_list
+
+ def resolve(self, ctx):
+ self.return_type.resolve(ctx)
+ for arg in self.arg_list:
+ arg.resolve(ctx)
+
+ def str_left(self, resolved):
+ return str(self.return_type) + ' (*'
+
+ def str_right(self, resolved):
+ return ') (' + str(', '.join([str(t) for t in self.arg_list])) + ')'
+
+class ArrayType(CType):
+ def __init__(self, inner, size):
+ assert isinstance(inner, CType)
+ assert isinstance(size, str)
+ self.inner = inner
+ self.size = size
+
+ def resolve(self, ctx):
+ self.inner.resolve(ctx)
+
+ def str_left(self, resolved):
+ if resolved:
+ return self.inner.str_left(True)
+ else:
+ return self.inner.str_left(False) + '*'
+
+ def str_right(self, resolved):
+ if resolved:
+ return '[' + self.size + ']' + self.inner.str_right(True)
+ else:
+ return self.inner.str_right(False)
+
+class AstNode:
+ def __eq__(self, other):
+ return str(self) == str(other)
+
+class PropertyNode(AstNode):
+ def __init__(self, c_type, name, bit_field):
+ assert isinstance(c_type, CType)
+ assert name is None or isinstance(name, str)
+ assert bit_field is None or isinstance(bit_field, int)
+ self.c_type = c_type
+ self.name = name
+ self.statement = False
+ self.bit_field = bit_field
+
+ def resolve(self, ctx):
+ self.c_type.resolve(ctx)
+
+ def get_property_list(self, prefix):
+ return [(self.c_type, prefix + self.name)]
+
+ def __str__(self):
+ result = self.c_type.str_left(True)
+ if self.name:
+ if not isinstance(self.c_type, PtrType):
+ result += ' '
+ result += self.name
+ result += self.c_type.str_right(True)
+ if self.bit_field:
+ result += ' : ' + str(self.bit_field)
+ if self.statement:
+ result += ';\n'
+ return result
+
+class ListNode(AstNode):
+ def __init__(self, nodes):
+ assert isinstance(nodes, list)
+ for node in nodes:
+ assert isinstance(node, AstNode)
+ self.nodes = nodes
+
+ def resolve(self, ctx):
+ for node in self.nodes:
+ node.resolve(ctx)
+
+ def get_property_list(self, prefix):
+ result = []
+ for node in self.nodes:
+ result += node.get_property_list(prefix)
+ return result
+
+ def __str__(self):
+ return ''.join(str(node) for node in self.nodes)
+
+class SubStructNode(AstNode):
+ def __init__(self, name, content):
+ assert isinstance(name, str)
+ assert isinstance(content, AstNode)
+ self.name = name
+ self.content = content
+
+ def resolve(self, ctx):
+ self.content.resolve(ctx)
+
+ def get_property_list(self, prefix):
+ return self.content.get_property_list(prefix + self.name + '.')
+
+ def __str__(self):
+ return (
+ 'struct {' +
+ ('\n' + code.INDENT).join([''] + str(self.content).splitlines()) +
+ '\n} ' + self.name + ';\n')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/gtk-priv/scripts/code.py
new/gtk-layer-shell-0.10.1/gtk-priv/scripts/code.py
--- old/gtk-layer-shell-0.10.0/gtk-priv/scripts/code.py 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/scripts/code.py 2026-04-04
05:37:50.000000000 +0200
@@ -21,7 +21,7 @@
import subprocess
import parse
-from ast import *
+from c_ast import *
from version import COMBO_FACTOR, Version
logger = logging.getLogger(__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/gtk-priv/scripts/parse.py
new/gtk-layer-shell-0.10.1/gtk-priv/scripts/parse.py
--- old/gtk-layer-shell-0.10.0/gtk-priv/scripts/parse.py 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/gtk-priv/scripts/parse.py 2026-04-04
05:37:50.000000000 +0200
@@ -13,7 +13,7 @@
import logging
import re
-from ast import *
+from c_ast import *
logger = logging.getLogger(__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/meson.build
new/gtk-layer-shell-0.10.1/meson.build
--- old/gtk-layer-shell-0.10.0/meson.build 2025-10-29 21:43:54.000000000
+0100
+++ new/gtk-layer-shell-0.10.1/meson.build 2026-04-04 05:37:50.000000000
+0200
@@ -1,6 +1,6 @@
project('gtk-layer-shell',
['c'],
- version: '0.10.0',
+ version: '0.10.1',
license: 'LGPLv3',
meson_version: '>=0.54.0',
default_options: ['c_std=gnu11', 'warning_level=3'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/src/custom-shell-surface.c
new/gtk-layer-shell-0.10.1/src/custom-shell-surface.c
--- old/gtk-layer-shell-0.10.0/src/custom-shell-surface.c 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/src/custom-shell-surface.c 2026-04-04
05:37:50.000000000 +0200
@@ -78,15 +78,21 @@
// attached, so we don't need to commit. If this is removed,
test-window-with-initially-attached-buffer should fail.
wl_surface_attach (wl_surface, NULL, 0, 0);
- self->awaiting_configure = FALSE;
+ self->awaiting_initial_configure = FALSE;
self->virtual->map (self, wl_surface);
gdk_window_set_priv_mapped (gdk_window);
wl_surface_commit (wl_surface);
struct wl_display *display = gdk_wayland_display_get_wl_display
(gdk_display_get_default ());
- while (self->awaiting_configure) {
+ gint64 start_time_micro = g_get_monotonic_time();
+ while (self->awaiting_initial_configure) {
wl_display_roundtrip (display);
+ if (g_get_monotonic_time () > start_time_micro + 1000000) {
+ g_warning ("Timed out waiting for initial .configure");
+ gtk_widget_unmap (GTK_WIDGET (widget));
+ break;
+ }
}
}
@@ -202,6 +208,7 @@
// handle that ourselves.
GList* local_children = self->private->popup_children;
self->private->popup_children = NULL;
+ self->awaiting_initial_configure = FALSE;
while (local_children) {
custom_shell_surface_unmap (local_children->data);
local_children = g_list_remove_link (local_children, local_children);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/src/custom-shell-surface.h
new/gtk-layer-shell-0.10.1/src/custom-shell-surface.h
--- old/gtk-layer-shell-0.10.0/src/custom-shell-surface.h 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/src/custom-shell-surface.h 2026-04-04
05:37:50.000000000 +0200
@@ -47,7 +47,7 @@
{
CustomShellSurfaceVirtual const *virtual;
CustomShellSurfacePrivate *private;
- gboolean awaiting_configure;
+ gboolean awaiting_initial_configure;
};
// Usually called by the subclass constructors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/src/layer-surface.c
new/gtk-layer-shell-0.10.1/src/layer-surface.c
--- old/gtk-layer-shell-0.10.0/src/layer-surface.c 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/src/layer-surface.c 2026-04-04
05:37:50.000000000 +0200
@@ -110,7 +110,7 @@
LayerSurface *self = data;
zwlr_layer_surface_v1_ack_configure (surface, serial);
- self->super.awaiting_configure = FALSE;
+ self->super.awaiting_initial_configure = FALSE;
self->last_configure_size = (GtkRequisition) {
.width = (gint)w,
@@ -126,9 +126,16 @@
{
LayerSurface *self = data;
(void)_surface;
+ GtkWindow *gtk_window = custom_shell_surface_get_gtk_window
((CustomShellSurface *)self);
- if (self->respect_surface_closed) {
- GtkWindow *gtk_window = custom_shell_surface_get_gtk_window
((CustomShellSurface *)self);
+ if (self->super.awaiting_initial_configure) {
+ g_warning ("Compositor closed layer surface before sending initial
.configure");
+ // If we continue waiting for configure we probably just loop, if we
stop waiting for configure without
+ // unmapping we commit to an invalid surface. This sequence has the
highest chance of letting the app continue
+ // to run if that's what it wants to do.
+ gtk_widget_unmap (GTK_WIDGET(gtk_window));
+ self->remap_on_monitor_change = TRUE;
+ } else if (self->respect_surface_closed) {
gtk_window_close (gtk_window);
}
}
@@ -194,7 +201,8 @@
self->cached_layer_size.height);
}
zwlr_layer_surface_v1_add_listener (self->layer_surface,
&layer_surface_listener, self);
- self->super.awaiting_configure = TRUE;
+ self->super.awaiting_initial_configure = TRUE;
+ self->remap_on_monitor_change = FALSE;
}
static void
@@ -308,9 +316,12 @@
static void monitor_changed(GdkDisplay* self, GdkMonitor* monitor,
LayerSurface *layer_surface) {
(void)self; (void)monitor;
- // If the surface has a monitor set, it's in charge of responding to
monitor changes
- // Don't remap unless the surface is currently mapped (has a layer surface)
- if (layer_surface->monitor == NULL && layer_surface->layer_surface) {
+ // If the surface has a monitor set, it is in charge of responding to
monitor changes.
+ // Don't remap unless the surface is currently mapped (has a layer
surface), or has
+ // requested to be remapped.
+ if (layer_surface->monitor == NULL &&
+ (layer_surface->layer_surface ||
layer_surface->remap_on_monitor_change)
+ ) {
custom_shell_surface_remap ((CustomShellSurface *)layer_surface);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/src/layer-surface.h
new/gtk-layer-shell-0.10.1/src/layer-surface.h
--- old/gtk-layer-shell-0.10.0/src/layer-surface.h 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/src/layer-surface.h 2026-04-04
05:37:50.000000000 +0200
@@ -43,6 +43,7 @@
// Not set by user requests
struct zwlr_layer_surface_v1 *layer_surface; // The actual layer surface
Wayland object (can be NULL)
+ gboolean remap_on_monitor_change; // If to attempt to remap the surface
next time GTK detects a change to outputs
GtkRequisition current_allocation; // Last size allocation, or (0, 0) if
there hasn't been one
GtkRequisition cached_layer_size; // Last size sent to
zwlr_layer_surface_v1_set_size (starts as 0, 0)
GtkRequisition last_configure_size; // Last size received from a configure
event
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/src/xdg-popup-surface.c
new/gtk-layer-shell-0.10.1/src/xdg-popup-surface.c
--- old/gtk-layer-shell-0.10.0/src/xdg-popup-surface.c 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/src/xdg-popup-surface.c 2026-04-04
05:37:50.000000000 +0200
@@ -45,7 +45,7 @@
(void)_xdg_surface;
xdg_surface_ack_configure (self->xdg_surface, serial);
- self->super.awaiting_configure = FALSE;
+ self->super.awaiting_initial_configure = FALSE;
}
static const struct xdg_surface_listener xdg_surface_listener = {
@@ -188,7 +188,7 @@
self->xdg_surface = xdg_wm_base_get_xdg_surface (xdg_wm_base_global,
wl_surface);
g_return_if_fail (self->xdg_surface);
xdg_surface_add_listener (self->xdg_surface, &xdg_surface_listener, self);
- super->awaiting_configure = TRUE;
+ super->awaiting_initial_configure = TRUE;
CustomShellSurface *transient_for_shell_surface =
self->position.transient_for_shell_surface;
self->xdg_popup = custom_shell_surface_add_popup
(transient_for_shell_surface,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/src/xdg-toplevel-surface.c
new/gtk-layer-shell-0.10.1/src/xdg-toplevel-surface.c
--- old/gtk-layer-shell-0.10.0/src/xdg-toplevel-surface.c 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/src/xdg-toplevel-surface.c 2026-04-04
05:37:50.000000000 +0200
@@ -42,7 +42,7 @@
XdgToplevelSurface *self = data;
xdg_surface_ack_configure (xdg_surface, serial);
- self->super.awaiting_configure = FALSE;
+ self->super.awaiting_initial_configure = FALSE;
}
static const struct xdg_surface_listener xdg_surface_listener = {
@@ -98,7 +98,7 @@
self->xdg_surface = xdg_wm_base_get_xdg_surface (xdg_wm_base_global,
wl_surface);
g_return_if_fail (self->xdg_surface);
xdg_surface_add_listener (self->xdg_surface, &xdg_surface_listener, self);
- super->awaiting_configure = TRUE;
+ super->awaiting_initial_configure = TRUE;
self->xdg_toplevel = xdg_surface_get_toplevel (self->xdg_surface);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/test/README.md
new/gtk-layer-shell-0.10.1/test/README.md
--- old/gtk-layer-shell-0.10.0/test/README.md 2025-10-29 21:43:54.000000000
+0100
+++ new/gtk-layer-shell-0.10.1/test/README.md 2026-04-04 05:37:50.000000000
+0200
@@ -26,6 +26,8 @@
### Expectations format
Integration tests emit protocol expectations by using the `EXPECT_MESSAGE`
macro. Each expectation is a white-space-separated sequence of tokens written
to a line of stdout. The first element must be `EXPECT:` (this is automatically
inserted by `EXPECT_MESSAGE`). For an expectation to match a message, each
following token must appear in order in the message line. The list of expected
messages must match in the correct order. Messages are matched against the
output of the app run with `WAYLAND_DEBUG=1`. Events and requests are not
distinguished.
+`EXPECT_MESSAGE` must also be used to expect any glib warnings/errors emitted.
+
Tests can also use the `UNEXPECT_MESSAGE()` macro to emit `UNEXPECT:` lines.
They're the same, except if a matching message is encountered the test fails.
When the script encounters `CHECK EXPECTATIONS COMPLETED` (emitted by the
`CHECK_EXPECTATIONS()` macro), it will assert that all previous expectations
have been met. This is emitted automatically at the start of each test
callback, and implicitly exists at the end of the test.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/test/integration-test-common/integration-test-common.c
new/gtk-layer-shell-0.10.1/test/integration-test-common/integration-test-common.c
---
old/gtk-layer-shell-0.10.0/test/integration-test-common/integration-test-common.c
2025-10-29 21:43:54.000000000 +0100
+++
new/gtk-layer-shell-0.10.1/test/integration-test-common/integration-test-common.c
2026-04-04 05:37:50.000000000 +0200
@@ -14,7 +14,7 @@
#include <sys/stat.h>
// Time for each callback to run
-static int step_time = 300;
+static int step_time = 500;
static int return_code = 0;
static int callback_index = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/test/integration-tests/meson.build
new/gtk-layer-shell-0.10.1/test/integration-tests/meson.build
--- old/gtk-layer-shell-0.10.0/test/integration-tests/meson.build
2025-10-29 21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/test/integration-tests/meson.build
2026-04-04 05:37:50.000000000 +0200
@@ -37,4 +37,6 @@
'test-nested-popup-configure-delay',
'test-only-output-removed',
'test-respect-close',
+ 'test-immediate-close',
+ 'test-monitor-destroyed-before-configure',
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/test/integration-tests/test-get-namespace-on-non-layer-window.c
new/gtk-layer-shell-0.10.1/test/integration-tests/test-get-namespace-on-non-layer-window.c
---
old/gtk-layer-shell-0.10.0/test/integration-tests/test-get-namespace-on-non-layer-window.c
2025-10-29 21:43:54.000000000 +0100
+++
new/gtk-layer-shell-0.10.1/test/integration-tests/test-get-namespace-on-non-layer-window.c
2026-04-04 05:37:50.000000000 +0200
@@ -15,6 +15,7 @@
static void callback_0()
{
+ EXPECT_MESSAGE(CRITICAL GtkWindow is not a layer surface. Make sure you
called gtk_layer_init_for_window ());
window = create_default_window();
const char *name_space = gtk_layer_get_namespace(window);
ASSERT_STR_EQ(name_space, "gtk-layer-shell");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/test/integration-tests/test-immediate-close.c
new/gtk-layer-shell-0.10.1/test/integration-tests/test-immediate-close.c
--- old/gtk-layer-shell-0.10.0/test/integration-tests/test-immediate-close.c
1970-01-01 01:00:00.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/test/integration-tests/test-immediate-close.c
2026-04-04 05:37:50.000000000 +0200
@@ -0,0 +1,36 @@
+/* This entire file is licensed under MIT
+ *
+ * Copyright 2020 Sophie Winter
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+ */
+
+#include "integration-test-common.h"
+
+static GtkWindow* window;
+
+static void callback_0()
+{
+ EXPECT_MESSAGE(zwlr_layer_shell_v1 .get_layer_surface nil);
+ EXPECT_MESSAGE(zwlr_layer_surface_v1 .closed);
+ EXPECT_MESSAGE(WARNING Compositor closed layer surface before sending
initial .configure);
+ window = g_object_ref(create_default_window());
+ gtk_layer_init_for_window(window);
+ gtk_layer_set_margin(window, GTK_LAYER_SHELL_EDGE_LEFT, 10000);
+ gtk_layer_set_anchor(window, GTK_LAYER_SHELL_EDGE_LEFT, TRUE);
+ gtk_layer_set_anchor(window, GTK_LAYER_SHELL_EDGE_RIGHT, TRUE);
+ gtk_widget_show_all(GTK_WIDGET(window));
+}
+
+static void callback_1() {
+ ASSERT_EQ(gtk_widget_get_mapped(GTK_WIDGET(window)), FALSE, "%d");
+}
+
+TEST_CALLBACKS(
+ callback_0,
+ callback_1,
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/test/integration-tests/test-monitor-destroyed-before-configure.c
new/gtk-layer-shell-0.10.1/test/integration-tests/test-monitor-destroyed-before-configure.c
---
old/gtk-layer-shell-0.10.0/test/integration-tests/test-monitor-destroyed-before-configure.c
1970-01-01 01:00:00.000000000 +0100
+++
new/gtk-layer-shell-0.10.1/test/integration-tests/test-monitor-destroyed-before-configure.c
2026-04-04 05:37:50.000000000 +0200
@@ -0,0 +1,61 @@
+/* This entire file is licensed under MIT
+ *
+ * Copyright 2026 Sophie Winter
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+ */
+
+#include "integration-test-common.h"
+
+static GtkWindow* window;
+
+static void callback_0()
+{
+ EXPECT_MESSAGE(zwlr_layer_shell_v1 .get_layer_surface);
+ EXPECT_MESSAGE(WARNING Compositor closed layer surface before sending
initial .configure);
+ EXPECT_MESSAGE(wl_surface .destroy);
+ UNEXPECT_MESSAGE(zwlr_layer_surface_v1 .configure);
+
+ send_command("enable_configure_delay", "configure_delay_enabled");
+ send_command("destroy_outputs_on_layer_surface_create",
"destroy_outputs_on_layer_surface_create_enabled");
+
+ window = create_default_window();
+ gtk_layer_init_for_window(window);
+ gtk_widget_show_all(GTK_WIDGET(window));
+ ASSERT(!gtk_widget_get_mapped(GTK_WIDGET(window)));
+}
+
+static void callback_1()
+{
+ EXPECT_MESSAGE(zwlr_layer_shell_v1 .get_layer_surface);
+ EXPECT_MESSAGE(zwlr_layer_surface_v1 .configure);
+ ASSERT(!gtk_widget_get_mapped(GTK_WIDGET(window)));
+ send_command("create_output 1000 1000", "output_created");
+}
+
+static void callback_2()
+{
+ EXPECT_MESSAGE(wl_surface .destroy);
+ ASSERT(gtk_widget_get_mapped(GTK_WIDGET(window)));
+ gtk_widget_unmap(GTK_WIDGET(window));
+ ASSERT(!gtk_widget_get_mapped(GTK_WIDGET(window)));
+}
+
+static void callback_3()
+{
+ UNEXPECT_MESSAGE(zwlr_layer_shell_v1 .get_layer_surface);
+ send_command("destroy_output 1", "output_destroyed");
+ send_command("create_output 1000 1000", "output_created");
+ ASSERT(!gtk_widget_get_mapped(GTK_WIDGET(window)));
+}
+
+TEST_CALLBACKS(
+ callback_0,
+ callback_1,
+ callback_2,
+ callback_3,
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/test/mock-server/overrides.c
new/gtk-layer-shell-0.10.1/test/mock-server/overrides.c
--- old/gtk-layer-shell-0.10.0/test/mock-server/overrides.c 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/test/mock-server/overrides.c 2026-04-04
05:37:50.000000000 +0200
@@ -53,10 +53,14 @@
struct wl_resource* lock_surface;
bool has_committed_buffer; // This surface has a non-null committed buffer
bool initial_commit_for_role; // Set to 1 when a role is created for a
surface, and cleared after the first commit
+ bool layer_is_closed; // If this surface has been closed and should not
get any more configures
bool layer_send_configure; // If to send a layer surface configure on the
next commit
int layer_set_w; // The width to configure the layer surface with
int layer_set_h; // The height to configure the layer surface with
uint32_t layer_anchor; // The layer surface's anchor
+ struct {
+ int top, left, bottom, right;
+ } layer_margin; // The layer surface's margin
uint32_t click_serial; // The most recent serial that was used to click on
this surface
uint32_t configure_serial; // The latest serial used to configure the
surface
bool initial_configure_acked; // If the initial configure event has been
acked
@@ -69,10 +73,14 @@
int next_output_slot = 0;
static struct output_data_t outputs[OUTPUT_SLOTS] = {0};
+
+static void create_output(int width, int height);
+static void destroy_output(int slot);
static struct client_data_t clients[CLIENT_SLOTS] = {0};
static struct surface_data_t surfaces[SURFACE_SLOTS] = {0};
static struct wl_resource* current_session_lock = NULL;
bool configure_delay_enabled = false;
+bool destroy_outputs_on_layer_surface_create = false;
int next_surface_slot = 0;
struct surface_data_t* latest_surface = NULL;
@@ -171,8 +179,8 @@
break;
case SURFACE_ROLE_LAYER:
- if (!data->layer_send_configure || !data->layer_surface)
break;
- bool horiz = (
+ if (data->layer_is_closed || !data->layer_send_configure ||
!data->layer_surface) break;
+ bool horiz = (
(data->layer_anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT) &&
(data->layer_anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT));
bool vert = (
@@ -184,9 +192,16 @@
FATAL("not horizontally stretched and no width given");
if (height == 0 && !vert)
FATAL("not horizontally stretched and no width given");
- if (horiz && data->effective_output) width =
data->effective_output->width;
- if (vert && data->effective_output) height =
data->effective_output->height;
- zwlr_layer_surface_v1_send_configure(data->layer_surface,
data->configure_serial, width, height);
+ if (horiz && data->effective_output) width =
+ data->effective_output->width - data->layer_margin.left -
data->layer_margin.right;
+ if (vert && data->effective_output) height =
+ data->effective_output->height - data->layer_margin.top -
data->layer_margin.bottom;
+ if (width < 0 || height < 0) {
+ zwlr_layer_surface_v1_send_closed(data->layer_surface);
+ data->layer_is_closed = true;
+ } else {
+ zwlr_layer_surface_v1_send_configure(data->layer_surface,
data->configure_serial, width, height);
+ }
data->layer_send_configure = false;
break;
@@ -425,6 +440,19 @@
data->layer_set_h = height;
}
+REQUEST_OVERRIDE_IMPL(zwlr_layer_surface_v1, set_margin) {
+ INT_ARG(top, 0);
+ INT_ARG(right, 1);
+ INT_ARG(bottom, 2);
+ INT_ARG(left, 3);
+ struct surface_data_t* data =
wl_resource_get_user_data(zwlr_layer_surface_v1);
+ data->layer_send_configure = true;
+ data->layer_margin.top = top;
+ data->layer_margin.right = right;
+ data->layer_margin.bottom = bottom;
+ data->layer_margin.left = left;
+}
+
REQUEST_OVERRIDE_IMPL(zwlr_layer_surface_v1, get_popup) {
RESOURCE_ARG(xdg_popup, popup, 0);
struct surface_data_t* data =
wl_resource_get_user_data(zwlr_layer_surface_v1);
@@ -446,6 +474,16 @@
ASSERT(data->explicit_output);
}
data->effective_output = data->explicit_output ? data->explicit_output :
default_output();
+
+ if (destroy_outputs_on_layer_surface_create) {
+ for (int i = 0; i < OUTPUT_SLOTS; i++) {
+ if (outputs[i].global) {
+ destroy_output(i);
+ }
+ }
+ data->layer_is_closed = true;
+ destroy_outputs_on_layer_surface_create = false;
+ }
}
REQUEST_OVERRIDE_IMPL(zwlr_layer_surface_v1, ack_configure) {
@@ -520,6 +558,20 @@
next_output_slot++;
}
+static void destroy_output(int slot) {
+ struct output_data_t* output = &outputs[slot];
+ for (int i = 0; i < next_surface_slot; i++) {
+ if (surfaces[i].layer_surface && surfaces[i].effective_output ==
output) {
+ zwlr_layer_surface_v1_send_closed(surfaces[i].layer_surface);
+ surfaces[i].layer_is_closed = true;
+ }
+ }
+ if (slot < 0 || slot >= OUTPUT_SLOTS || !outputs[slot].global)
+ FATAL_FMT("destroying invalid output %d", slot);
+ wl_global_remove(output->global);
+ *output = (struct output_data_t){0};
+}
+
void init() {
OVERRIDE_REQUEST(wl_surface, commit);
OVERRIDE_REQUEST(wl_surface, frame);
@@ -539,6 +591,7 @@
OVERRIDE_REQUEST(zwlr_layer_shell_v1, get_layer_surface);
OVERRIDE_REQUEST(zwlr_layer_surface_v1, set_anchor);
OVERRIDE_REQUEST(zwlr_layer_surface_v1, set_size);
+ OVERRIDE_REQUEST(zwlr_layer_surface_v1, set_margin);
OVERRIDE_REQUEST(zwlr_layer_surface_v1, get_popup);
OVERRIDE_REQUEST(zwlr_layer_surface_v1, ack_configure);
OVERRIDE_REQUEST(zwlr_layer_surface_v1, destroy);
@@ -617,6 +670,9 @@
if (strcmp(argv[0], "enable_configure_delay") == 0) {
configure_delay_enabled = true;
return "configure_delay_enabled";
+ } else if (strcmp(argv[0], "destroy_outputs_on_layer_surface_create") ==
0) {
+ destroy_outputs_on_layer_surface_create = true;
+ return "destroy_outputs_on_layer_surface_create_enabled";
} else if (strcmp(argv[0], "click_latest_surface") == 0) {
// Move the pointer onto the surface and click
// This is needed to trigger a tooltip or popup menu to open for the
popup tests
@@ -640,16 +696,7 @@
return "output_created";
} else if (strcmp(argv[0], "destroy_output") == 0) {
int slot = parse_number(argv[1]);
- struct output_data_t* output = &outputs[slot];
- for (int i = 0; i < next_surface_slot; i++) {
- if (surfaces[i].layer_surface && surfaces[i].effective_output ==
output) {
- zwlr_layer_surface_v1_send_closed(surfaces[i].layer_surface);
- }
- }
- if (slot < 0 || slot >= OUTPUT_SLOTS || !outputs[slot].global)
- FATAL_FMT("destroying invalid output %d", slot);
- wl_global_remove(output->global);
- *output = (struct output_data_t){0};
+ destroy_output(slot);
return "output_destroyed";
} else {
FATAL_FMT("unkown command: %s", argv[0]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gtk-layer-shell-0.10.0/test/run-integration-test.py
new/gtk-layer-shell-0.10.1/test/run-integration-test.py
--- old/gtk-layer-shell-0.10.0/test/run-integration-test.py 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/test/run-integration-test.py 2026-04-04
05:37:50.000000000 +0200
@@ -209,12 +209,19 @@
negative_assertions.append(line.split()[1:])
set_expectation = True
elif line.startswith('[') and line.endswith(')') and ('@' in line or
'#' in line):
+ # Wayland debug log line
if assertions and line_contains(line, assertions[0]):
assertions = assertions[1:]
for negative_assertion in negative_assertions:
if line_contains(line, negative_assertion):
section = format_stream('relevant section',
'\n'.join(lines[section_start:i + 1]))
raise TestError(section + '\n\nunexpected message matching
"' + ' '.join(negative_assertion) + '"')
+ elif line.startswith('** (') and ':' in line:
+ # glib log line
+ if assertions and line_contains(line, assertions[0]):
+ assertions = assertions[1:]
+ else:
+ raise TestError('unexpected glib log message: ' + line)
if line == 'CHECK EXPECTATIONS COMPLETED' or i == len(lines) - 1:
checked_expectation = True
@@ -253,6 +260,11 @@
env['XDG_RUNTIME_DIR'] = test_dir
env['WAYLAND_DISPLAY'] = wayland_display
env['WAYLAND_DEBUG'] = '1'
+ ld_lib_path = env.get('LD_LIBRARY_PATH')
+ env['LD_LIBRARY_PATH'] = (
+ path.join(build_dir, 'src') +
+ (os.pathsep + ld_lib_path if ld_lib_path else '')
+ )
server = Program('server', [server_bin], env)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gtk-layer-shell-0.10.0/test/test-common/test-common.h
new/gtk-layer-shell-0.10.1/test/test-common/test-common.h
--- old/gtk-layer-shell-0.10.0/test/test-common/test-common.h 2025-10-29
21:43:54.000000000 +0100
+++ new/gtk-layer-shell-0.10.1/test/test-common/test-common.h 2026-04-04
05:37:50.000000000 +0200
@@ -21,7 +21,7 @@
#define DEFAULT_OUTPUT_HEIGHT 1080
#define FATAL_FMT(format, ...) do {fprintf(stderr, "Fatal error at %s:%d in
%s(): " format "\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__); exit(1);}
while (0)
-#define FATAL(message) FATAL_FMT(message"%s", "")
+#define FATAL(message) FATAL_FMT("%s", message)
#define ASSERT(assertion) do {if (!(assertion)) {FATAL_FMT("\n assertion
failed: %s", #assertion);}} while (0)
#define ASSERT_EQ(a, b, format) do {if (!((a) == (b))) {FATAL_FMT("\n
expected: %s == %s\n actual: " format " != " format "\n", #a, #b, a, b);}}
while (0)
#define ASSERT_STR_EQ(a, b) do {if (strcmp(a, b)) {FATAL_FMT("\n expected: %s
≈ %s\n actual: \"%s\" ≠ \"%s\"\n", #a, #b, a, b);}} while (0)