Changeset View
Changeset View
Standalone View
Standalone View
effects/fade/package/contents/code/main.js
Show All 12 Lines | |||||
13 | This program is distributed in the hope that it will be useful, | 13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. | ||
17 | 17 | | |||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | *********************************************************************/ | 20 | *********************************************************************/ | ||
21 | | ||||
22 | var blacklist = [ | ||||
23 | "ksmserver ksmserver", | ||||
24 | "ksplashqml ksplashqml", | ||||
25 | "ksplashsimple ksplashsimple", | ||||
26 | "ksplashx ksplashx" | ||||
27 | ]; | ||||
28 | | ||||
21 | function isFadeWindow(w) { | 29 | function isFadeWindow(w) { | ||
30 | if (blacklist.indexOf(w.windowClass) != -1) { | ||||
31 | return false; | ||||
32 | } | ||||
22 | if (w.deleted && effect.isGrabbed(w, Effect.WindowClosedGrabRole)) { | 33 | if (w.deleted && effect.isGrabbed(w, Effect.WindowClosedGrabRole)) { | ||
23 | return false; | 34 | return false; | ||
24 | } else if (!w.deleted && effect.isGrabbed(w, Effect.WindowAddedGrabRole)) { | 35 | } else if (!w.deleted && effect.isGrabbed(w, Effect.WindowAddedGrabRole)) { | ||
25 | return false; | 36 | return false; | ||
26 | } | 37 | } | ||
27 | return w.onCurrentDesktop && !isLoginWindow(w) && !w.desktopWindow && !w.utility && !w.minimized; | 38 | return w.onCurrentDesktop && !w.desktopWindow && !w.utility && !w.minimized; | ||
28 | } | | |||
29 | | ||||
30 | function isLoginWindow(w) { | | |||
31 | return w.windowClass == "ksplashx ksplashx" || w.windowClass == "ksplashsimple ksplashsimple" || w.windowClass == "ksplashqml ksplashqml"; | | |||
32 | } | 39 | } | ||
33 | 40 | | |||
34 | var fadeInTime, fadeOutTime, fadeWindows; | 41 | var fadeInTime, fadeOutTime, fadeWindows; | ||
35 | function loadConfig() { | 42 | function loadConfig() { | ||
36 | fadeInTime = animationTime(effect.readConfig("FadeInTime", 150)); | 43 | fadeInTime = animationTime(effect.readConfig("FadeInTime", 150)); | ||
37 | fadeOutTime = animationTime(effect.readConfig("FadeOutTime", 150)) * 4; | 44 | fadeOutTime = animationTime(effect.readConfig("FadeOutTime", 150)) * 4; | ||
38 | fadeWindows = effect.readConfig("FadeWindows", true); | 45 | fadeWindows = effect.readConfig("FadeWindows", true); | ||
39 | } | 46 | } | ||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |