[libgd] focus-hack: don't send an event when there's no GdkWindow



commit 9cecf6a8b01ef5df658909023a655e832fc69629
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Dec 4 18:51:50 2012 -0500

    focus-hack: don't send an event when there's no GdkWindow
    
    Don't attempt our hack if the widget doesn't have a window.

 libgd/gd-entry-focus-hack.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libgd/gd-entry-focus-hack.c b/libgd/gd-entry-focus-hack.c
index 156e3f3..8f2860e 100644
--- a/libgd/gd-entry-focus-hack.c
+++ b/libgd/gd-entry-focus-hack.c
@@ -45,6 +45,8 @@ send_focus_change (GtkWidget *widget,
         continue;
 
       window = gtk_widget_get_window (widget);
+      if (!window)
+        continue;
 
       /* Skip non-master keyboards that haven't
        * selected for events from this window



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