20bool is_running_wayland(
void) {
21 char* wayland_display = getenv(
"WAYLAND_DISPLAY");
22 return !(wayland_display == NULL);
26const struct output output_x11 = {
49const struct output output_wl = {
65 wl_have_fullscreen_window,
72const struct output* get_x11_output(
void) {
77 DIE(
"Couldn't initialize X11 output. Aborting...");
83const struct output* get_wl_output(
void) {
89 LOG_W(
"Couldn't initialize wayland output. Falling back to X11 output.");
91 return get_x11_output();
93 DIE(
"Couldn't initialize wayland output");
102 if ((!force_xwayland || !X11_SUPPORT) && is_running_wayland()) {
103 LOG_I(
"Using Wayland output");
105 LOG_W(
"Ignoring force_xwayland setting because X11 output was not compiled");
106 return get_wl_output();
111 LOG_I(
"Using X11 output");
112 return get_x11_output();
115 DIE(
"No applicable ouput was found (X11, Wayland)");
Logging subsystem and helpers.
const struct output * output_create(bool force_xwayland)
return an initialized output, selecting the correct output type from either wayland or X11 according ...
Generic graphics backend wrapper.
bool have_fullscreen_window(void)
Find the currently focused window and check if it's in fullscreen mode.
Wayland window managment.