From fd069132fdb2e3ca54b930cd76dd32267db9e66c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 16 Feb 2011 23:56:33 -0500 Subject: [PATCH] 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 ce4e6ce55b..0c2693703c 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 f0ea75e182..55c69af575 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 1dd47b2004..6d017e3ab0 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