summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-08-16 22:44:49 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-08-16 22:44:49 +0200
commitdfb60635280da2a938f5616cdb2920c02c41b762 (patch)
treefa58e832e0712171d8695c09b6eb11e83ada1a42
parent2e213e9c22c228059692a1f22713c285446b0683 (diff)
events.c: Fix recent fix for thumbnail window (closes #58)
-rw-r--r--src/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events.c b/src/events.c
index 235ad53..96408e1 100644
--- a/src/events.c
+++ b/src/events.c
@@ -79,7 +79,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
if (winwid != NULL) {
winwidget_show_menu(winwid);
}
- } else if ((ev->xbutton.button == opt.rotate_button)
+ } else if (winwid && (ev->xbutton.button == opt.rotate_button)
&& (winwid->type != WIN_TYPE_THUMBNAIL)
&& ((opt.no_rotate_ctrl_mask)
|| (ev->xbutton.state & ControlMask))) {
@@ -88,7 +88,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
winwid->mode = MODE_ROTATE;
D(("rotate starting at %d, %d\n", ev->xbutton.x, ev->xbutton.y));
}
- } else if ((ev->xbutton.button == opt.blur_button)
+ } else if (winwid && (ev->xbutton.button == opt.blur_button)
&& (winwid->type != WIN_TYPE_THUMBNAIL)
&& ((opt.no_blur_ctrl_mask)
|| (ev->xbutton.state & ControlMask))) {