[gtk+] ifdef X11-specific parts in gail



commit fd069132fdb2e3ca54b930cd76dd32267db9e66c
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Feb 16 23:56:33 2011 -0500

    ifdef X11-specific parts in gail
    
    GTK_IS_PLUG() and GTK_IS_SOCKET() now need this protection.
    https://bugzilla.gnome.org/show_bug.cgi?id=642263

 modules/other/gail/gail.c         |    4 ++++
 modules/other/gail/gailtoplevel.c |   12 ++++++++----
 modules/other/gail/gailwindow.c   |    2 ++
 3 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/modules/other/gail/gail.c b/modules/other/gail/gail.c
index ce4e6ce..0c26937 100644
--- a/modules/other/gail/gail.c
+++ b/modules/other/gail/gail.c
@@ -302,6 +302,8 @@ gail_focus_watcher (GSignalInvocationHint *ihint,
           return TRUE;
         }
     }
+
+#ifdef GDK_WINDOWING_X11
   /*
    * If the focus widget is a GtkSocket without a plug
    * then ignore the focus notification as the embedded
@@ -310,6 +312,8 @@ gail_focus_watcher (GSignalInvocationHint *ihint,
   if (GTK_IS_SOCKET (widget) &&
       gtk_socket_get_plug_window (GTK_SOCKET (widget)) != NULL)
     return TRUE;
+#endif
+
   /*
    * The widget may not yet be visible on the screen so we wait until it is.
    */
diff --git a/modules/other/gail/gailtoplevel.c b/modules/other/gail/gailtoplevel.c
index f0ea75e..55c69af 100644
--- a/modules/other/gail/gailtoplevel.c
+++ b/modules/other/gail/gailtoplevel.c
@@ -94,8 +94,10 @@ gail_toplevel_init (GailToplevel *toplevel)
       if (!window || 
           !gtk_widget_get_visible (widget) ||
           is_attached_menu_window (widget) ||
-          gtk_widget_get_parent (GTK_WIDGET (window)) ||
-          GTK_IS_PLUG (window))
+#ifdef GDK_WINDOWING_X11
+          GTK_IS_PLUG (window) ||
+#endif
+          gtk_widget_get_parent (GTK_WIDGET (window)))
         {
           GList *temp_l  = l->next;
 
@@ -215,8 +217,10 @@ gail_toplevel_show_event_watcher (GSignalInvocationHint *ihint,
   widget = GTK_WIDGET (object);
   if (gtk_widget_get_parent (widget) ||
       is_attached_menu_window (widget) ||
-      is_combo_window (widget) ||
-      GTK_IS_PLUG (widget))
+#ifdef GDK_WINDOWING_X11
+      GTK_IS_PLUG (widget) ||
+#endif
+      is_combo_window (widget))
     return TRUE;
 
   child = gtk_widget_get_accessible (widget);
diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c
index 1dd47b2..6d017e3 100644
--- a/modules/other/gail/gailwindow.c
+++ b/modules/other/gail/gailwindow.c
@@ -226,8 +226,10 @@ gail_window_real_initialize (AtkObject *obj,
 
       if (!g_strcmp0 (name, "gtk-tooltip"))
         obj->role = ATK_ROLE_TOOL_TIP;
+#ifdef  GDK_WINDOWING_X11
       else if (GTK_IS_PLUG (widget))
         obj->role = ATK_ROLE_PANEL;
+#endif
       else if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
         obj->role = ATK_ROLE_WINDOW;
       else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]