We are now able to suspend desktop effects for fullscreen windows
This commit is contained in:
parent
c79894945c
commit
5448c7ce36
3 changed files with 25 additions and 4 deletions
|
@ -89,6 +89,12 @@ bool Compositing::xrSclaleFilter() const
|
||||||
return kwinConfig.readEntry("XRenderSmoothScale", false);
|
return kwinConfig.readEntry("XRenderSmoothScale", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Compositing::unredirectFullscreen() const
|
||||||
|
{
|
||||||
|
KConfigGroup kwinConfig(KSharedConfig::openConfig("kwinrc"), "Compositing");
|
||||||
|
return kwinConfig.readEntry("UnredirectFullscreen", false);
|
||||||
|
}
|
||||||
|
|
||||||
CompositingType::CompositingType(QObject *parent)
|
CompositingType::CompositingType(QObject *parent)
|
||||||
: QAbstractItemModel(parent) {
|
: QAbstractItemModel(parent) {
|
||||||
|
|
||||||
|
@ -196,7 +202,8 @@ int CompositingType::currentOpenGLType()
|
||||||
return currentIndex;
|
return currentIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompositingType::syncConfig(int openGLType, int animationSpeed, int windowThumbnail, int glSclaleFilter, bool xrSclaleFilter)
|
void CompositingType::syncConfig(int openGLType, int animationSpeed, int windowThumbnail, int glSclaleFilter, bool xrSclaleFilter,
|
||||||
|
bool unredirectFullscreen)
|
||||||
{
|
{
|
||||||
QString backend;
|
QString backend;
|
||||||
bool glLegacy;
|
bool glLegacy;
|
||||||
|
@ -234,6 +241,7 @@ void CompositingType::syncConfig(int openGLType, int animationSpeed, int windowT
|
||||||
kwinConfig.writeEntry("HiddenPreviews", windowThumbnail + 4);
|
kwinConfig.writeEntry("HiddenPreviews", windowThumbnail + 4);
|
||||||
kwinConfig.writeEntry("GLTextureFilter", glSclaleFilter);
|
kwinConfig.writeEntry("GLTextureFilter", glSclaleFilter);
|
||||||
kwinConfig.writeEntry("XRenderSmoothScale", xrSclaleFilter);
|
kwinConfig.writeEntry("XRenderSmoothScale", xrSclaleFilter);
|
||||||
|
kwinConfig.writeEntry("UnredirectFullscreen", unredirectFullscreen);
|
||||||
kwinConfig.sync();
|
kwinConfig.sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ class Compositing : public QObject
|
||||||
Q_PROPERTY(int windowThumbnail READ windowThumbnail CONSTANT);
|
Q_PROPERTY(int windowThumbnail READ windowThumbnail CONSTANT);
|
||||||
Q_PROPERTY(int glSclaleFilter READ glSclaleFilter CONSTANT);
|
Q_PROPERTY(int glSclaleFilter READ glSclaleFilter CONSTANT);
|
||||||
Q_PROPERTY(bool xrSclaleFilter READ xrSclaleFilter CONSTANT);
|
Q_PROPERTY(bool xrSclaleFilter READ xrSclaleFilter CONSTANT);
|
||||||
|
Q_PROPERTY(bool unredirectFullscreen READ unredirectFullscreen CONSTANT);
|
||||||
public:
|
public:
|
||||||
explicit Compositing(QObject *parent = 0);
|
explicit Compositing(QObject *parent = 0);
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ public:
|
||||||
int windowThumbnail() const;
|
int windowThumbnail() const;
|
||||||
int glSclaleFilter() const;
|
int glSclaleFilter() const;
|
||||||
bool xrSclaleFilter() const;
|
bool xrSclaleFilter() const;
|
||||||
|
bool unredirectFullscreen() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -88,7 +90,8 @@ public:
|
||||||
virtual QHash< int, QByteArray > roleNames() const override;
|
virtual QHash< int, QByteArray > roleNames() const override;
|
||||||
|
|
||||||
Q_INVOKABLE int currentOpenGLType();
|
Q_INVOKABLE int currentOpenGLType();
|
||||||
Q_INVOKABLE void syncConfig(int openGLType, int animationSpeed, int windowThumbnail, int glSclaleFilter, bool xrSclaleFilter);
|
Q_INVOKABLE void syncConfig(int openGLType, int animationSpeed, int windowThumbnail, int glSclaleFilter, bool xrSclaleFilter,
|
||||||
|
bool unredirectFullscreen);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void generateCompositing();
|
void generateCompositing();
|
||||||
|
|
|
@ -56,7 +56,7 @@ Item {
|
||||||
checked: false
|
checked: false
|
||||||
anchors.left: col.right
|
anchors.left: col.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: col.height/2
|
anchors.topMargin: col.height/4
|
||||||
onClicked: searchModel.enableWidnowManagement(windowManagement.checked)
|
onClicked: searchModel.enableWidnowManagement(windowManagement.checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +157,16 @@ Item {
|
||||||
onCurrentIndexChanged: apply.enabled = true;
|
onCurrentIndexChanged: apply.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: unredirectFullScreen
|
||||||
|
text: i18n("Suspend desktop effects for \nfull screen windows")
|
||||||
|
checked: compositing.unredirectFullscreen
|
||||||
|
anchors.left: col.right
|
||||||
|
anchors.top: xrScaleFilter.bottom
|
||||||
|
onClicked: apply.enabled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: col
|
id: col
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
@ -236,7 +246,7 @@ Item {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
searchModel.syncConfig();
|
searchModel.syncConfig();
|
||||||
apply.enabled = false;
|
apply.enabled = false;
|
||||||
compositingType.syncConfig(openGLType.currentIndex, animationSpeed.value, windowThumbnail.currentIndex, glScaleFilter.currentIndex, xrScaleFilter.currentIndex == 1);
|
compositingType.syncConfig(openGLType.currentIndex, animationSpeed.value, windowThumbnail.currentIndex, glScaleFilter.currentIndex, xrScaleFilter.currentIndex == 1, unredirectFullScreen.checked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue