Commit 362edf1d authored by Marco Martin's avatar Marco Martin
Browse files

don't crash on wayland

makes a couple of functions no-op, which will need to
be fixed, but at least don't crash
parent bd95edf3
......@@ -151,6 +151,10 @@ XcursorImages *XCursorTheme::xcLoadImages(const QString &image, int size) const
int XCursorTheme::defaultCursorSize() const
//TODO: manage Wayland
if (!QX11Info::connection()) {
return 32;
/* This code is basically borrowed from display.c of the XCursor library
We can't use "int XcursorGetDefaultSize(Display *dpy)" because if
previously the cursor size was set to a custom value, it would return
......@@ -181,6 +185,10 @@ int XCursorTheme::defaultCursorSize() const
qulonglong XCursorTheme::loadCursor(const QString &name, int size) const
//TODO: manage Wayland
if (!QX11Info::connection()) {
return None;
if (size <= 0)
size = defaultCursorSize();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment