summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/events.c b/src/events.c
index 76c3e64..23a14ba 100644
--- a/src/events.c
+++ b/src/events.c
@@ -41,7 +41,6 @@ feh_event_handler *ev_handler[LASTEvent];
static void feh_event_handle_ButtonPress(XEvent * ev);
static void feh_event_handle_ButtonRelease(XEvent * ev);
-static void feh_event_handle_ConfigureNotify(XEvent * ev);
static void feh_event_handle_LeaveNotify(XEvent * ev);
static void feh_event_handle_MotionNotify(XEvent * ev);
static void feh_event_handle_ClientMessage(XEvent * ev);
@@ -129,6 +128,7 @@ void init_buttonbindings(void)
while (fgets(line, sizeof(line), conf)) {
*action = '\0';
*button = '\0';
+ cur_bb = NULL;
read = sscanf(line, "%31s %7s\n", (char *) &action, (char *) &button);
@@ -378,10 +378,13 @@ static void feh_event_handle_ButtonRelease(XEvent * ev)
y /= winwid->zoom;
thumbfile = feh_thumbnail_get_file_from_coords(x, y);
if (thumbfile) {
- if (opt.actions[0])
+ if (opt.actions[0]) {
feh_action_run(thumbfile, opt.actions[0]);
- else
+ if (!opt.hold_actions[0])
+ feh_thumbnail_mark_removed(thumbfile, 0);
+ } else {
feh_thumbnail_show_fullsize(thumbfile);
+ }
}
}
} else {
@@ -413,7 +416,7 @@ static void feh_event_handle_ButtonRelease(XEvent * ev)
return;
}
-static void feh_event_handle_ConfigureNotify(XEvent * ev)
+void feh_event_handle_ConfigureNotify(XEvent * ev)
{
while (XCheckTypedWindowEvent(disp, ev->xconfigure.window, ConfigureNotify, ev));
if (!menu_root) {
@@ -636,7 +639,7 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
winwid->im_h = gib_imlib_image_get_height(temp);
gib_imlib_free_image_and_decache(temp);
if (!winwid->full_screen && !opt.geom_flags)
- winwidget_resize(winwid, winwid->im_w, winwid->im_h);
+ winwidget_resize(winwid, winwid->im_w, winwid->im_h, 0);
winwid->has_rotated = 1;
}
winwid->im_angle = (ev->xmotion.x - winwid->w / 2) / ((double) winwid->w / 2) * 3.1415926535;