Skip to content

Commit

Permalink
guard against disabled xcb module (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
omegacoleman authored Jul 19, 2022
1 parent 541a3e1 commit 46e0518
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ui/classic/classicui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,12 @@ void ClassicUI::update(UserInterfaceComponent component,
// unfortunately, hopefully main display is X wayland.
// The position will be wrong anyway.
#ifdef ENABLE_X11
auto mainX11Display = xcb()->call<IXCBModule::mainDisplay>();
if (!mainX11Display.empty()) {
if (auto *uiPtr = findValue(uis_, "x11:" + mainX11Display)) {
ui = uiPtr->get();
if (auto *xcbAddon = xcb()) {
auto mainX11Display = xcbAddon->call<IXCBModule::mainDisplay>();
if (!mainX11Display.empty()) {
if (auto *uiPtr = findValue(uis_, "x11:" + mainX11Display)) {
ui = uiPtr->get();
}
}
}
#endif
Expand Down

0 comments on commit 46e0518

Please sign in to comment.