diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 7b1bec29..aefb086c 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -328,6 +328,13 @@ end) -- Hook function to execute when a new client appears. awful.hooks.manage.register(function (c, startup) + -- If we are not managing this application at startup, + -- move it to the screen where the mouse is. + -- We only do it for filtered windows (i.e. no dock, etc). + if not startup and awful.client.focus.filter(c) then + c.screen = mouse.screen + end + if use_titlebar then -- Add a titlebar awful.titlebar.add(c, { modkey = modkey }) @@ -364,13 +371,6 @@ awful.hooks.manage.register(function (c, startup) awful.client.movetotag(tags[target.screen][target.tag], c) end - -- If we are not managing this applicatin at startup, - -- move it to the screen where the mouse is. - -- We only do it for filtered windows (i.e. no dock, etc). - if not startup and awful.client.focus.filter(c) then - c.screen = mouse.screen - end - -- Do this after tag mapping, so you don't see it on the wrong tag for a split second. client.focus = c