[gtk+/gtk-3-8] GtkApplication: Allow passing windows on non-X11 targets
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-8] GtkApplication: Allow passing windows on non-X11 targets
- Date: Thu, 14 Mar 2013 16:47:39 +0000 (UTC)
commit fcc6f9adffba4a8690d01de24b8b7fcca0f88403
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 13 15:32:46 2013 +0100
GtkApplication: Allow passing windows on non-X11 targets
It's not the application's fault that we don't do anything
with the passed GtkWindow on non-X11, so don't try to get an XID
on non-X11.
https://bugzilla.gnome.org/show_bug.cgi?id=695783
gtk/gtkapplication.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 9072907..d605846 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -1431,8 +1431,10 @@ gtk_application_inhibit (GtkApplication *application,
gdkwindow = gtk_widget_get_window (GTK_WIDGET (window));
if (gdkwindow == NULL)
g_warning ("Inhibit called with an unrealized window");
- else
+#ifdef GDK_WINDOWING_X11
+ else if (GDK_IS_X11_WINDOW (gdkwindow))
xid = GDK_WINDOW_XID (gdkwindow);
+#endif
}
res = g_dbus_proxy_call_sync (application->priv->sm_proxy,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]