awful.tag.setscreen: Check if old_screen == new_screen
Setting a tag's screen to what it already is shouldn't have any bad effects. However, this code messed up the tag order and selection status. Fix this by returning early if the tag already has the right screen. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
ca92846bb2
commit
dbfe624f67
|
@ -271,12 +271,12 @@ end
|
|||
-- @param s Screen number
|
||||
function tag.setscreen(t, s)
|
||||
local s = s or capi.mouse.screen
|
||||
local old_screen = tag.getproperty(t, "screen")
|
||||
if s == old_screen then return end
|
||||
|
||||
-- Keeping the old index make very little sense when changing screen
|
||||
tag.setproperty(t, "index", nil)
|
||||
|
||||
local old_screen = tag.getproperty(t,"screen")
|
||||
|
||||
-- Change the screen
|
||||
tag.setproperty(t, "screen", s)
|
||||
|
||||
|
|
Loading…
Reference in New Issue