When built with GTK3, gvim crashes in a Wayland environment. This is due to lots of X-specific code in the GTK UI.
I'm forwarding the attached patch, from Simon McVittie, which tells GDK that only the X11 backend is applicable. >From a quick glance at the GTK/GDK APIs, I didn't find either backend-agnostic functions (to migrate to) or Wayland-specific functions (to call in Wayland environments) for the APIs that Vim is using. Maybe I'm missing something, though, since I'm not particularly familiar with those toolkits. At least the patch avoids the crash, giving someone more time to look into a longer term solution. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]> -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
>From 1af0df914302846910fe9a7baac1d91f6d88113f Mon Sep 17 00:00:00 2001 From: Simon McVittie <[email protected]> Date: Mon, 4 Apr 2016 10:34:59 +0100 Subject: [PATCH] gui_gtk_x11: explicitly disable non-X11 Gtk3 backends Signed-off-by: Simon McVittie <[email protected]> --- src/gui_gtk_x11.c | 6 ++++++ 1 files changed, 6 insertions(+) diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index aa4137a..6c37ba5 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -1679,6 +1679,12 @@ gui_mch_init_check(void) } #endif +#if GTK_CHECK_VERSION(3,0,0) + /* vim currently assumes that Gtk means X11, so it cannot use native Gtk + * support for other backends such as Wayland. */ + gdk_set_allowed_backends ("x11"); +#endif + #ifdef FEAT_GUI_GNOME if (gtk_socket_id == 0) using_gnome = 1; -- 2.8.0.rc3
