public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Grulich <jgrulich@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gtkmm4.0] rawhide: Upstream backport: Fix type definition conflict with GTK
Date: Thu, 06 Aug 2026 14:34:55 GMT	[thread overview]
Message-ID: <178602689583.1.12297895579962561041.rpms-gtkmm4.0-6ba7f2b42b23@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gtkmm4.0
Branch : rawhide
Commit : 6ba7f2b42b237d98dcd59e9ed5a156e22a9d5ad3
Author : Jan Grulich <jgrulich@redhat.com>
Date   : 2026-08-06T16:34:44+02:00
Stats  : +456/-2 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/gtkmm4.0/c/6ba7f2b42b237d98dcd59e9ed5a156e22a9d5ad3?branch=rawhide

Log:
Upstream backport: Fix type definition conflict with GTK

---
diff --git a/gtkmm-gdk-dont-derive-gtkmm_gdkxx-gtypes-from-internal-types.patch b/gtkmm-gdk-dont-derive-gtkmm_gdkxx-gtypes-from-internal-types.patch
new file mode 100644
index 0000000..8fe7aa2
--- /dev/null
+++ b/gtkmm-gdk-dont-derive-gtkmm_gdkxx-gtypes-from-internal-types.patch
@@ -0,0 +1,328 @@
+From 38a18a447880643964e6e352d1a364237830815e Mon Sep 17 00:00:00 2001
+From: Kjell Ahlstedt <kjellahlstedt@gmail.com>
+Date: Tue, 7 Jul 2026 09:49:06 +0200
+Subject: [PATCH] Gdk: Don't derive gtkmm__GdkXxx GTypes from internal types
+
+Add _DO_NOT_DERIVE_GTYPE and _ABI_AS_WITH_DERIVED_GTYPE where the
+underlying C class is declared G_DECLARE_FINAL_TYPE or
+GDK__DECLARE_INTERNAL_TYPE.
+Such declarations have been added to many GdkXxx classes.
+See gtk!10116
+---
+ gdk/src/applaunchcontext.hg | 2 ++
+ gdk/src/cairocontext.hg     | 2 ++
+ gdk/src/clipboard.hg        | 2 ++
+ gdk/src/cursor.hg           | 3 ++-
+ gdk/src/device.hg           | 3 +++
+ gdk/src/devicepad.hg        | 2 ++
+ gdk/src/devicetool.hg       | 2 ++
+ gdk/src/display.hg          | 2 ++
+ gdk/src/displaymanager.hg   | 2 ++
+ gdk/src/dmabuftexture.hg    | 2 ++
+ gdk/src/drag.hg             | 2 ++
+ gdk/src/drawcontext.hg      | 2 ++
+ gdk/src/drop.hg             | 2 ++
+ gdk/src/frameclock.hg       | 2 ++
+ gdk/src/glcontext.hg        | 2 ++
+ gdk/src/gltexture.hg        | 2 ++
+ gdk/src/memorytexture.hg    | 2 ++
+ gdk/src/monitor.hg          | 2 ++
+ gdk/src/seat.hg             | 2 ++
+ gdk/src/snapshot.hg         | 2 ++
+ gdk/src/surface.hg          | 3 +++
+ gdk/src/texture.hg          | 2 ++
+ 22 files changed, 46 insertions(+), 1 deletion(-)
+
+diff --git a/gdk/src/applaunchcontext.hg b/gdk/src/applaunchcontext.hg
+index cc2cec7d..1c5e8e6b 100644
+--- a/gdk/src/applaunchcontext.hg
++++ b/gdk/src/applaunchcontext.hg
+@@ -35,6 +35,8 @@ class GDKMM_API Display;
+ class GDKMM_API AppLaunchContext : public Gio::AppLaunchContext
+ {
+   _CLASS_GOBJECT(AppLaunchContext, GdkAppLaunchContext, GDK_APP_LAUNCH_CONTEXT, Gio::AppLaunchContext, GAppLaunchContext, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkAppLaunchContext is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT()
+diff --git a/gdk/src/cairocontext.hg b/gdk/src/cairocontext.hg
+index 46087539..730838b5 100644
+--- a/gdk/src/cairocontext.hg
++++ b/gdk/src/cairocontext.hg
+@@ -36,6 +36,8 @@ namespace Gdk
+ class GDKMM_API CairoContext : public Gdk::DrawContext
+ {
+   _CLASS_GOBJECT(CairoContext, GdkCairoContext, GDK_CAIRO_CONTEXT, Gdk::DrawContext, GdkDrawContext, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkCairoContext is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT()
+diff --git a/gdk/src/clipboard.hg b/gdk/src/clipboard.hg
+index 54f9555d..b0f68be4 100644
+--- a/gdk/src/clipboard.hg
++++ b/gdk/src/clipboard.hg
+@@ -56,6 +56,8 @@ namespace Gdk
+ class GDKMM_API Clipboard : public Glib::Object
+ {
+   _CLASS_GOBJECT(Clipboard, GdkClipboard, GDK_CLIPBOARD, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkClipboard is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ public:
+   _WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_clipboard_get_display, refreturn)
+diff --git a/gdk/src/cursor.hg b/gdk/src/cursor.hg
+index 05cb8882..da3137c6 100644
+--- a/gdk/src/cursor.hg
++++ b/gdk/src/cursor.hg
+@@ -60,7 +60,8 @@ namespace Gdk
+ class GDKMM_API Cursor : public Glib::Object
+ {
+   _CLASS_GOBJECT(Cursor, GdkCursor, GDK_CURSOR, Glib::Object, GObject, , , GDKMM_API)
+-  _DO_NOT_DERIVE_GTYPE //We use DO_NOT_DERIVE_GTYPE because glib does not allow us to derive from a non-fundamental (abstract) type, for some reason.
++  _DO_NOT_DERIVE_GTYPE dnl// GdkCursor is a final type
++  _STRUCT_NOT_HIDDEN
+ 
+ protected:
+ 
+diff --git a/gdk/src/device.hg b/gdk/src/device.hg
+index d5e49190..6fc86ab6 100644
+--- a/gdk/src/device.hg
++++ b/gdk/src/device.hg
+@@ -39,6 +39,9 @@ class GDKMM_API Surface;
+ class GDKMM_API Device : public Glib::Object
+ {
+   _CLASS_GOBJECT(Device,GdkDevice,GDK_DEVICE,Glib::Object,GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDevice is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
++
+   _CUSTOM_WRAP_NEW
+ 
+ protected:
+diff --git a/gdk/src/devicepad.hg b/gdk/src/devicepad.hg
+index b88bb660..35942523 100644
+--- a/gdk/src/devicepad.hg
++++ b/gdk/src/devicepad.hg
+@@ -56,6 +56,8 @@ namespace Gdk
+ class GDKMM_API DevicePad : public Glib::Interface
+ {
+   _CLASS_INTERFACE(DevicePad, GdkDevicePad, GDK_DEVICE_PAD, GdkDevicePadInterface, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDevicePad is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ public:
+   _WRAP_ENUM(Feature, GdkDevicePadFeature, decl_prefix GDKMM_API)
+diff --git a/gdk/src/devicetool.hg b/gdk/src/devicetool.hg
+index 3b51d45a..663038ae 100644
+--- a/gdk/src/devicetool.hg
++++ b/gdk/src/devicetool.hg
+@@ -31,6 +31,8 @@ namespace Gdk
+ class GDKMM_API DeviceTool : public Glib::Object
+ {
+   _CLASS_GOBJECT(DeviceTool, GdkDeviceTool, GDK_DEVICE_TOOL, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDeviceTool is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ public:
+   _WRAP_ENUM(Type, GdkDeviceToolType, decl_prefix GDKMM_API)
+diff --git a/gdk/src/display.hg b/gdk/src/display.hg
+index b3f9ac95..a386f8af 100644
+--- a/gdk/src/display.hg
++++ b/gdk/src/display.hg
+@@ -52,6 +52,8 @@ class GDKMM_API Surface;
+ class GDKMM_API Display : public Glib::Object
+ {
+   _CLASS_GOBJECT(Display,GdkDisplay,GDK_DISPLAY,Glib::Object,GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDisplay is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ protected:
+   _CTOR_DEFAULT
+ 
+diff --git a/gdk/src/displaymanager.hg b/gdk/src/displaymanager.hg
+index 939b3f0c..70b456cb 100644
+--- a/gdk/src/displaymanager.hg
++++ b/gdk/src/displaymanager.hg
+@@ -32,6 +32,8 @@ namespace Gdk
+ class GDKMM_API DisplayManager : public Glib::Object
+ {
+   _CLASS_GOBJECT(DisplayManager,GdkDisplayManager,GDK_DISPLAY_MANAGER,Glib::Object,GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDisplayManager is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ protected:
+ 
+ public:
+diff --git a/gdk/src/dmabuftexture.hg b/gdk/src/dmabuftexture.hg
+index 94ba74d2..5a823e32 100644
+--- a/gdk/src/dmabuftexture.hg
++++ b/gdk/src/dmabuftexture.hg
+@@ -36,6 +36,8 @@ _WRAP_GERROR(DmabufError, GdkDmabufError, GDK_DMABUF_ERROR, decl_prefix GDKMM_AP
+ class GDKMM_API DmabufTexture : public Gdk::Texture
+ {
+   _CLASS_GOBJECT(DmabufTexture, GdkDmabufTexture, GDK_DMABUF_TEXTURE, Gdk::Texture, GdkTexture, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDmabufTexture is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT()
+diff --git a/gdk/src/drag.hg b/gdk/src/drag.hg
+index ffa194ab..4540cddf 100644
+--- a/gdk/src/drag.hg
++++ b/gdk/src/drag.hg
+@@ -44,6 +44,8 @@ _WRAP_ENUM(DragCancelReason, GdkDragCancelReason, decl_prefix GDKMM_API)
+ class GDKMM_API Drag : public Glib::Object
+ {
+   _CLASS_GOBJECT(Drag, GdkDrag, GDK_DRAG, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDrag is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ public:
+   // The Gtk::DnD namespace contains functions that logically are Gdk::Drag methods.
+diff --git a/gdk/src/drawcontext.hg b/gdk/src/drawcontext.hg
+index 13ab7a49..bb3d5682 100644
+--- a/gdk/src/drawcontext.hg
++++ b/gdk/src/drawcontext.hg
+@@ -40,6 +40,8 @@ class GDKMM_API Surface;
+ class GDKMM_API DrawContext : public Glib::Object
+ {
+   _CLASS_GOBJECT(DrawContext, GdkDrawContext, GDK_DRAW_CONTEXT, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDrawContext is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   /// This constructor is protected because only derived classes shall be instantiated.
+diff --git a/gdk/src/drop.hg b/gdk/src/drop.hg
+index 40cb0ad5..e02898f3 100644
+--- a/gdk/src/drop.hg
++++ b/gdk/src/drop.hg
+@@ -55,6 +55,8 @@ class GDKMM_API Surface;
+ class GDKMM_API Drop : public Glib::Object
+ {
+   _CLASS_GOBJECT(Drop, GdkDrop, GDK_DROP, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkDrop is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ public:
+   _WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_drop_get_display, refreturn)
+diff --git a/gdk/src/frameclock.hg b/gdk/src/frameclock.hg
+index 70b93b9d..c6fd9603 100644
+--- a/gdk/src/frameclock.hg
++++ b/gdk/src/frameclock.hg
+@@ -67,6 +67,8 @@ namespace Gdk
+ class GDKMM_API FrameClock : public Glib::Object
+ {
+   _CLASS_GOBJECT(FrameClock, GdkFrameClock, GDK_FRAME_CLOCK, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkFrameClock is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ public:
+   _WRAP_ENUM(Phase, GdkFrameClockPhase, decl_prefix GDKMM_API)
+diff --git a/gdk/src/glcontext.hg b/gdk/src/glcontext.hg
+index dd9a2ffe..ea05ddc0 100644
+--- a/gdk/src/glcontext.hg
++++ b/gdk/src/glcontext.hg
+@@ -79,6 +79,8 @@ _WRAP_GERROR(GLError, GdkGLError, GDK_GL_ERROR, newin "3,18", decl_prefix GDKMM_
+ class GDKMM_API GLContext : public DrawContext
+ {
+   _CLASS_GOBJECT(GLContext, GdkGLContext, GDK_GL_CONTEXT, Gdk::DrawContext, GdkDrawContext, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkGLContext is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT
+diff --git a/gdk/src/gltexture.hg b/gdk/src/gltexture.hg
+index 61ce55ef..c963a431 100644
+--- a/gdk/src/gltexture.hg
++++ b/gdk/src/gltexture.hg
+@@ -30,6 +30,8 @@ class GDKMM_API GLContext;
+ class GDKMM_API GLTexture : public Gdk::Texture
+ {
+   _CLASS_GOBJECT(GLTexture, GdkGLTexture, GDK_GL_TEXTURE, Gdk::Texture, GdkTexture, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkGLTexture is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT()
+diff --git a/gdk/src/memorytexture.hg b/gdk/src/memorytexture.hg
+index 5b35f91e..c7af876e 100644
+--- a/gdk/src/memorytexture.hg
++++ b/gdk/src/memorytexture.hg
+@@ -30,6 +30,8 @@ namespace Gdk
+ class GDKMM_API MemoryTexture : public Gdk::Texture
+ {
+   _CLASS_GOBJECT(MemoryTexture, GdkMemoryTexture, GDK_MEMORY_TEXTURE, Gdk::Texture, GdkTexture, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkMemoryTexture is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT()
+diff --git a/gdk/src/monitor.hg b/gdk/src/monitor.hg
+index 50391ee5..4474df38 100644
+--- a/gdk/src/monitor.hg
++++ b/gdk/src/monitor.hg
+@@ -38,6 +38,8 @@ class GDKMM_API Display;
+ class GDKMM_API Monitor : public Glib::Object
+ {
+   _CLASS_GOBJECT(Monitor, GdkMonitor, GDK_MONITOR, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkMonitor is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT()
+diff --git a/gdk/src/seat.hg b/gdk/src/seat.hg
+index 096a67c1..b9a8fe1b 100644
+--- a/gdk/src/seat.hg
++++ b/gdk/src/seat.hg
+@@ -37,6 +37,8 @@ class GDKMM_API Surface;
+ class GDKMM_API Seat : public Glib::Object
+ {
+   _CLASS_GOBJECT(Seat, GdkSeat, GDK_SEAT, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkSeat is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ protected:
+   _CTOR_DEFAULT()
+diff --git a/gdk/src/snapshot.hg b/gdk/src/snapshot.hg
+index e4ca180b..bd925df1 100644
+--- a/gdk/src/snapshot.hg
++++ b/gdk/src/snapshot.hg
+@@ -33,6 +33,8 @@ namespace Gdk
+ class GDKMM_API Snapshot : public Glib::Object
+ {
+   _CLASS_GOBJECT(Snapshot, GdkSnapshot, GDK_SNAPSHOT, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkSnapshot is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+ 
+ public:
+   // This class is almost empty
+diff --git a/gdk/src/surface.hg b/gdk/src/surface.hg
+index 4453cdb8..d8fbea3b 100644
+--- a/gdk/src/surface.hg
++++ b/gdk/src/surface.hg
+@@ -56,7 +56,10 @@ class GDKMM_API Monitor;
+ class GDKMM_API Surface : public Glib::Object
+ {
+   _CLASS_GOBJECT(Surface, GdkSurface, GDK_SURFACE, Glib::Object, GObject, , , GDKMM_API)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkSurface is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+   _STRUCT_NOT_HIDDEN
++
+   _CUSTOM_WRAP_NEW
+   _IGNORE(gdk_surface_destroy, gdk_surface_is_destroyed)
+ 
+diff --git a/gdk/src/texture.hg b/gdk/src/texture.hg
+index 1ca4d3f0..2d2c6560 100644
+--- a/gdk/src/texture.hg
++++ b/gdk/src/texture.hg
+@@ -59,6 +59,8 @@ class GDKMM_API Texture : public Glib::Object, public Paintable
+ {
+   _CLASS_GOBJECT(Texture, GdkTexture, GDK_TEXTURE, Glib::Object, GObject, , , GDKMM_API)
+   _IMPLEMENTS_INTERFACE(Paintable)
++  _DO_NOT_DERIVE_GTYPE dnl// GdkTexture is an internal type
++  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
+   _IGNORE(gdk_texture_downloader_new) dnl// gmmproc thinks this is a Texture method
+ 
+ protected:
+-- 
+GitLab
+

diff --git a/gtkmm-gtk-remove-api-as-in-gtk-4_23_3.patch b/gtkmm-gtk-remove-api-as-in-gtk-4_23_3.patch
new file mode 100644
index 0000000..23217e3
--- /dev/null
+++ b/gtkmm-gtk-remove-api-as-in-gtk-4_23_3.patch
@@ -0,0 +1,112 @@
+From 1ed5e281dcd9d59d4f98cdfc0e0aa303e3205fd5 Mon Sep 17 00:00:00 2001
+From: Kjell Ahlstedt <kjellahlstedt@gmail.com>
+Date: Tue, 4 Aug 2026 16:49:39 +0200
+Subject: [PATCH] Gtk: Remove API as in gtk 4.23.3
+
+* gtk/src/application.hg: Remove save(), forget(),
+property_support_save(), property_autosave_interval(),
+signal_restore_window(), signal_save_state(), signal_restore_state().
+* gtk/src/applicationwindow.hg: Remove signal_save_state().
+* gtk/src/enums.hg: Remove enum RestoreReason.
+
+GTK removed some unstable API in 4.23.3.
+The corresponding API is removed from gtkmm.
+---
+ gtk/src/application.hg       | 33 ++-------------------------------
+ gtk/src/applicationwindow.hg |  4 +---
+ gtk/src/enums.hg             |  1 -
+ 3 files changed, 3 insertions(+), 35 deletions(-)
+
+diff --git a/gtk/src/application.hg b/gtk/src/application.hg
+index 61eac431..1b32f301 100644
+--- a/gtk/src/application.hg
++++ b/gtk/src/application.hg
+@@ -91,27 +91,6 @@ namespace Gtk
+  * default window icon. Use Gtk::Window::set_default_icon_name() or
+  * Gtk::Window::property_icon_name() to override that behavior.
+  *
+- * ## State saving
+- *
+- * %Gtk::Application registers with a session manager if possible and
+- * offers various functionality related to the session life-cycle,
+- * such as state saving.
+- *
+- * State-saving functionality can be enabled by setting
+- * property_support_save() to true.
+- *
+- * In order to save and restore per-window state, applications must
+- * connect to signal_restore_window() and
+- * handle Gtk::ApplicationWindow::signal_save_state(). There
+- * are also signal_restore_state() and
+- * signal_save_state() signals, which can be used
+- * for global state that is not connected to any window.
+- *
+- * %Gtk::Application automatically saves state before app shutdown, and by
+- * default periodically auto-saves app state (as configured by
+- * property_autosave_interval()). Applications can
+- * also call save() themselves at opportune times.
+- *
+  * ## Inhibiting
+  *
+  * An application can block various ways to end the session with
+@@ -345,28 +324,20 @@ public:
+ 
+   _WRAP_METHOD(Glib::RefPtr<Gio::Menu> get_menu_by_id(const Glib::ustring& id), gtk_application_get_menu_by_id, refreturn)
+   _WRAP_METHOD(Glib::RefPtr<const Gio::Menu> get_menu_by_id(const Glib::ustring& id) const, gtk_application_get_menu_by_id, refreturn, constversion)
+-  _WRAP_METHOD(void save(), gtk_application_save)
+-  _WRAP_METHOD(void forget(), gtk_application_forget)
+ 
+   _WRAP_PROPERTY("menubar", Glib::RefPtr<Gio::MenuModel>)
+   _WRAP_PROPERTY("register-session", bool,
+     deprecated "4.20: This property is ignored. GTK always registers with the session manager.")
+   _WRAP_PROPERTY("screensaver-active", bool, newin "3,94")
+   _WRAP_PROPERTY("active-window", Window*)
+-  _WRAP_PROPERTY("support-save", bool)
+-  _WRAP_PROPERTY("autosave-interval", unsigned int)
+ 
+   _WRAP_SIGNAL(void window_added(Window* window), "window-added")
+   _WRAP_SIGNAL(void window_removed(Window* window), "window-removed")
+   // no_default_handler because the wrapped C signal has no default handler.
+   _WRAP_SIGNAL(void query_end(), "query-end", no_default_handler)
+ 
+-#m4 _CONVERSION(`GVariant*',`const Glib::VariantBase&',`Glib::wrap($3, true)')
+-#m4 _CONVERSION(`GVariantDict*',`const Glib::RefPtr<Glib::VariantDict>&',`Glib::wrap($3, true)')
+-  // TODO: Remove the following 3 no_default_handler when we can break ABI.
+-  _WRAP_SIGNAL(void restore_window(RestoreReason reason, const Glib::VariantBase& state), "restore-window", no_default_handler)
+-  _WRAP_SIGNAL(bool save_state(const Glib::RefPtr<Glib::VariantDict>& dict), "save-state", no_default_handler)
+-  _WRAP_SIGNAL(bool restore_state(RestoreReason reason, const Glib::VariantBase& state), "restore-state", no_default_handler)
++  // If GtkApplication::restore-window, ::save-state, ::restoee-state
++  // are added again, see how they were wrapped in gtkmm 4.21.2 and 4.23.0.
+ 
+ private:
+   /** This is just a way to call Glib::init() before calling a Glib::Object ctor,
+diff --git a/gtk/src/applicationwindow.hg b/gtk/src/applicationwindow.hg
+index 53cfa50c..1539552b 100644
+--- a/gtk/src/applicationwindow.hg
++++ b/gtk/src/applicationwindow.hg
+@@ -109,9 +109,7 @@ _DEPRECATE_IFDEF_END
+   _WRAP_METHOD(const ShortcutsWindow* get_help_overlay() const, gtk_application_window_get_help_overlay, constversion,
+     deprecated "4.18: libadwaita (a C library) has a replacement for GtkShortcutsWindow.")
+ 
+-#m4 _CONVERSION(`GVariantDict*',`const Glib::RefPtr<Glib::VariantDict>&',`Glib::wrap($3, true)')
+-  // TODO: Remove no_default_handler when we can break ABI.
+-  _WRAP_SIGNAL(bool save_state(const Glib::RefPtr<Glib::VariantDict>& dict), "save-state", no_default_handler)
++  // If GtkApplicationWindow::save-state is added again, see how it was wrapped in gtkmm 4.21.2 and 4.23.0.
+ 
+   _WRAP_PROPERTY("show-menubar", bool)
+ };
+diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
+index c8468442..e48be99f 100644
+--- a/gtk/src/enums.hg
++++ b/gtk/src/enums.hg
+@@ -66,7 +66,6 @@ _WRAP_ENUM(FontRendering, GtkFontRendering, decl_prefix GTKMM_API)
+ _WRAP_ENUM(InterfaceColorScheme, GtkInterfaceColorScheme, decl_prefix GTKMM_API)
+ _WRAP_ENUM(InterfaceContrast, GtkInterfaceContrast, decl_prefix GTKMM_API)
+ _WRAP_ENUM(ReducedMotion, GtkReducedMotion, decl_prefix GTKMM_API)
+-_WRAP_ENUM(RestoreReason, GtkRestoreReason, decl_prefix GTKMM_API)
+ 
+ #ifndef DOXYGEN_SHOULD_SKIP_THIS
+ //We need this because we can't just use floats for enum value.
+-- 
+GitLab
+

diff --git a/gtkmm4.0.spec b/gtkmm4.0.spec
index aab41a3..05c5d4d 100644
--- a/gtkmm4.0.spec
+++ b/gtkmm4.0.spec
@@ -16,6 +16,13 @@ License:        LGPL-2.1-or-later
 URL:            https://www.gtkmm.org/
 Source0:        https://download.gnome.org/sources/gtkmm/%{gnome_major_minor_version}/gtkmm-%{version}.tar.xz
 
+# Fix type definition conflict with GTK
+# NOTE: when removing also remove all BR: perl(foo) and -Dmaintainer-mode=true meson option
+# https://gitlab.gnome.org/GNOME/gtkmm/-/commit/38a18a447880643964e6e352d1a364237830815e
+# https://gitlab.gnome.org/GNOME/gtkmm/-/commit/1ed5e281dcd9d59d4f98cdfc0e0aa303e3205fd5
+Patch0:         gtkmm-gdk-dont-derive-gtkmm_gdkxx-gtypes-from-internal-types.patch
+Patch1:         gtkmm-gtk-remove-api-as-in-gtk-4_23_3.patch
+
 BuildRequires:  doxygen
 BuildRequires:  gcc-c++
 BuildRequires:  libxslt
@@ -29,6 +36,13 @@ BuildRequires:  pkgconfig(glibmm-2.68) >= %{glibmm_version}
 BuildRequires:  pkgconfig(gtk4) >= %{gtk4_version}
 BuildRequires:  pkgconfig(pangomm-2.48) >= %{pangomm_version}
 
+BuildRequires:  perl(feature)
+BuildRequires:  perl(Getopt::Long)
+BuildRequires:  perl(open)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(warnings)
+BuildRequires:  perl(XML::Parser)
+
 Requires:       cairomm1.16%{?_isa} >= %{cairomm_version}
 Requires:       gdk-pixbuf2%{?_isa} >= %{gdk_pixbuf2_version}
 Requires:       glibmm2.68%{?_isa} >= %{glibmm_version}
@@ -61,7 +75,7 @@ This package contains the full API documentation for %{name}.
 
 
 %prep
-%setup -q -n gtkmm-%{version}
+%autosetup -p1 -n gtkmm-%{version}
 
 # Copy demos before build to avoid including built binaries in -doc package
 mkdir -p _docs
@@ -69,7 +83,7 @@ cp -a demos/ _docs/
 
 
 %build
-%meson -Dbuild-documentation=true
+%meson -Dbuild-documentation=true -Dmaintainer-mode=true
 %meson_build
 
 

                 reply	other threads:[~2026-08-06 14:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178602689583.1.12297895579962561041.rpms-gtkmm4.0-6ba7f2b42b23@fedoraproject.org \
    --to=jgrulich@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox