diff --git a/src/cursortheme/thememodel.cpp b/src/cursortheme/thememodel.cpp --- a/src/cursortheme/thememodel.cpp +++ b/src/cursortheme/thememodel.cpp @@ -306,11 +306,6 @@ if (!themeDir.exists("index.theme") && !haveCursors) return; - static bool isX11 = QX11Info::isPlatformX11(); - if (!isX11) { - // TODO: implement Wayland Cursor Theme support - return; - } // Create a cursor theme object for the theme dir XCursorTheme *theme = new XCursorTheme(themeDir); diff --git a/src/cursortheme/xcursortheme.cpp b/src/cursortheme/xcursortheme.cpp --- a/src/cursortheme/xcursortheme.cpp +++ b/src/cursortheme/xcursortheme.cpp @@ -158,6 +158,9 @@ int size = 0; int dpi = 0; Display *dpy = QX11Info::display(); + // Fallback on wayland + if (!dpy) + return 24; // The string "v" is owned and will be destroyed by Xlib char *v = XGetDefault(dpy, "Xft", "dpi"); if (v)