~ubuntu-branches/ubuntu/trusty/gimp/trusty

« back to all changes in this revision

Viewing changes to app/display/gimpdisplayshell-callbacks.c

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2009-08-14 09:57:17 UTC
  • mto: (1.1.21 upstream) (0.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 48.
  • Revision ID: james.westby@ubuntu.com-20090814095717-37dh2xqy5t0rurpk
ImportĀ upstreamĀ versionĀ 2.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1137
1137
 
1138
1138
        active_tool = tool_manager_get_active (gimp);
1139
1139
 
1140
 
        if (active_tool &&
1141
 
            gimp_tool_control_get_motion_mode (active_tool->control) ==
1142
 
            GIMP_MOTION_MODE_COMPRESS)
 
1140
        if (shell->scrolling ||
 
1141
            (active_tool &&
 
1142
             gimp_tool_control_get_motion_mode (active_tool->control) ==
 
1143
             GIMP_MOTION_MODE_COMPRESS))
1143
1144
          {
1144
1145
            compressed_motion = gimp_display_shell_compress_motion (shell);
1145
1146
          }
1146
1147
 
1147
 
        if (compressed_motion)
 
1148
        if (compressed_motion && ! shell->scrolling)
1148
1149
          {
1149
1150
            GdkDevice *device = gimp_devices_get_current (gimp);
1150
1151
 
1159
1160
                                                       &display_coords,
1160
1161
                                                       &image_coords);
1161
1162
 
1162
 
            if (active_tool &&
1163
 
                gimp_tool_control_get_snap_to (active_tool->control))
 
1163
            if (gimp_tool_control_get_snap_to (active_tool->control))
1164
1164
              {
1165
1165
                gint x, y, width, height;
1166
1166
 
1186
1186
 
1187
1187
        if (shell->scrolling)
1188
1188
          {
 
1189
            const gint x = (compressed_motion
 
1190
                            ? ((GdkEventMotion *) compressed_motion)->x
 
1191
                            : mevent->x);
 
1192
            const gint y = (compressed_motion
 
1193
                            ? ((GdkEventMotion *) compressed_motion)->y
 
1194
                            : mevent->y);
 
1195
 
1189
1196
            gimp_display_shell_scroll (shell,
1190
 
                                       (shell->scroll_start_x - mevent->x -
 
1197
                                       (shell->scroll_start_x - x -
1191
1198
                                        shell->offset_x),
1192
 
                                       (shell->scroll_start_y - mevent->y -
 
1199
                                       (shell->scroll_start_y - y -
1193
1200
                                        shell->offset_y));
1194
1201
          }
1195
1202
        else if (state & GDK_BUTTON1_MASK)
1841
1848
static GdkEvent *
1842
1849
gimp_display_shell_compress_motion (GimpDisplayShell *shell)
1843
1850
{
1844
 
  GList    *requeued_events = NULL;
1845
 
  GList    *list;
1846
 
  GdkEvent *last_motion = NULL;
 
1851
  GList       *requeued_events = NULL;
 
1852
  const GList *list;
 
1853
  GdkEvent    *last_motion = NULL;
1847
1854
 
1848
1855
  /*  Move the entire GDK event queue to a private list, filtering
1849
1856
   *  out any motion events for the desired widget.