diff --git a/kcmkwin/kwinrules/ruleswidget.h b/kcmkwin/kwinrules/ruleswidget.h
--- a/kcmkwin/kwinrules/ruleswidget.h
+++ b/kcmkwin/kwinrules/ruleswidget.h
@@ -90,6 +90,7 @@
void updateEnableautogroupid();
void updateEnableopacityactive();
void updateEnableopacityinactive();
+ void updateEnableblur();
// workarounds tab
void updateEnablefsplevel();
void updateEnablefpplevel();
diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp
--- a/kcmkwin/kwinrules/ruleswidget.cpp
+++ b/kcmkwin/kwinrules/ruleswidget.cpp
@@ -120,6 +120,7 @@
SETUP(autogroupid, force);
SETUP(opacityactive, force);
SETUP(opacityinactive, force);
+ SETUP(blur, force);
SETUP(shortcut, force);
// workarounds tab
SETUP(fsplevel, force);
@@ -216,6 +217,7 @@
UPDATE_ENABLE_SLOT(autogroupid)
UPDATE_ENABLE_SLOT(opacityactive)
UPDATE_ENABLE_SLOT(opacityinactive)
+UPDATE_ENABLE_SLOT(blur)
void RulesWidget::updateEnableshortcut()
{
shortcut->setEnabled(enable_shortcut->isChecked() && rule_shortcut->currentIndex() != 0);
@@ -538,6 +540,7 @@
LINEEDIT_FORCE_RULE(autogroupid,);
SPINBOX_FORCE_RULE(opacityactive,);
SPINBOX_FORCE_RULE(opacityinactive,);
+ CHECKBOX_FORCE_RULE(blur,);
LINEEDIT_SET_RULE(shortcut,);
COMBOBOX_FORCE_RULE(fsplevel,);
COMBOBOX_FORCE_RULE(fpplevel,);
@@ -643,6 +646,7 @@
LINEEDIT_FORCE_RULE(autogroupid,);
SPINBOX_FORCE_RULE(opacityactive,);
SPINBOX_FORCE_RULE(opacityinactive,);
+ CHECKBOX_FORCE_RULE(blur,);
LINEEDIT_SET_RULE(shortcut,);
COMBOBOX_FORCE_RULE(fsplevel,);
COMBOBOX_FORCE_RULE(fpplevel,);
@@ -764,6 +768,7 @@
//LINEEDIT_PREFILL( autogroupid, );
SPINBOX_PREFILL(opacityactive, , 100 /*get the actual opacity somehow*/);
SPINBOX_PREFILL(opacityinactive, , 100 /*get the actual opacity somehow*/);
+ CHECKBOX_PREFILL(blur, , false /*get the actual blur somehow*/);
//LINEEDIT_PREFILL( shortcut, );
//COMBOBOX_PREFILL( fsplevel, );
//COMBOBOX_PREFILL( fpplevel, );
@@ -803,6 +808,7 @@
//LINEEDIT_PREFILL( autogroupid, );
SPINBOX_PREFILL(opacityactive, , 100 /*get the actual opacity somehow*/);
SPINBOX_PREFILL(opacityinactive, , 100 /*get the actual opacity somehow*/);
+ CHECKBOX_PREFILL(blur, , false /*get the actual blur somehow*/);
//LINEEDIT_PREFILL( shortcut, );
//COMBOBOX_PREFILL( fsplevel, );
//COMBOBOX_PREFILL( fpplevel, );
diff --git a/kcmkwin/kwinrules/ruleswidgetbase.ui b/kcmkwin/kwinrules/ruleswidgetbase.ui
--- a/kcmkwin/kwinrules/ruleswidgetbase.ui
+++ b/kcmkwin/kwinrules/ruleswidgetbase.ui
@@ -7,14 +7,14 @@
0
0
592
- 588
+ 645
-
- 0
+ 3
@@ -2086,14 +2086,14 @@
- -
+
-
Qt::Horizontal
- -
+
-
Qt::Vertical
@@ -2109,7 +2109,7 @@
- -
+
-
Qt::Vertical
@@ -2125,7 +2125,7 @@
- -
+
-
Qt::Horizontal
@@ -2138,7 +2138,7 @@
- -
+
-
KWin tries to prevent windows from taking the focus
@@ -2152,7 +2152,7 @@
- -
+
-
false
@@ -2174,7 +2174,7 @@
- -
+
-
false
@@ -2206,7 +2206,7 @@
- -
+
-
Qt::Horizontal
@@ -2219,7 +2219,7 @@
- -
+
-
This controls the focus protection of the currently active window.
@@ -2233,7 +2233,7 @@
- -
+
-
false
@@ -2255,7 +2255,7 @@
- -
+
-
false
@@ -2287,7 +2287,7 @@
- -
+
-
Windows may prevent to get the focus (activate) when being clicked.
@@ -2299,7 +2299,7 @@
- -
+
-
false
@@ -2321,14 +2321,14 @@
- -
+
-
false
- -
+
-
When used, a window will receive
@@ -2348,7 +2348,7 @@
- -
+
-
false
@@ -2370,28 +2370,28 @@
- -
+
-
false
- -
+
-
Qt::Horizontal
- -
+
-
&Closeable
- -
+
-
false
@@ -2413,21 +2413,21 @@
- -
+
-
false
- -
+
-
Window &type
- -
+
-
false
@@ -2449,7 +2449,7 @@
- -
+
-
false
@@ -2501,7 +2501,7 @@
- -
+
-
Desktop file name
@@ -2511,7 +2511,7 @@
- -
+
-
false
@@ -2548,7 +2548,7 @@
- -
+
-
false
@@ -2558,21 +2558,21 @@
- -
+
-
Qt::Horizontal
- -
+
-
Block compositing
- -
+
-
false
@@ -2594,14 +2594,14 @@
- -
+
-
false
- -
+
-
Qt::Vertical
@@ -2614,6 +2614,42 @@
+ -
+
+
+ Blur
+
+
+
+ -
+
+
+ false
+
+
-
+
+ Do Not Affect
+
+
+ -
+
+ Force
+
+
+ -
+
+ Force Temporarily
+
+
+
+
+ -
+
+
+ false
+
+
+
@@ -2621,16 +2657,16 @@
-
- KLineEdit
- QLineEdit
-
-
KComboBox
QComboBox
+
+ KLineEdit
+ QLineEdit
+
+
YesNoBox
QWidget
diff --git a/rules.h b/rules.h
--- a/rules.h
+++ b/rules.h
@@ -62,6 +62,7 @@
QSize checkMaxSize(QSize s) const;
int checkOpacityActive(int s) const;
int checkOpacityInactive(int s) const;
+ bool checkBlur(bool) const;
bool checkIgnoreGeometry(bool ignore, bool init = false) const;
int checkDesktop(int desktop, bool init = false) const;
int checkScreen(int screen, bool init = false) const;
@@ -110,7 +111,8 @@
Shade = 1<<6, SkipTaskbar = 1<<7, SkipPager = 1<<8,
SkipSwitcher = 1<<9, Above = 1<<10, Below = 1<<11, Fullscreen = 1<<12,
NoBorder = 1<<13, OpacityActive = 1<<14, OpacityInactive = 1<<15,
- Activity = 1<<16, Screen = 1<<17, DesktopFile = 1 << 18, All = 0xffffffff
+ Activity = 1<<16, Screen = 1<<17, DesktopFile = 1 << 18, Blur = 1 << 19,
+ All = 0xffffffff
};
Q_DECLARE_FLAGS(Types, Type)
void write(KConfigGroup&) const;
@@ -130,6 +132,7 @@
bool applyMaxSize(QSize& s) const;
bool applyOpacityActive(int& s) const;
bool applyOpacityInactive(int& s) const;
+ bool applyBlur(bool& s) const;
bool applyIgnoreGeometry(bool& ignore, bool init) const;
bool applyDesktop(int& desktop, bool init) const;
bool applyScreen(int& desktop, bool init) const;
@@ -229,6 +232,8 @@
ForceRule opacityactiverule;
int opacityinactive;
ForceRule opacityinactiverule;
+ bool blur;
+ ForceRule blurrule;
bool ignoregeometry;
SetRule ignoregeometryrule;
int desktop;
diff --git a/rules.cpp b/rules.cpp
--- a/rules.cpp
+++ b/rules.cpp
@@ -29,6 +29,8 @@
#include
#include
+#include
+
#ifndef KCMRULES
#include "client.h"
#include "client_machine.h"
@@ -54,6 +56,7 @@
, maxsizerule(UnusedForceRule)
, opacityactiverule(UnusedForceRule)
, opacityinactiverule(UnusedForceRule)
+ , blurrule(UnusedForceRule)
, ignoregeometryrule(UnusedSetRule)
, desktoprule(UnusedSetRule)
, screenrule(UnusedSetRule)
@@ -163,6 +166,7 @@
READ_FORCE_RULE(opacityinactive, , 0);
if (opacityinactive < 0 || opacityinactive > 100)
opacityinactive = 100;
+ READ_FORCE_RULE(blur, ,false);
READ_SET_RULE(ignoregeometry, , false);
READ_SET_RULE(desktop, , 0);
READ_SET_RULE(screen, , 0);
@@ -256,7 +260,8 @@
WRITE_FORCE_RULE(minsize,);
WRITE_FORCE_RULE(maxsize,);
WRITE_FORCE_RULE(opacityactive,);
- WRITE_FORCE_RULE(opacityinactive,);
+ WRITE_FORCE_RULE(opacityinactive, );
+ WRITE_FORCE_RULE(blur, );
WRITE_SET_RULE(ignoregeometry,);
WRITE_SET_RULE(desktop,);
WRITE_SET_RULE(screen,);
@@ -309,6 +314,7 @@
&& maxsizerule == UnusedForceRule
&& opacityactiverule == UnusedForceRule
&& opacityinactiverule == UnusedForceRule
+ && blurrule == UnusedForceRule
&& ignoregeometryrule == UnusedSetRule
&& desktoprule == UnusedSetRule
&& screenrule == UnusedSetRule
@@ -618,6 +624,7 @@
APPLY_FORCE_RULE(maxsize, MaxSize, QSize)
APPLY_FORCE_RULE(opacityactive, OpacityActive, int)
APPLY_FORCE_RULE(opacityinactive, OpacityInactive, int)
+APPLY_FORCE_RULE(blur, Blur, bool)
APPLY_RULE(ignoregeometry, IgnoreGeometry, bool)
APPLY_RULE(desktop, Desktop, int)
@@ -718,6 +725,7 @@
DISCARD_USED_FORCE_RULE(maxsize);
DISCARD_USED_FORCE_RULE(opacityactive);
DISCARD_USED_FORCE_RULE(opacityinactive);
+ DISCARD_USED_FORCE_RULE(blur);
DISCARD_USED_SET_RULE(ignoregeometry);
DISCARD_USED_SET_RULE(desktop);
DISCARD_USED_SET_RULE(screen);
@@ -833,6 +841,7 @@
CHECK_FORCE_RULE(MaxSize, QSize)
CHECK_FORCE_RULE(OpacityActive, int)
CHECK_FORCE_RULE(OpacityInactive, int)
+CHECK_FORCE_RULE(Blur, bool)
CHECK_RULE(IgnoreGeometry, bool)
CHECK_RULE(Desktop, int)
@@ -945,6 +954,7 @@
// StrictGeometry
setShortcut(rules()->checkShortcut(shortcut().toString()));
// see also Client::setActive()
+ KWindowEffects::enableBlurBehind(window(), client_rules->checkBlur(false));
if (isActive()) {
setOpacity(rules()->checkOpacityActive(qRound(opacity() * 100.0)) / 100.0);
workspace()->disableGlobalShortcutsForClient(rules()->checkDisableGlobalShortcuts(false));