Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added notagsteal shifty.config.apps property.

  • Loading branch information...
commit 90911d6ea2fd729cf0fc68c4f408d13ea833f3ab 1 parent 62ea299
authored December 27, 2012

Showing 1 changed file with 17 additions and 1 deletion. Show diff stats Hide diff stats

  1. 18  init.lua
18  init.lua
@@ -459,7 +459,7 @@ end
459 459
 --            rc.lua
460 460
 --@param c : client to be matched
461 461
 function match(c, startup)
462  
-    local nopopup, intrusive, nofocus, run, slave
  462
+    local nopopup, intrusive, nofocus, run, slave, notagsteal
463 463
     local wfact, struts, geom, float
464 464
     local target_tag_names, target_tags = {}, {}
465 465
     local typ = c.type
@@ -605,6 +605,7 @@ function match(c, startup)
605 605
                         awful.client.property.set(c, kk, vv)
606 606
                     end
607 607
                 end
  608
+                if a.notagsteal ~= nil then notagsteal = a.notagsteal end
608 609
             end
609 610
         end
610 611
     end
@@ -698,6 +699,21 @@ function match(c, startup)
698 699
     if geom then c:geometry(geom) end
699 700
     if struts then c:struts(struts) end
700 701
 
  702
+    -- prevent the client from stealing focus if it is on another tag
  703
+    if notagsteal then
  704
+      nofocus = true
  705
+      nopopup = true
  706
+
  707
+      for i, t1 in ipairs(target_tags) do
  708
+        for j, t2 in ipairs(sel) do
  709
+          if t1 == t2 then
  710
+            nofocus = false
  711
+            nopopup = false
  712
+          end
  713
+        end
  714
+      end
  715
+    end
  716
+
701 717
     local showtags = {}
702 718
     local u = nil
703 719
     if #target_tags > 0 and not startup then

0 notes on commit 90911d6

Please sign in to comment.
Something went wrong with that request. Please try again.