[totem] backend: Replace deprecated gdk_cursor_new()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Replace deprecated gdk_cursor_new()
- Date: Mon, 7 Oct 2019 10:13:32 +0000 (UTC)
commit 1fab63d3edf6053b7b14aafa4f2023f04a2b7ca9
Author: Gabor Karsay <gabor karsay gmx at>
Date: Mon Oct 7 00:19:40 2019 +0200
backend: Replace deprecated gdk_cursor_new()
gdk_cursor_new has been deprecated since GTK 3.16.
src/backend/bacon-video-widget.c | 13 +++++++++----
1 file 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: {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]