[gcalctool] Fix spacebar not working when display has focus (Bug #611971)



commit 87ff3d315e289a846ee32a02cf1e8f6081f312cc
Author: Robert Ancell <robert ancell gmail com>
Date:   Sat Mar 6 19:05:03 2010 +1100

    Fix spacebar not working when display has focus (Bug #611971)

 NEWS      |    4 ++++
 src/gtk.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 367a270..b932616 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,10 @@
  *  Copyright (c) 1987-2009 Sun Microsystems, Inc.
  *  All Rights Reserved.
  */
+ 
+Overview of changes in gcalctool 5.30.0
+
+    * Fix spacebar not working when display has focus (Bug #611971)
 
 Overview of changes in gcalctool 5.29.92
 
diff --git a/src/gtk.c b/src/gtk.c
index 7a4cdbb..b140526 100644
--- a/src/gtk.c
+++ b/src/gtk.c
@@ -1444,7 +1444,7 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
     }
   
     /* Don't override space - it is used in UI */
-    if (event->string[0] == ' ')
+    if (event->string[0] == ' ' && !gtk_widget_has_focus(X.display_item))
         return FALSE;
 
     if (event->string[0] != '\0') {



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