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
This commit is contained in:
Matthias Clasen 2011-02-16 23:56:33 -05:00
parent 14cd22996d
commit fd069132fd
3 changed files with 14 additions and 4 deletions

View File

@ -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.
*/

View File

@ -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);

View File

@ -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