summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Browaeys <alban.browaeys@gmail.com>2022-10-02 23:54:41 +0200
committerBastien Nocera <hadess@hadess.net>2022-10-21 12:04:26 +0000
commitf001ad86c20942eb50c9680bc19df8824e9b96bf (patch)
treedf78918a951726e9ebd22bad53ef080c908f85bc
parente3d28f59b1f53d922ce1c72c97765c569cbfba7c (diff)
downloadtotem-f001ad86c20942eb50c9680bc19df8824e9b96bf.tar.gz
main: Fix scroll-by-page GTK setting breaking slider
gtk-primary-button-warps-slider can be set to FALSE , a click will cause the slider/value to move by the range’s page-size towards the point clicked. totem expects that a click will "warp" the slider to the location. Fix by forcing this setting to TRUE for the GtkRange when the slider is clicked. Closes: #541
-rw-r--r--src/totem-object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/totem-object.c b/src/totem-object.c
index a26d6899a..8f0d088ae 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -2766,6 +2766,10 @@ seek_slider_pressed_cb (GtkWidget *widget, GdkEventButton *event, TotemObject *t
*/
event->button = GDK_BUTTON_PRIMARY;
+ g_object_set (gtk_widget_get_settings (widget),
+ "gtk-primary-button-warps-slider", GINT_TO_POINTER(TRUE),
+ NULL);
+
totem->seek_lock = TRUE;
mark_popup_busy (totem, "seek started");