mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
Merge pull request #487 from AsamK/fix_wayland
Fix crash when running natively on Wayland
This commit is contained in:
commit
ea380b2578
1 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ bool IdlePlatform::init()
|
||||||
|
|
||||||
int event_base, error_base;
|
int event_base, error_base;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||||
if(XScreenSaverQueryExtension(QX11Info::display(), &event_base, &error_base)) {
|
if(QX11Info::isPlatformX11() && XScreenSaverQueryExtension(QX11Info::display(), &event_base, &error_base)) {
|
||||||
#else
|
#else
|
||||||
if(XScreenSaverQueryExtension(QApplication::desktop()->screen()->x11Info().display(), &event_base, &error_base)) {
|
if(XScreenSaverQueryExtension(QApplication::desktop()->screen()->x11Info().display(), &event_base, &error_base)) {
|
||||||
#endif
|
#endif
|
||||||
|
@ -89,7 +89,7 @@ int IdlePlatform::secondsIdle()
|
||||||
if(!d->ss_info)
|
if(!d->ss_info)
|
||||||
return 0;
|
return 0;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||||
if(!XScreenSaverQueryInfo(QX11Info::display(), QX11Info::appRootWindow(), d->ss_info))
|
if(!QX11Info::isPlatformX11() || !XScreenSaverQueryInfo(QX11Info::display(), QX11Info::appRootWindow(), d->ss_info))
|
||||||
#else
|
#else
|
||||||
if(!XScreenSaverQueryInfo(QApplication::desktop()->screen()->x11Info().display(), QX11Info::appRootWindow(), d->ss_info))
|
if(!XScreenSaverQueryInfo(QApplication::desktop()->screen()->x11Info().display(), QX11Info::appRootWindow(), d->ss_info))
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue