Recently MOZ_X11 stands for nothing. AFAIK we don't support Gtk+ without X11 and the code is unusable without MOZ_X11 defined. Also Wayland support is designed as run-time when Gtk+ build should support Wayland/X11 at the same time. I suggest to remove the MOZ_X11 defines from widget/gtk as it has no purpose here.
Karl, what do you think? I propose to remove MOZ_X11 from widget/gtk.
Severity: enhancement → minor
It used to have a meaning when the Qt port was still a thing. Back then, it was a shorthand for "Qt or Gtk". Now that the Qt port is not there anymore, it's less useful.
There was an effort years ago to support another GDK2 backend, but i don't think it got very far. It may have been DirectFB. As you imply, a Wayland-only build would be possible. Perhaps this may be desirable one day, but not in the near future, I guess. I'm fine with removing MOZ_X11 preprocessor tests from widget/gtk, if you like. In other places though, I'd like to keep MOZ_X11 where it means X graphics, for example, rather than changing these to MOZ_WIDGET_GTK tests. In such situations, MOZ_X11 better describes the relevant factor.
I'm now trying to build Wayland port without X11 (for bug1305341). Here is the WIP branch for ESR45: https://github.com/mozilla-japan/gecko-dev/commits/esr45-wayland For embedded boards it's required to reduce footprint. Some SoC vendors provides Wayland based BSP without X11. So I don't want remove MOZ_X11.
Another reason: bug1305341comment5
Gdk defines (among others) those values: #define GDK_WINDOWING_X11 #define GDK_WINDOWING_WAYLAND so I think it makes sense to replace MOZ_X11 with GDK_WINDOWING_X11 in widget/gtk and also put Wayland specific code to GDK_WINDOWING_WAYLAND defines.
You need to log in before you can comment on or make changes to this bug.