[gimp/gimp-2-8] Bug 686521 - Zoom Tool Displays Wrong Cursor When Zooming In/Out
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 686521 - Zoom Tool Displays Wrong Cursor When Zooming In/Out
- Date: Tue, 6 Nov 2012 21:50:07 +0000 (UTC)
commit 28d42d3dd7f480f9d452747576f764fcc23c9036
Author: Michael Natterer <mitch gimp org>
Date: Tue Nov 6 22:46:47 2012 +0100
Bug 686521 - Zoom Tool Displays Wrong Cursor When Zooming In/Out
When updating the tool cursor on BUTTON_PRESS, pass a state *without*
the newly pressed button's mask to gimp_display_shell_update_cursor(),
or it will simply never call the cursor update function. Tool cursors
don't normally change when a mouse button is down.
(cherry picked from commit 5de48ef8b5f3854f10efbb3e6a7c02224f92883e)
app/display/gimpdisplayshell-tool-events.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index d9d2176..95d7906 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -439,13 +439,16 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case GDK_BUTTON_PRESS:
{
- GdkEventButton *bevent = (GdkEventButton *) event;
+ GdkEventButton *bevent = (GdkEventButton *) event;
+ GdkModifierType button_state;
/* ignore new mouse events */
if (gimp->busy || shell->scrolling || shell->pointer_grabbed)
return TRUE;
- state |= gimp_display_shell_button_to_state (bevent->button);
+ button_state = gimp_display_shell_button_to_state (bevent->button);
+
+ state |= button_state;
/* ignore new buttons while another button is down */
if (((state & (GDK_BUTTON1_MASK)) && (state & (GDK_BUTTON2_MASK |
@@ -473,7 +476,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
gimp_display_shell_update_focus (shell, TRUE,
&image_coords, state);
gimp_display_shell_update_cursor (shell, &display_coords,
- &image_coords, state, FALSE);
+ &image_coords, state & ~button_state,
+ FALSE);
if (gdk_event_triggers_context_menu (event))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]