summaryrefslogtreecommitdiff
path: root/src/totem-object.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2020-08-22 01:34:47 +0200
committerBastien Nocera <hadess@hadess.net>2020-08-22 01:39:00 +0200
commit01772d97f8dea090d23fa3b9684a3dc3b910c1c4 (patch)
treec530db90f385a9c6eb999df9d424dcb3e0bd5e1e /src/totem-object.c
parent7373acdce9197409053a398a55c5aca755916b54 (diff)
downloadtotem-01772d97f8dea090d23fa3b9684a3dc3b910c1c4.tar.gz
main: Make Alt+Right/Alt+Left work
Diffstat (limited to 'src/totem-object.c')
-rw-r--r--src/totem-object.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/totem-object.c b/src/totem-object.c
index a0a2ef71e..2cc2fe018 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3400,6 +3400,19 @@ totem_object_handle_key_press (TotemObject *totem, GdkEventKey *event)
break;
case GDK_KEY_Left:
case GDK_KEY_Right:
+ if (event->state & GDK_MOD1_MASK) {
+ gboolean is_forward;
+
+ is_forward = (event->keyval == GDK_KEY_Right);
+ /* Switch direction in RTL environment */
+ if (gtk_widget_get_direction (totem->win) == GTK_TEXT_DIR_RTL)
+ is_forward = !is_forward;
+ if (is_forward)
+ totem_object_seek_next (totem);
+ else
+ totem_object_seek_previous (totem);
+ break;
+ }
switch_rtl = TRUE;
/* fall through */
case GDK_KEY_Page_Up:
@@ -3623,6 +3636,18 @@ window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, TotemObject *tote
}
}
+ if (event->state != 0 && (event->state & GDK_MOD1_MASK)) {
+ switch (event->keyval) {
+ case GDK_KEY_Left:
+ case GDK_KEY_Right:
+ if (event->type == GDK_KEY_PRESS)
+ return totem_object_handle_key_press (totem, event);
+ default:
+ break;
+ }
+
+ }
+
/* If we have modifiers, and either Ctrl, Mod1 (Alt), or any
* of Mod3 to Mod5 (Mod2 is num-lock...) are pressed, we
* let Gtk+ handle the key */