[dia/dia-0-97] Bug 619246 - Pressing some keys while drawing can freeze the GUI



commit 5767977dc733fb361c5733445d6731451f9456d1
Author: Hans Breuer <hans breuer org>
Date:   Fri Jul 16 13:16:14 2010 +0200

    Bug 619246 -  Pressing some keys while drawing can freeze the GUI
    
    The correct solution would probably include some extra mode "while drawing" to disable the switching of tools than. But the "freeze" is caused by not releasing the pointer grab, and that should finally be done when freeing the tool.
    (cherry picked from commit fbfe7ef7057a670b164b23e5d60fd37bc2141284)

 app/create_object.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/create_object.c b/app/create_object.c
index 4ba1117..e0fbd5a 100644
--- a/app/create_object.c
+++ b/app/create_object.c
@@ -297,5 +297,11 @@ create_create_object_tool(DiaObjectType *objtype, void *user_data,
 
 void free_create_object_tool(Tool *tool)
 {
+  CreateObjectTool *real_tool = (CreateObjectTool *)tool;
+
+  if (real_tool->moving) { /* should not get here, but see bug #619246 */
+    gdk_pointer_ungrab (GDK_CURRENT_TIME);
+    ddisplay_set_all_cursor(default_cursor);
+  }
   g_free(tool);
 }



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