[totem] main: Add guards around GtkPlug parenting hack
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Add guards around GtkPlug parenting hack
- Date: Thu, 29 Mar 2012 02:19:58 +0000 (UTC)
commit 7da72628680b9a64f7a6918975a49991e83315cc
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 29 04:11:03 2012 +0200
main: Add guards around GtkPlug parenting hack
src/totem-interface.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/totem-interface.c b/src/totem-interface.c
index 024cf37..a088464 100644
--- a/src/totem-interface.c
+++ b/src/totem-interface.c
@@ -289,6 +289,7 @@ totem_interface_get_full_path (const char *name)
return filename;
}
+#ifdef GDK_WINDOWING_X11
static GdkWindow *
totem_gtk_plug_get_toplevel (GtkPlug *plug)
{
@@ -320,11 +321,18 @@ totem_gtk_plug_get_toplevel (GtkPlug *plug)
}
while (TRUE);
}
+#endif /* GDK_WINDOWING_X11 */
void
totem_interface_set_transient_for (GtkWindow *window, GtkWindow *parent)
{
- if (GTK_IS_PLUG (parent)) {
+#ifdef GDK_WINDOWING_X11
+ GdkDisplay *display;
+
+ display = gdk_display_get_default ();
+
+ if (GDK_IS_X11_DISPLAY (display) &&
+ GTK_IS_PLUG (parent)) {
GdkWindow *toplevel;
gtk_widget_realize (GTK_WIDGET (window));
@@ -334,10 +342,12 @@ totem_interface_set_transient_for (GtkWindow *window, GtkWindow *parent)
(gtk_widget_get_window (GTK_WIDGET (window)), toplevel);
g_object_unref (toplevel);
}
- } else {
- gtk_window_set_transient_for (GTK_WINDOW (window),
- GTK_WINDOW (parent));
+ return;
}
+#endif /* GDK_WINDOWING_X11 */
+
+ gtk_window_set_transient_for (GTK_WINDOW (window),
+ GTK_WINDOW (parent));
}
char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]