subprojects/shew: Ignore GdkX11 deprecations

The entire X11 backend was deprecated, to indicate its planned
removal in GTK5.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3675>
This commit is contained in:
Florian Müllner 2025-03-21 02:04:47 +01:00 committed by Bruce Leidl
parent 7fc7724e85
commit 65039f9aaa
2 changed files with 6 additions and 0 deletions

View File

@ -63,10 +63,12 @@ check_foreign_xid (GdkDisplay *display,
#ifdef GDK_WINDOWING_X11
XWindowAttributes attrs;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdk_x11_display_error_trap_push (display);
result = XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (display), xid, &attrs);
if (gdk_x11_display_error_trap_pop (display))
return FALSE;
G_GNUC_END_IGNORE_DEPRECATIONS
#endif
return result;
@ -116,9 +118,11 @@ shew_external_window_x11_set_parent_of (ShewExternalWindow *external_window,
SHEW_EXTERNAL_WINDOW_X11 (external_window);
#ifdef GDK_WINDOWING_X11
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
XSetTransientForHint (GDK_SURFACE_XDISPLAY (child_surface),
GDK_SURFACE_XID (child_surface),
external_window_x11->foreign_xid);
G_GNUC_END_IGNORE_DEPRECATIONS
#endif
}

View File

@ -91,7 +91,9 @@ shew_window_exporter_export (ShewWindowExporter *exporter,
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (widget)))
{
GdkSurface *s = gtk_native_get_surface (GTK_NATIVE (widget));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
guint32 xid = (guint32) gdk_x11_surface_get_xid (s);
G_GNUC_END_IGNORE_DEPRECATIONS
g_task_return_pointer (task, g_strdup_printf ("x11:%x", xid), g_free);
}