aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornebirhos <nebirhos@aol.com>2013-01-07 22:58:55 +0100
committernebirhos <nebirhos@aol.com>2013-01-07 22:58:55 +0100
commitb840f6c25829f11feffac1bc6e29885ff7556956 (patch)
treee4b2294612c42f9aab6a7662371e2013e44317e6
parent9400c679cfe50a6e3d8fd7c1340e0de322d1f5dc (diff)
downloadgnome-shell-extension-stealmyfocus-b840f6c25829f11feffac1bc6e29885ff7556956.tar.gz
Basic blacklist implementation
-rw-r--r--extension.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/extension.js b/extension.js
index 11b7b5c..1127b3a 100644
--- a/extension.js
+++ b/extension.js
@@ -5,6 +5,7 @@ const Lang = imports.lang;
function StealMyFocus() {
this._init();
+ this.blacklist = ["Skype"];
}
StealMyFocus.prototype = {
@@ -14,6 +15,13 @@ StealMyFocus.prototype = {
},
_onWindowDemandsAttention: function(display, window) {
+ for (var i = 0; i < this.blacklist.length; i++) {
+ var name = this.blacklist[i].toLowerCase();
+ if (window.title.toLowerCase().indexOf(name) != -1) {
+ // app in blacklist, return and do nothing
+ return;
+ }
+ }
Main.activateWindow(window);
},