[gimp/soc-2011-seamless-clone2] app: don't forward key events to the curves tool graph if the tool isn't active



commit 53192adeb5f107c4fdec4f38f38a222b90751796
Author: Michael Natterer <mitch gimp org>
Date:   Fri Apr 26 00:11:51 2013 +0200

    app: don't forward key events to the curves tool graph if the tool isn't active

 app/tools/gimpcurvestool.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c
index 9d2b2ea..7d11da0 100644
--- a/app/tools/gimpcurvestool.c
+++ b/app/tools/gimpcurvestool.c
@@ -276,8 +276,11 @@ gimp_curves_tool_key_press (GimpTool    *tool,
 {
   GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
 
-  if (c_tool->graph && gtk_widget_event (c_tool->graph, (GdkEvent *) kevent))
-    return TRUE;
+  if (tool->display && c_tool->graph)
+    {
+      if (gtk_widget_event (c_tool->graph, (GdkEvent *) kevent))
+        return TRUE;
+    }
 
   return GIMP_TOOL_CLASS (parent_class)->key_press (tool, kevent, display);
 }


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