Merge branch 'Plasma/5.11'

This commit is contained in:
Martin Flöser 2017-11-05 10:46:53 +01:00
commit a21b74c05a
2 changed files with 6 additions and 3 deletions

View file

@ -26,7 +26,7 @@ endif()
include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl)
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)
target_link_libraries(KWinX11Platform ${X11_Xinput_LIB})
endif()

View file

@ -47,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KConfigGroup>
#include <KLocalizedString>
#include <KCrash>
#include <QThread>
#include <QOpenGLContext>
@ -247,13 +248,15 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
m_openGLFreezeProtection->setInterval(15000);
m_openGLFreezeProtection->setSingleShot(true);
m_openGLFreezeProtection->start();
const QString configName = kwinApp()->config()->name();
m_openGLFreezeProtection->moveToThread(m_openGLFreezeProtectionThread);
connect(m_openGLFreezeProtection, &QTimer::timeout, m_openGLFreezeProtection,
[] {
[configName] {
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.sync();
KCrash::setDrKonqiEnabled(false);
qFatal("Freeze in OpenGL initialization detected");
}, Qt::DirectConnection);
} else {