Getting a Wayland surface from a GdkWindow

Hi folks,
I'm trying to retrieve a Wayland surface from a GdkWindow.
Of course, I'm running GTK+3 git with native Wayland (no XWayland). Here's my simplified code :
GtkWindow window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
GdkWindow *w = gtk_widget_get_window (GTK_WIDGET(window));

gdk_wayland_window_set_use_custom_surface (w);
struct wl_surface *srf = gdk_wayland_window_get_wl_surface (w);
struct wl_shell_surface *ssrf = gdk_wayland_window_get_wl_shell_surface (w);

However, Gdk keeps telling me that : Gdk-CRITICAL **: gdk_wayland_window_set_use_custom_surface: assertion 'GDK_IS_WAYLAND_WINDOW (window)' failed What am I doing wrong ? Thanks for your time.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]