diff options
author | Gabor Karsay <gabor.karsay@gmx.at> | 2019-10-07 00:19:40 +0200 |
---|---|---|
committer | Gabor Karsay <gabor.karsay@gmx.at> | 2019-10-07 11:33:56 +0200 |
commit | 1fab63d3edf6053b7b14aafa4f2023f04a2b7ca9 (patch) | |
tree | 6700c2135688aad7f2380864dfd632bcf9f96a9e /src | |
parent | 899a341bab4ad3c69c539f57c4959307f720403c (diff) | |
download | totem-1fab63d3edf6053b7b14aafa4f2023f04a2b7ca9.tar.gz |
backend: Replace deprecated gdk_cursor_new()
gdk_cursor_new has been deprecated since GTK 3.16.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/bacon-video-widget.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c index ba2fdba74..7c9e03551 100644 --- a/src/backend/bacon-video-widget.c +++ b/src/backend/bacon-video-widget.c @@ -766,8 +766,10 @@ set_show_cursor (BaconVideoWidget *bvw, if (show_cursor == FALSE) { GdkCursor *cursor; + GdkDisplay *display; - cursor = gdk_cursor_new (GDK_BLANK_CURSOR); + display = gdk_window_get_display (window); + cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR); gdk_window_set_cursor (window, cursor); g_object_unref (cursor); } else { @@ -1746,17 +1748,20 @@ bvw_handle_element_message (BaconVideoWidget *bvw, GstMessage *msg) switch (nav_msg_type) { case GST_NAVIGATION_MESSAGE_MOUSE_OVER: { gint active; + GdkWindow *window; + GdkDisplay *display; if (!gst_navigation_message_parse_mouse_over (msg, &active)) break; + window = gtk_widget_get_window (GTK_WIDGET (bvw)); if (active) { if (bvw->priv->cursor == NULL) { - bvw->priv->cursor = gdk_cursor_new (GDK_HAND2); + display = gdk_window_get_display (window); + bvw->priv->cursor = gdk_cursor_new_for_display (display, GDK_HAND2); } } else { g_clear_object (&bvw->priv->cursor); } - gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET(bvw)), - bvw->priv->cursor); + gdk_window_set_cursor (window, bvw->priv->cursor); goto done; } case GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED: { |