Merge branch 'Plasma/5.11'
This commit is contained in:
commit
a21b74c05a
2 changed files with 6 additions and 3 deletions
|
@ -26,7 +26,7 @@ endif()
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl)
|
include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl)
|
||||||
|
|
||||||
add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES})
|
add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES})
|
||||||
target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils SceneOpenGLBackend Qt5::X11Extras XCB::CURSOR)
|
target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils SceneOpenGLBackend Qt5::X11Extras XCB::CURSOR KF5::Crash)
|
||||||
if(X11_Xinput_FOUND)
|
if(X11_Xinput_FOUND)
|
||||||
target_link_libraries(KWinX11Platform ${X11_Xinput_LIB})
|
target_link_libraries(KWinX11Platform ${X11_Xinput_LIB})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -47,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
#include <KCrash>
|
||||||
|
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QOpenGLContext>
|
#include <QOpenGLContext>
|
||||||
|
@ -247,13 +248,15 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
||||||
m_openGLFreezeProtection->setInterval(15000);
|
m_openGLFreezeProtection->setInterval(15000);
|
||||||
m_openGLFreezeProtection->setSingleShot(true);
|
m_openGLFreezeProtection->setSingleShot(true);
|
||||||
m_openGLFreezeProtection->start();
|
m_openGLFreezeProtection->start();
|
||||||
|
const QString configName = kwinApp()->config()->name();
|
||||||
m_openGLFreezeProtection->moveToThread(m_openGLFreezeProtectionThread);
|
m_openGLFreezeProtection->moveToThread(m_openGLFreezeProtectionThread);
|
||||||
connect(m_openGLFreezeProtection, &QTimer::timeout, m_openGLFreezeProtection,
|
connect(m_openGLFreezeProtection, &QTimer::timeout, m_openGLFreezeProtection,
|
||||||
[] {
|
[configName] {
|
||||||
const QString unsafeKey(QLatin1String("OpenGLIsUnsafe") + (kwinApp()->isX11MultiHead() ? QString::number(kwinApp()->x11ScreenNumber()) : QString()));
|
const QString unsafeKey(QLatin1String("OpenGLIsUnsafe") + (kwinApp()->isX11MultiHead() ? QString::number(kwinApp()->x11ScreenNumber()) : QString()));
|
||||||
auto group = KConfigGroup(kwinApp()->config(), "Compositing");
|
auto group = KConfigGroup(KSharedConfig::openConfig(configName), "Compositing");
|
||||||
group.writeEntry(unsafeKey, true);
|
group.writeEntry(unsafeKey, true);
|
||||||
group.sync();
|
group.sync();
|
||||||
|
KCrash::setDrKonqiEnabled(false);
|
||||||
qFatal("Freeze in OpenGL initialization detected");
|
qFatal("Freeze in OpenGL initialization detected");
|
||||||
}, Qt::DirectConnection);
|
}, Qt::DirectConnection);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue