diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/feh.h | 4 | ||||
-rw-r--r-- | src/imlib.c | 6 | ||||
-rw-r--r-- | src/keyevents.c | 10 |
3 files changed, 14 insertions, 6 deletions
@@ -145,8 +145,8 @@ void real_loadables_mode(int loadable); void feh_reload_image(winwidget w, int resize, int force_new); void feh_filelist_image_remove(winwidget winwid, char do_delete); void slideshow_save_image(winwidget win); -void feh_edit_inplace_orient(winwidget w, int orientation); -void feh_edit_inplace_lossless_rotate(winwidget w, int orientation); +void feh_edit_inplace(winwidget w, int orientation); +void feh_edit_inplace_lossless(winwidget w, int orientation); gib_list *feh_wrap_string(char *text, int wrap_width, Imlib_Font fn, gib_style * style); char *build_caption_filename(feh_file * file, short create_dir); gib_list *feh_list_jump(gib_list * root, gib_list * l, int direction, int num); diff --git a/src/imlib.c b/src/imlib.c index f5e63c3..e27db57 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -923,9 +923,9 @@ void feh_edit_inplace_lossless(winwidget w, int op) int len = strlen(filename) + 1; char *file_str = emalloc(len); int pid, status; - char op_name[] = "rotate"; // for message - char op_op[] = "-rotate"; // for jpegtran option - char op_value[] = "horizontal"; // for jpegtran option's value + char op_name[] = "rotate"; /* message */ + char op_op[] = "-rotate"; /* jpegtran option */ + char op_value[] = "horizontal"; /* jpegtran option's value */ if (op == INPLACE_EDIT_FLIP) { sprintf(op_name, "flip"); diff --git a/src/keyevents.c b/src/keyevents.c index 617c2e9..7c14e14 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -55,6 +55,9 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) { case 'C': mod |= ControlMask; break; + case 'S': + mod |= ShiftMask; + break; case '1': mod |= Mod1Mask; break; @@ -69,6 +72,8 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) { } key->keysyms[index] = XStringToKeysym(cur); + if (isascii(key->keysyms[index])) + mod &= ~ShiftMask; key->keystates[index] = mod; if (key->keysyms[index] == NoSymbol) @@ -362,7 +367,10 @@ void feh_event_handle_keypress(XEvent * ev) kev = (XKeyEvent *) ev; len = XLookupString(&ev->xkey, (char *) kbuf, sizeof(kbuf), &keysym, NULL); - state = kev->state & (ControlMask | Mod1Mask | Mod4Mask); + state = kev->state & (ControlMask | ShiftMask | Mod1Mask | Mod4Mask); + + if (isascii(keysym)) + state &= ~ShiftMask; /* menus are showing, so this is a menu control keypress */ if (ev->xbutton.window == menu_cover) { |