Fix #290: Mouse-only image viewing
[geeqie.git] / src / layout_image.c
index 049e328..3dd2183 100644 (file)
@@ -1007,12 +1007,12 @@ void layout_image_zoom_adjust_at_point(LayoutWindow *lw, gdouble increment, gint
                {
                image_zoom_adjust_at_point(lw->full_screen->imd, increment, x, y);
                }
-
-       if (!connect_zoom) return;
+       if (!connect_zoom && !lw->split_mode) return;
 
        for (i = 0; i < MAX_SPLIT_IMAGES; i++)
                {
-               if (lw->split_images[i] && lw->split_images[i] != lw->image)
+               if (lw->split_images[i] && lw->split_images[i] != lw->image &&
+                                               lw->split_images[i]->mouse_wheel_mode)
                        image_zoom_adjust_at_point(lw->split_images[i], increment, x, y);
                }
 }
@@ -1672,7 +1672,8 @@ static void layout_image_scroll_cb(ImageWindow *imd, GdkEventScroll *event, gpoi
                }
 
 
-       if (event->state & GDK_CONTROL_MASK)
+       if ((event->state & GDK_CONTROL_MASK) ||
+                               (imd->mouse_wheel_mode && !options->image_lm_click_nav))
                {
                switch (event->direction)
                        {
@@ -1722,7 +1723,7 @@ static void layout_image_scroll_cb(ImageWindow *imd, GdkEventScroll *event, gpoi
                }
 }
 
-static void layout_image_drag_cb(ImageWindow *imd, GdkEventButton *event, gdouble dx, gdouble dy, gpointer data)
+static void layout_image_drag_cb(ImageWindow *imd, GdkEventMotion *event, gdouble dx, gdouble dy, gpointer data)
 {
        gint i;
        LayoutWindow *lw = data;
@@ -1793,7 +1794,7 @@ static void layout_image_button_inactive_cb(ImageWindow *imd, GdkEventButton *ev
 
 }
 
-static void layout_image_drag_inactive_cb(ImageWindow *imd, GdkEventButton *event, gdouble dx, gdouble dy, gpointer data)
+static void layout_image_drag_inactive_cb(ImageWindow *imd, GdkEventMotion *event, gdouble dx, gdouble dy, gpointer data)
 {
        LayoutWindow *lw = data;
        gint i = image_idx(lw, imd);