Author Topic: Force X11 compatibility mode  (Read 85 times)

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1863
Force X11 compatibility mode
« on: Yesterday at 02:38:14 pm »
Currently most Linux distributions are removing X11 support forcing Wayland usage.

C::B relies heavily on Aui, and currently Aui does not work correctly with Wayland. Forcing XWayland, if it is available, would make Aui work again on these systems (this is the method used by KiCAD).

Adding these lines to OnInit() should be enough:

Code
#ifdef __WXGTK__
    wxSetEnv("GDK_BACKEND", "x11");
#endif

Opinions?

EDIT: The change does not work, while "GDK_BACKEND=x11 ./codeblocks" works. Looks like the variable must be set using setenv() just before the App object is created, i.e., before the call to wxEntry(). If anybody knows how to achieve this please comment

« Last Edit: Yesterday at 09:05:09 pm by Miguel Gimenez »