Merge branch 'Plasma/5.7'

This commit is contained in:
Martin Gräßlin 2016-07-20 14:44:21 +02:00
commit 904b18a421
2 changed files with 100 additions and 145 deletions

View file

@ -6,14 +6,99 @@
<rect>
<x>0</x>
<y>0</y>
<width>402</width>
<height>335</height>
<width>481</width>
<height>415</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="KMessageWidget" name="glCrashedWarning">
<property name="visible">
<bool>false</bool>
</property>
<property name="text">
<string>OpenGL compositing (the default) has crashed KWin in the past.
This was most likely due to a driver bug.
If you think that you have meanwhile upgraded to a stable driver,
you can reset this protection but be aware that this might result in an immediate crash!
Alternatively, you might want to use the XRender backend instead.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="scaleWarning">
<property name="visible">
<bool>false</bool>
</property>
<property name="text">
<string>Scale method &quot;Accurate&quot; is not supported by all hardware and can cause performance regressions and rendering artifacts.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="tearingWarning">
<property name="visible">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="windowThumbnailWarning">
<property name="visible">
<bool>false</bool>
</property>
<property name="text">
<string>Keeping the window thumbnail always interferes with the minimized state of windows. This can result in windows not suspending their work when minimized.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="unredirectInformation">
<property name="visible">
<bool>false</bool>
</property>
<property name="text">
<string>Having full screen windows bypass the compositor is not supported on every hardware.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Information</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="compositingEnabled">
<property name="text">
@ -143,24 +228,21 @@
<item row="7" column="1">
<widget class="QComboBox" name="type"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="openGLPlatformInterfaceLabel">
<property name="text">
<string>OpenGL interface:</string>
<item row="8" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="openGLPlatformInterface"/>
</item>
<item row="10" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Tearing prevention (&quot;vsync&quot;):</string>
</property>
</widget>
</item>
<item row="10" column="1">
<item row="9" column="1">
<widget class="QComboBox" name="tearingPrevention">
<item>
<property name="text">
@ -189,14 +271,14 @@
</item>
</widget>
</item>
<item row="11" column="0">
<item row="10" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Keep window thumbnails:</string>
</property>
</widget>
</item>
<item row="11" column="1">
<item row="10" column="1">
<widget class="QComboBox" name="windowThumbnail">
<item>
<property name="text">
@ -215,149 +297,41 @@
</item>
</widget>
</item>
<item row="13" column="0">
<item row="12" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Expert:</string>
</property>
</widget>
</item>
<item row="13" column="1">
<item row="12" column="1">
<widget class="QCheckBox" name="unredirectFullscreen">
<property name="text">
<string>Suspend compositor for full screen windows</string>
</property>
</widget>
</item>
<item row="14" column="0">
<item row="13" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Experimental:</string>
</property>
</widget>
</item>
<item row="14" column="1">
<item row="13" column="1">
<widget class="QCheckBox" name="colorCorrection">
<property name="text">
<string>Enable color correction</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="KMessageWidget" name="glCrashedWarning">
<property name="text">
<string>OpenGL compositing (the default) has crashed KWin in the past.
This was most likely due to a driver bug.
If you think that you have meanwhile upgraded to a stable driver,
you can reset this protection but be aware that this might result in an immediate crash!
Alternatively, you might want to use the XRender backend instead.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="visible">
<bool>false</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="interfaceWarning">
<property name="text">
<string>EGL is not supported by all OpenGL drivers. If not supported the Compositor will be disabled.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="visible">
<bool>false</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="scaleWarning">
<property name="text">
<string>Scale method &quot;Accurate&quot; is not supported by all hardware and can cause performance regressions and rendering artifacts.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="visible">
<bool>false</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="tearingWarning">
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="visible">
<bool>false</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="windowThumbnailWarning">
<property name="text">
<string>Keeping the window thumbnail always interferes with the minimized state of windows. This can result in windows not suspending their work when minimized.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="visible">
<bool>false</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="unredirectInformation">
<property name="text">
<string>Having full screen windows bypass the compositor is not supported on every hardware.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="visible">
<bool>false</bool>
</property>
<property name="messageType">
<enum>KMessageWidget::Information</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KMessageWidget</class>
<extends>QFrame</extends>
<header location="global">kmessagewidget.h</header>
<header>kmessagewidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>

View file

@ -83,7 +83,6 @@ KWinCompositingSettings::KWinCompositingSettings(QWidget *parent, const QVariant
connect(reenableGLAction, &QAction::triggered, m_compositing, &KWin::Compositing::Compositing::reenableOpenGLDetection);
connect(reenableGLAction, &QAction::triggered, m_form.glCrashedWarning, &KMessageWidget::animatedHide);
m_form.glCrashedWarning->addAction(reenableGLAction);
m_form.interfaceWarning->setIcon(QIcon::fromTheme(QStringLiteral("dialog-warning")));
m_form.scaleWarning->setIcon(QIcon::fromTheme(QStringLiteral("dialog-warning")));
m_form.tearingWarning->setIcon(QIcon::fromTheme(QStringLiteral("dialog-warning")));
m_form.windowThumbnailWarning->setIcon(QIcon::fromTheme(QStringLiteral("dialog-warning")));
@ -166,22 +165,6 @@ void KWinCompositingSettings::init()
}
);
// openglPlatformInterface
m_form.openGLPlatformInterface->setModel(m_compositing->openGLPlatformInterfaceModel());
m_form.openGLPlatformInterface->setCurrentIndex(m_compositing->openGLPlatformInterface());
connect(m_compositing, &Compositing::openGLPlatformInterfaceChanged, m_form.openGLPlatformInterface, &QComboBox::setCurrentIndex);
connect(m_form.openGLPlatformInterface, currentIndexChangedSignal, m_compositing, &Compositing::setOpenGLPlatformInterface);
connect(m_form.openGLPlatformInterface, currentIndexChangedSignal,
[this]() {
if (m_form.openGLPlatformInterface->count() > 1 // only if egl and glx are supported
&& m_form.openGLPlatformInterface->currentData().toString() == QStringLiteral("egl")) {
m_form.interfaceWarning->animatedShow();
} else {
m_form.interfaceWarning->animatedHide();
}
}
);
// unredirect fullscreen
m_form.unredirectFullscreen->setChecked(m_compositing->unredirectFullscreen());
connect(m_compositing, &Compositing::unredirectFullscreenChanged, m_form.unredirectFullscreen, &QCheckBox::setChecked);
@ -219,8 +202,6 @@ void KWinCompositingSettings::init()
m_form.glScaleFilterLabel->setVisible(currentType != CompositingType::XRENDER_INDEX);
m_form.xrScaleFilter->setVisible(currentType == CompositingType::XRENDER_INDEX);
m_form.xrScaleFilterLabel->setVisible(currentType == CompositingType::XRENDER_INDEX);
m_form.openGLPlatformInterface->setVisible(currentType != CompositingType::XRENDER_INDEX);
m_form.openGLPlatformInterfaceLabel->setVisible(currentType != CompositingType::XRENDER_INDEX);
m_form.colorCorrection->setEnabled(currentType == CompositingType::OPENGL31_INDEX || currentType == CompositingType::OPENGL20_INDEX);
};
showHideBasedOnType();