Closed cl91 closed 8 years ago
https://github.com/Cloudef/wlc/issues/47 The correct way is to do this issue.
I don't generally like how many #ifdef paths this patch introduces, especially in places that are not directly related to X11 or Xwayland.
If you can reduce that clutter by no-op:ing datastructures and their access functions instead of disabling code, I would accept this.
E.g. Instead of doing
+#ifdef ENABLE_XWAYLAND
wlc_xwm_release(&compositor->xwm);
+#endif
Do the #ifdef inside the wlc_xwm_release. The xwm basically would be no-op datastructure when it's not compiled in.
I have refactored the code to remove the #ifdef's and added no-ops and dummy data structures for the case where xwayland is disabled. It should look much cleaner now.
Yup it's much better contained now. Fix the new comments and then it should be ok for squash and merge.
I have fixed the style issues with the new commits now.
Thanks, it looks good. Squash and I will merge it :)
Done.
Thanks, will smoke the builds later today.
This makes the X11 backend and Xwayland support optional at compile time --- if relevant X11 and XCB packages are found, then they are enabled. If not, they are automatically disabled.
This would be useful for systems that don't need X11 and don't want any X11 dependencies (for instance, embedded systems). I'm currently building a Wayland-only Gentoo system (that is, no X11 dependencies at all), and have successfully tested sway with this commit (In fact, I'm writing this under sway and midori right now. All built without any X11 dependencies (libX11 and friends).