[gimp] app: move variable to local scope in gimp_display_shell_canvas_tool_events()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: move variable to local scope in gimp_display_shell_canvas_tool_events()
- Date: Sun, 20 Feb 2011 15:34:19 +0000 (UTC)
commit 9151899aabf917a2a65e6c40c0f1e56952c0e530
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 20 16:33:46 2011 +0100
app: move variable to local scope in gimp_display_shell_canvas_tool_events()
app/display/gimpdisplayshell-callbacks.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index 4a0ae86..ee01486 100644
--- a/app/display/gimpdisplayshell-callbacks.c
+++ b/app/display/gimpdisplayshell-callbacks.c
@@ -783,7 +783,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
GimpDisplay *display;
GimpImage *image;
Gimp *gimp;
- GdkDisplay *gdk_display;
GimpCoords display_coords;
GimpCoords image_coords;
GdkModifierType state;
@@ -820,11 +819,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
image = gimp_display_get_image (display);
if (! image)
- {
- return gimp_display_shell_canvas_no_image_events (canvas, event, shell);
- }
-
- gdk_display = gtk_widget_get_display (canvas);
+ return gimp_display_shell_canvas_no_image_events (canvas, event, shell);
/* Find out what device the event occurred upon */
if (! gimp->busy && gimp_devices_check_change (gimp, event))
@@ -1010,6 +1005,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
(gimp_tool_control_get_motion_mode (active_tool->control) !=
GIMP_MOTION_MODE_EXACT)))
{
+ GdkDisplay *gdk_display = gtk_widget_get_display (canvas);
+
/* don't request motion hins for XInput devices because
* the wacom driver is known to report crappy hints
* (#6901) --mitch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]