[gimp/metadata-browser] app: compress motion events up to the first release event
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: compress motion events up to the first release event
- Date: Thu, 13 Sep 2012 00:26:07 +0000 (UTC)
commit e9c3ac78dfd15cb03a39b5139dd7c6f8dbc96a7d
Author: Massimo Valentini <mvalentini src gnome org>
Date: Sun Jun 24 13:23:11 2012 +0200
app: compress motion events up to the first release event
I'm not sure if it'd be better to compress only sequence
of contiguous motion events, thinking to the case of anticipating
a motion event before a modifier key press/release.
app/display/gimpdisplayshell-tool-events.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index ae46e8b..6b8df80 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -944,6 +944,9 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
}
}
+ if (compressed_motion)
+ gdk_event_free (compressed_motion);
+
return_val = TRUE;
}
break;
@@ -1794,6 +1797,17 @@ gimp_display_shell_compress_motion (GimpDisplayShell *shell)
last_motion = event;
}
+ else if ((gtk_get_event_widget (event) == shell->canvas) &&
+ (event->any.type == GDK_BUTTON_RELEASE))
+ {
+ requeued_events = g_list_prepend (requeued_events, event);
+
+ while (gdk_events_pending ())
+ if ((event = gdk_event_get ()))
+ requeued_events = g_list_prepend (requeued_events, event);
+
+ break;
+ }
else
{
requeued_events = g_list_prepend (requeued_events, event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]