Add check for GNOME Wayland

This commit is contained in:
speedie 2023-06-19 17:18:00 +02:00
parent 453b0028aa
commit ebd625ba1e
2 changed files with 10 additions and 1 deletions

View file

@ -76,6 +76,11 @@ void readargs(int argc, char *argv[]) {
protocol = 0; protocol = 0;
} }
} }
#if USEX
if (getenv("GNOME_SETUP_DISPLAY")) { // This is a GNOME Wayland session which doesn't implement wlr-layer-shell
protocol = 0;
}
#endif
#endif #endif
// init/read xrdb // init/read xrdb

View file

@ -495,7 +495,11 @@ int init_disp(struct state *state) {
wl_display_roundtrip(state->display); wl_display_roundtrip(state->display);
assert(state->compositor != NULL); assert(state->compositor != NULL);
assert(state->layer_shell != NULL);
if (state->layer_shell == NULL) {
die("spmenu: Your compositor does not implement the wlr-layer-shell protocol. Run spmenu in X11 mode.");
}
assert(state->shm != NULL); assert(state->shm != NULL);
wl_display_roundtrip(state->display); wl_display_roundtrip(state->display);