diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 7cff83ce22a7ec3b3f80c24349f3e5b1cb09e76d..17278cbb99c6eaeedbcf69fe6e600abb0c561b59 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -105,6 +105,9 @@ #endif static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland); +static void _gdk_wayland_display_set_cursor_theme (GdkDisplay *display, + const char *name, + int size); G_DEFINE_TYPE (GdkWaylandDisplay, gdk_wayland_display, GDK_TYPE_DISPLAY) @@ -1129,7 +1132,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS display_class->get_monitors = gdk_wayland_display_get_monitors; display_class->get_monitor_at_surface = gdk_wayland_display_get_monitor_at_surface; display_class->get_setting = gdk_wayland_display_get_setting; - display_class->set_cursor_theme = gdk_wayland_display_set_cursor_theme; + display_class->set_cursor_theme = _gdk_wayland_display_set_cursor_theme; } static void @@ -1202,11 +1205,22 @@ get_cursor_theme (GdkWaylandDisplay *display_wayland, * @size: the size to use for cursors * * Sets the cursor theme for the given @display. + * + * Deprecated: 4.16: Use the cursor-related properties of + * [GtkSettings](../gtk4/class.Settings.html) to set the cursor theme */ void gdk_wayland_display_set_cursor_theme (GdkDisplay *display, const char *name, int size) +{ + _gdk_wayland_display_set_cursor_theme (display, name, size); +} + +static void +_gdk_wayland_display_set_cursor_theme (GdkDisplay *display, + const char *name, + int size) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY(display); struct wl_cursor_theme *theme; @@ -1275,7 +1289,7 @@ _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland) else name = "default"; - gdk_wayland_display_set_cursor_theme (GDK_DISPLAY (display_wayland), name, size); + _gdk_wayland_display_set_cursor_theme (GDK_DISPLAY (display_wayland), name, size); g_value_unset (&v); gdk_profiler_end_mark (before, "Wayland cursor theme load", NULL); diff --git a/gdk/wayland/gdkwaylanddisplay.h b/gdk/wayland/gdkwaylanddisplay.h index 5e5d2945dcf6bab4ca54a344b6df29c90e8706cf..396a6f98f218bb28ed334ab557fd2f292ed10aaf 100644 --- a/gdk/wayland/gdkwaylanddisplay.h +++ b/gdk/wayland/gdkwaylanddisplay.h @@ -48,7 +48,7 @@ GDK_AVAILABLE_IN_ALL struct wl_display *gdk_wayland_display_get_wl_display (GdkDisplay *display); GDK_AVAILABLE_IN_ALL struct wl_compositor *gdk_wayland_display_get_wl_compositor (GdkDisplay *display); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_16 void gdk_wayland_display_set_cursor_theme (GdkDisplay *display, const char *name, int size); @@ -60,7 +60,7 @@ void gdk_wayland_display_set_startup_notification_id (GdkDisp GDK_AVAILABLE_IN_ALL gboolean gdk_wayland_display_query_registry (GdkDisplay *display, - const char *global); + const char *global); GDK_AVAILABLE_IN_4_4 gpointer gdk_wayland_display_get_egl_display (GdkDisplay *display); diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 04603efbe6033e64042a40ea9a43bfab96af1c02..c5a14e8c49b8cec697cd95b489e1a148886f2616 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -274,11 +274,22 @@ gdk_x11_cursor_create_for_name (GdkDisplay *display, * will have to be handled by the application (GTK applications can learn * about cursor theme changes by listening for change notification * for the corresponding `GtkSetting`). + * + * Deprecated: 4.16: Use the cursor-related properties of + * [GtkSettings](../gtk4/class.Settings.html) to set the cursor theme */ void gdk_x11_display_set_cursor_theme (GdkDisplay *display, const char *theme, const int size) +{ + _gdk_x11_display_set_cursor_theme (display, theme, size); +} + +void +_gdk_x11_display_set_cursor_theme (GdkDisplay *display, + const char *theme, + const int size) { #if defined(HAVE_XCURSOR) && defined(HAVE_XFIXES) && XFIXES_MAJOR >= 2 GdkX11Screen *x11_screen; diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 4e24acc33bb9fc0130f19d2b4181054c310a7ad9..b80256cb507fcc3faa946ab1371167556f880747 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -3078,7 +3078,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS display_class->get_monitors = gdk_x11_display_get_monitors; display_class->get_setting = gdk_x11_display_get_setting; - display_class->set_cursor_theme = gdk_x11_display_set_cursor_theme; + display_class->set_cursor_theme = _gdk_x11_display_set_cursor_theme; class->xevent = gdk_event_source_xevent; diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index d60b97f6b6c400a229c1ac61e03bbaa179b82c67..358da4ebc503b44f829c151e7f8860ecd430fdb7 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -206,6 +206,10 @@ GdkFilterReturn gdk_surface_cache_shape_filter (const XEvent *xevent, gpointer data); +void _gdk_x11_display_set_cursor_theme (GdkDisplay *display, + const char *theme, + const int size); + void _gdk_x11_cursor_display_finalize (GdkDisplay *display); void _gdk_x11_surface_register_dnd (GdkSurface *window); diff --git a/gdk/x11/gdkx11display.h b/gdk/x11/gdkx11display.h index 2df0c4889901b182e6e78ae621555258c01a9341..0b07e3937196574e473e3fdb20d545b6ba20fb25 100644 --- a/gdk/x11/gdkx11display.h +++ b/gdk/x11/gdkx11display.h @@ -88,7 +88,7 @@ GDK_AVAILABLE_IN_ALL void gdk_x11_display_set_program_class (GdkDisplay *display, const char *program_class); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_16 void gdk_x11_display_set_cursor_theme (GdkDisplay *display, const char *theme, const int size);