gtk/gtkmnemonichash.c: use accessor functions to access GtkWidget
This commit is contained in:
parent
f8ac83bc07
commit
ce977a1a33
@ -113,6 +113,7 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
|
|||||||
{
|
{
|
||||||
GSList *list, *targets;
|
GSList *list, *targets;
|
||||||
GtkWidget *widget, *chosen_widget;
|
GtkWidget *widget, *chosen_widget;
|
||||||
|
GdkWindow *window;
|
||||||
gboolean overloaded;
|
gboolean overloaded;
|
||||||
|
|
||||||
targets = g_hash_table_lookup (mnemonic_hash->hash,
|
targets = g_hash_table_lookup (mnemonic_hash->hash,
|
||||||
@ -125,11 +126,11 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
|
|||||||
for (list = targets; list; list = list->next)
|
for (list = targets; list; list = list->next)
|
||||||
{
|
{
|
||||||
widget = GTK_WIDGET (list->data);
|
widget = GTK_WIDGET (list->data);
|
||||||
|
window = gtk_widget_get_window (widget);
|
||||||
|
|
||||||
if (gtk_widget_is_sensitive (widget) &&
|
if (gtk_widget_is_sensitive (widget) &&
|
||||||
gtk_widget_get_mapped (widget) &&
|
gtk_widget_get_mapped (widget) &&
|
||||||
widget->window &&
|
window && gdk_window_is_viewable (window))
|
||||||
gdk_window_is_viewable (widget->window))
|
|
||||||
{
|
{
|
||||||
if (chosen_widget)
|
if (chosen_widget)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user