Merge branch 'Plasma/5.2'
This commit is contained in:
commit
e609429e9b
4 changed files with 23 additions and 4 deletions
|
@ -139,7 +139,10 @@ QQmlComponent *Helper::component(const QString &themeName)
|
|||
m_svgComponent.reset(new QQmlComponent(m_engine.data()));
|
||||
m_svgComponent->loadUrl(QUrl(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kwin/aurorae/aurorae.qml"))));
|
||||
}
|
||||
return m_svgComponent.data();
|
||||
// verify that the theme exists
|
||||
if (!QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("aurorae/themes/%1/%1rc").arg(themeName.mid(16))).isEmpty()) {
|
||||
return m_svgComponent.data();
|
||||
}
|
||||
}
|
||||
// try finding the QML package
|
||||
auto it = m_components.constFind(themeName);
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace Decoration
|
|||
{
|
||||
|
||||
static const QString s_pluginName = QStringLiteral("org.kde.kdecoration2");
|
||||
static const QString s_defaultPlugin = QStringLiteral("org.kde.breeze");
|
||||
|
||||
KWIN_SINGLETON_FACTORY(DecorationBridge)
|
||||
|
||||
|
@ -65,7 +66,7 @@ DecorationBridge::~DecorationBridge()
|
|||
|
||||
static QString readPlugin()
|
||||
{
|
||||
return KSharedConfig::openConfig(KWIN_CONFIG)->group(s_pluginName).readEntry("library", QStringLiteral("org.kde.breeze"));
|
||||
return KSharedConfig::openConfig(KWIN_CONFIG)->group(s_pluginName).readEntry("library", s_defaultPlugin);
|
||||
}
|
||||
|
||||
QString DecorationBridge::readTheme() const
|
||||
|
@ -78,6 +79,18 @@ void DecorationBridge::init()
|
|||
m_plugin = readPlugin();
|
||||
m_settings = QSharedPointer<KDecoration2::DecorationSettings>::create(this);
|
||||
initPlugin();
|
||||
if (!m_factory) {
|
||||
if (m_plugin != s_defaultPlugin) {
|
||||
// try loading default plugin
|
||||
m_plugin = s_defaultPlugin;
|
||||
initPlugin();
|
||||
}
|
||||
// default plugin failed to load, try fallback
|
||||
if (!m_factory) {
|
||||
m_plugin = QStringLiteral("org.kde.kwin.aurorae");
|
||||
initPlugin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DecorationBridge::initPlugin()
|
||||
|
|
|
@ -140,7 +140,8 @@ void X11Renderer::render()
|
|||
}
|
||||
QImage image = renderToImage(geo);
|
||||
xcb_put_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, client()->client()->frameId(), m_gc,
|
||||
image.width(), image.height(), geo.x(), geo.y(), 0, 24, image.byteCount(), image.constBits());
|
||||
image.width(), image.height(), geo.x(), geo.y(), 0, client()->client()->depth(),
|
||||
image.byteCount(), image.constBits());
|
||||
};
|
||||
renderPart(left);
|
||||
renderPart(top);
|
||||
|
|
|
@ -183,7 +183,9 @@ void GlxBackend::init()
|
|||
m_haveMESASwapControl = hasGLExtension(QByteArrayLiteral("GLX_MESA_swap_control"));
|
||||
m_haveEXTSwapControl = hasGLExtension(QByteArrayLiteral("GLX_EXT_swap_control"));
|
||||
m_haveSGISwapControl = hasGLExtension(QByteArrayLiteral("GLX_SGI_swap_control"));
|
||||
m_haveINTELSwapEvent = hasGLExtension(QByteArrayLiteral("GLX_INTEL_swap_event"));
|
||||
// only enable Intel swap event if env variable is set, see BUG 342582
|
||||
m_haveINTELSwapEvent = hasGLExtension(QByteArrayLiteral("GLX_INTEL_swap_event"))
|
||||
&& qgetenv("KWIN_USE_INTEL_SWAP_EVENT") == QByteArrayLiteral("1");
|
||||
|
||||
if (m_haveINTELSwapEvent) {
|
||||
const QList<QByteArray> tokens = QByteArray(qVersion()).split('.');
|
||||
|
|
Loading…
Reference in a new issue