video: Install the hide cursor timeout later

We were installing the timeout in root, but removing it in unmap,
which could lead to trouble if we ever dispose a GtkVideo widget
without mapping it.

Fixes: #6264
This commit is contained in:
Matthias Clasen 2024-02-26 08:16:02 -05:00
parent 28964aa0a4
commit dcc3533363

View File

@ -243,6 +243,8 @@ gtk_video_map (GtkWidget *widget)
self->media_stream &&
gtk_media_stream_is_prepared (self->media_stream))
gtk_media_stream_play (self->media_stream);
gtk_video_reveal_cursor (GTK_VIDEO (widget));
}
static void
@ -378,8 +380,6 @@ gtk_video_root (GtkWidget *widget)
g_signal_connect (gtk_widget_get_root (widget), "notify::fullscreened",
G_CALLBACK (fullscreen_changed), widget);
gtk_video_reveal_cursor (GTK_VIDEO (widget));
}
static void