Changeset View
Changeset View
Standalone View
Standalone View
rules.cpp
Context not available. | |||||
29 | #include <QFileInfo> | 29 | #include <QFileInfo> | ||
---|---|---|---|---|---|
30 | #include <QDebug> | 30 | #include <QDebug> | ||
31 | 31 | | |||
32 | #include <KWindowEffects> | ||||
33 | | ||||
32 | #ifndef KCMRULES | 34 | #ifndef KCMRULES | ||
33 | #include "client.h" | 35 | #include "client.h" | ||
34 | #include "client_machine.h" | 36 | #include "client_machine.h" | ||
Context not available. | |||||
54 | , maxsizerule(UnusedForceRule) | 56 | , maxsizerule(UnusedForceRule) | ||
55 | , opacityactiverule(UnusedForceRule) | 57 | , opacityactiverule(UnusedForceRule) | ||
56 | , opacityinactiverule(UnusedForceRule) | 58 | , opacityinactiverule(UnusedForceRule) | ||
59 | , blurrule(UnusedForceRule) | ||||
57 | , ignoregeometryrule(UnusedSetRule) | 60 | , ignoregeometryrule(UnusedSetRule) | ||
58 | , desktoprule(UnusedSetRule) | 61 | , desktoprule(UnusedSetRule) | ||
59 | , screenrule(UnusedSetRule) | 62 | , screenrule(UnusedSetRule) | ||
Context not available. | |||||
163 | READ_FORCE_RULE(opacityinactive, , 0); | 166 | READ_FORCE_RULE(opacityinactive, , 0); | ||
164 | if (opacityinactive < 0 || opacityinactive > 100) | 167 | if (opacityinactive < 0 || opacityinactive > 100) | ||
165 | opacityinactive = 100; | 168 | opacityinactive = 100; | ||
169 | READ_FORCE_RULE(blur, ,false); | ||||
166 | READ_SET_RULE(ignoregeometry, , false); | 170 | READ_SET_RULE(ignoregeometry, , false); | ||
167 | READ_SET_RULE(desktop, , 0); | 171 | READ_SET_RULE(desktop, , 0); | ||
168 | READ_SET_RULE(screen, , 0); | 172 | READ_SET_RULE(screen, , 0); | ||
Context not available. | |||||
257 | WRITE_FORCE_RULE(maxsize,); | 261 | WRITE_FORCE_RULE(maxsize,); | ||
258 | WRITE_FORCE_RULE(opacityactive,); | 262 | WRITE_FORCE_RULE(opacityactive,); | ||
259 | WRITE_FORCE_RULE(opacityinactive,); | 263 | WRITE_FORCE_RULE(opacityinactive,); | ||
264 | WRITE_FORCE_RULE(blur,); | ||||
260 | WRITE_SET_RULE(ignoregeometry,); | 265 | WRITE_SET_RULE(ignoregeometry,); | ||
261 | WRITE_SET_RULE(desktop,); | 266 | WRITE_SET_RULE(desktop,); | ||
262 | WRITE_SET_RULE(screen,); | 267 | WRITE_SET_RULE(screen,); | ||
Context not available. | |||||
309 | && maxsizerule == UnusedForceRule | 314 | && maxsizerule == UnusedForceRule | ||
310 | && opacityactiverule == UnusedForceRule | 315 | && opacityactiverule == UnusedForceRule | ||
311 | && opacityinactiverule == UnusedForceRule | 316 | && opacityinactiverule == UnusedForceRule | ||
317 | && blurrule == UnusedForceRule | ||||
312 | && ignoregeometryrule == UnusedSetRule | 318 | && ignoregeometryrule == UnusedSetRule | ||
313 | && desktoprule == UnusedSetRule | 319 | && desktoprule == UnusedSetRule | ||
314 | && screenrule == UnusedSetRule | 320 | && screenrule == UnusedSetRule | ||
Context not available. | |||||
618 | APPLY_FORCE_RULE(maxsize, MaxSize, QSize) | 624 | APPLY_FORCE_RULE(maxsize, MaxSize, QSize) | ||
619 | APPLY_FORCE_RULE(opacityactive, OpacityActive, int) | 625 | APPLY_FORCE_RULE(opacityactive, OpacityActive, int) | ||
620 | APPLY_FORCE_RULE(opacityinactive, OpacityInactive, int) | 626 | APPLY_FORCE_RULE(opacityinactive, OpacityInactive, int) | ||
627 | APPLY_FORCE_RULE(blur, Blur, bool) | ||||
621 | APPLY_RULE(ignoregeometry, IgnoreGeometry, bool) | 628 | APPLY_RULE(ignoregeometry, IgnoreGeometry, bool) | ||
622 | 629 | | |||
623 | APPLY_RULE(desktop, Desktop, int) | 630 | APPLY_RULE(desktop, Desktop, int) | ||
Context not available. | |||||
718 | DISCARD_USED_FORCE_RULE(maxsize); | 725 | DISCARD_USED_FORCE_RULE(maxsize); | ||
719 | DISCARD_USED_FORCE_RULE(opacityactive); | 726 | DISCARD_USED_FORCE_RULE(opacityactive); | ||
720 | DISCARD_USED_FORCE_RULE(opacityinactive); | 727 | DISCARD_USED_FORCE_RULE(opacityinactive); | ||
728 | DISCARD_USED_FORCE_RULE(blur); | ||||
721 | DISCARD_USED_SET_RULE(ignoregeometry); | 729 | DISCARD_USED_SET_RULE(ignoregeometry); | ||
722 | DISCARD_USED_SET_RULE(desktop); | 730 | DISCARD_USED_SET_RULE(desktop); | ||
723 | DISCARD_USED_SET_RULE(screen); | 731 | DISCARD_USED_SET_RULE(screen); | ||
Context not available. | |||||
833 | CHECK_FORCE_RULE(MaxSize, QSize) | 841 | CHECK_FORCE_RULE(MaxSize, QSize) | ||
834 | CHECK_FORCE_RULE(OpacityActive, int) | 842 | CHECK_FORCE_RULE(OpacityActive, int) | ||
835 | CHECK_FORCE_RULE(OpacityInactive, int) | 843 | CHECK_FORCE_RULE(OpacityInactive, int) | ||
844 | CHECK_FORCE_RULE(Blur, bool) | ||||
836 | CHECK_RULE(IgnoreGeometry, bool) | 845 | CHECK_RULE(IgnoreGeometry, bool) | ||
837 | 846 | | |||
838 | CHECK_RULE(Desktop, int) | 847 | CHECK_RULE(Desktop, int) | ||
Context not available. | |||||
945 | // StrictGeometry | 954 | // StrictGeometry | ||
946 | setShortcut(rules()->checkShortcut(shortcut().toString())); | 955 | setShortcut(rules()->checkShortcut(shortcut().toString())); | ||
947 | // see also Client::setActive() | 956 | // see also Client::setActive() | ||
957 | KWindowEffects::enableBlurBehind(window(), client_rules->checkBlur(false)); | ||||
948 | if (isActive()) { | 958 | if (isActive()) { | ||
949 | setOpacity(rules()->checkOpacityActive(qRound(opacity() * 100.0)) / 100.0); | 959 | setOpacity(rules()->checkOpacityActive(qRound(opacity() * 100.0)) / 100.0); | ||
950 | workspace()->disableGlobalShortcutsForClient(rules()->checkDisableGlobalShortcuts(false)); | 960 | workspace()->disableGlobalShortcutsForClient(rules()->checkDisableGlobalShortcuts(false)); | ||
Context not available. |