Changeset View
Changeset View
Standalone View
Standalone View
rules.cpp
Show All 24 Lines | |||||
25 | #include <QRegExp> | 25 | #include <QRegExp> | ||
26 | #include <QTemporaryFile> | 26 | #include <QTemporaryFile> | ||
27 | #include <QFile> | 27 | #include <QFile> | ||
28 | #include <QFileInfo> | 28 | #include <QFileInfo> | ||
29 | #include <QDebug> | 29 | #include <QDebug> | ||
30 | #include <QDir> | 30 | #include <QDir> | ||
31 | 31 | | |||
32 | #ifndef KCMRULES | 32 | #ifndef KCMRULES | ||
33 | #include "client.h" | 33 | #include "x11client.h" | ||
34 | #include "client_machine.h" | 34 | #include "client_machine.h" | ||
35 | #include "screens.h" | 35 | #include "screens.h" | ||
36 | #include "workspace.h" | 36 | #include "workspace.h" | ||
37 | #endif | 37 | #endif | ||
38 | 38 | | |||
39 | namespace KWin | 39 | namespace KWin | ||
40 | { | 40 | { | ||
41 | 41 | | |||
▲ Show 20 Lines • Show All 897 Lines • ▼ Show 20 Line(s) | 903 | { | |||
939 | QSize s = adjustedSize(); | 939 | QSize s = adjustedSize(); | ||
940 | if (s != size() && s.isValid()) | 940 | if (s != size() && s.isValid()) | ||
941 | resizeWithChecks(s); | 941 | resizeWithChecks(s); | ||
942 | // Autogrouping : Only checked on window manage | 942 | // Autogrouping : Only checked on window manage | ||
943 | // AutogroupInForeground : Only checked on window manage | 943 | // AutogroupInForeground : Only checked on window manage | ||
944 | // AutogroupById : Only checked on window manage | 944 | // AutogroupById : Only checked on window manage | ||
945 | // StrictGeometry | 945 | // StrictGeometry | ||
946 | setShortcut(rules()->checkShortcut(shortcut().toString())); | 946 | setShortcut(rules()->checkShortcut(shortcut().toString())); | ||
947 | // see also Client::setActive() | 947 | // see also X11Client::setActive() | ||
948 | if (isActive()) { | 948 | if (isActive()) { | ||
949 | setOpacity(rules()->checkOpacityActive(qRound(opacity() * 100.0)) / 100.0); | 949 | setOpacity(rules()->checkOpacityActive(qRound(opacity() * 100.0)) / 100.0); | ||
950 | workspace()->disableGlobalShortcutsForClient(rules()->checkDisableGlobalShortcuts(false)); | 950 | workspace()->disableGlobalShortcutsForClient(rules()->checkDisableGlobalShortcuts(false)); | ||
951 | } else | 951 | } else | ||
952 | setOpacity(rules()->checkOpacityInactive(qRound(opacity() * 100.0)) / 100.0); | 952 | setOpacity(rules()->checkOpacityInactive(qRound(opacity() * 100.0)) / 100.0); | ||
953 | setDesktopFileName(rules()->checkDesktopFile(desktopFileName()).toUtf8()); | 953 | setDesktopFileName(rules()->checkDesktopFile(desktopFileName()).toUtf8()); | ||
954 | } | 954 | } | ||
955 | 955 | | |||
956 | void Client::updateWindowRules(Rules::Types selection) | 956 | void X11Client::updateWindowRules(Rules::Types selection) | ||
957 | { | 957 | { | ||
958 | if (!isManaged()) // not fully setup yet | 958 | if (!isManaged()) // not fully setup yet | ||
959 | return; | 959 | return; | ||
960 | AbstractClient::updateWindowRules(selection); | 960 | AbstractClient::updateWindowRules(selection); | ||
961 | } | 961 | } | ||
962 | 962 | | |||
963 | void AbstractClient::updateWindowRules(Rules::Types selection) | 963 | void AbstractClient::updateWindowRules(Rules::Types selection) | ||
964 | { | 964 | { | ||
▲ Show 20 Lines • Show All 200 Lines • ▼ Show 20 Line(s) | |||||
1165 | { | 1165 | { | ||
1166 | m_updateTimer->start(); | 1166 | m_updateTimer->start(); | ||
1167 | } | 1167 | } | ||
1168 | 1168 | | |||
1169 | void RuleBook::setUpdatesDisabled(bool disable) | 1169 | void RuleBook::setUpdatesDisabled(bool disable) | ||
1170 | { | 1170 | { | ||
1171 | m_updatesDisabled = disable; | 1171 | m_updatesDisabled = disable; | ||
1172 | if (!disable) { | 1172 | if (!disable) { | ||
1173 | foreach (Client * c, Workspace::self()->clientList()) | 1173 | foreach (X11Client *c, Workspace::self()->clientList()) | ||
1174 | c->updateWindowRules(Rules::All); | 1174 | c->updateWindowRules(Rules::All); | ||
1175 | } | 1175 | } | ||
1176 | } | 1176 | } | ||
1177 | 1177 | | |||
1178 | #endif | 1178 | #endif | ||
1179 | 1179 | | |||
1180 | } // namespace | 1180 | } // namespace |