mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
Compare commits
2 Commits
4d5519b42d
...
scrubbing
Author | SHA1 | Date | |
---|---|---|---|
|
d8b9773210 | ||
|
b282f3c1d2 |
@@ -471,11 +471,14 @@ scroll_cb (GtkEventControllerScroll *scroll,
|
|||||||
|
|
||||||
pickup = _pick_pointer_widget (self);
|
pickup = _pick_pointer_widget (self);
|
||||||
|
|
||||||
/* We do not want to accidentally allow this controller
|
/* We do not want to accidentally allow this controller to handle
|
||||||
* to handle scrolls when hovering over scrolled window */
|
* scrolls when hovering over widgets that also handle scroll */
|
||||||
if (pickup && (GTK_IS_SCROLLED_WINDOW (pickup)
|
while ((pickup && !CLAPPER_GTK_IS_VIDEO (pickup))) {
|
||||||
|| gtk_widget_get_ancestor (pickup, GTK_TYPE_SCROLLED_WINDOW)))
|
if (GTK_IS_SCROLLED_WINDOW (pickup) || GTK_IS_RANGE (pickup))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
pickup = gtk_widget_get_parent (pickup);
|
||||||
|
}
|
||||||
|
|
||||||
device = gtk_event_controller_get_current_event_device (GTK_EVENT_CONTROLLER (scroll));
|
device = gtk_event_controller_get_current_event_device (GTK_EVENT_CONTROLLER (scroll));
|
||||||
|
|
||||||
|
@@ -57,6 +57,7 @@ struct _ClapperGtkSeekBar
|
|||||||
|
|
||||||
gboolean can_scrub;
|
gboolean can_scrub;
|
||||||
gboolean scrubbing;
|
gboolean scrubbing;
|
||||||
|
gboolean was_playing;
|
||||||
|
|
||||||
gboolean dragging;
|
gboolean dragging;
|
||||||
guint position_uint;
|
guint position_uint;
|
||||||
@@ -267,6 +268,14 @@ scale_css_classes_changed_cb (GtkWidget *widget,
|
|||||||
|
|
||||||
if ((self->dragging = dragging)) {
|
if ((self->dragging = dragging)) {
|
||||||
GST_DEBUG_OBJECT (self, "Scale drag started");
|
GST_DEBUG_OBJECT (self, "Scale drag started");
|
||||||
|
|
||||||
|
if (G_LIKELY (self->player != NULL)) {
|
||||||
|
ClapperPlayerState state = clapper_player_get_state (self->player);
|
||||||
|
|
||||||
|
if ((self->was_playing = (state == CLAPPER_PLAYER_STATE_PLAYING)))
|
||||||
|
clapper_player_pause (self->player);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,6 +298,9 @@ scale_css_classes_changed_cb (GtkWidget *widget,
|
|||||||
} else {
|
} else {
|
||||||
clapper_player_seek_custom (self->player, value, self->seek_method);
|
clapper_player_seek_custom (self->player, value, self->seek_method);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self->was_playing)
|
||||||
|
clapper_player_play (self->player);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user