Subject: Emacs --with-xwidgets complains under Wayland

From: Paul Eggert <[email-masked]>
Date: Sat, 24 Oct 2020 17:00:23 -0700

Under Ubuntu 20.04.1 LTS x86-64, when I use './configure --with-xwidgets' and 
run Emacs in the default windowing environment (which is Gnome under Wayland), 
simple xwidgets functions do not seem to work. For example:

(make-xwidget 'webkit "title" 500 500 '())

causes the following to appear on stderr:

(emacs:139090): Gdk-WARNING **: 16:53:59.652: 
../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window

(emacs:139090): Gdk-WARNING **: 16:53:59.652: 
../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window

(emacs:139090): Gdk-WARNING **: 16:53:59.652: 
../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window

Apparently the Emacs xwidgets code assumes native X11, but Emacs is running 
under Wayland, not native X11.

I observe the problem when running Emacs 26.3, Emacs 27.1, and Emacs savannah 
master, so it's not a new problem.

A simple workaround is to not use --with-xwidgets; this is now Debian and Ubuntu 
build the Emacs 26.3 that they distribute, at any rate.