diff --git a/awesomerc.lua b/awesomerc.lua index 867148fed..3d5d73d64 100644 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -155,16 +155,11 @@ local tasklist_buttons = gears.table.join( if c == client.focus then c.minimized = true else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() and c.first_tag then - c.first_tag:view_only() - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() + c:emit_signal( + "request::activate", + "tasklist", + {raise = true} + ) end end), awful.button({ }, 3, client_menu_toggle_fn()), @@ -335,8 +330,9 @@ globalkeys = gears.table.join( local c = awful.client.restore() -- Focus restored client if c then - client.focus = c - c:raise() + c:emit_signal( + "request::activate", "key.unminimize", {raise = true} + ) end end, {description = "restore minimized", group = "client"}), @@ -459,17 +455,14 @@ end -- @DOC_CLIENT_BUTTONS@ clientbuttons = gears.table.join( awful.button({ }, 1, function (c) - client.focus = c; - c:raise() + c:emit_signal("request::activate", "mouse_click", {raise = true}) end), awful.button({ modkey }, 1, function (c) - client.focus = c - c:raise() + c:emit_signal("request::activate", "mouse_click", {raise = true}) awful.mouse.client.move(c) end), awful.button({ modkey }, 3, function (c) - client.focus = c - c:raise() + c:emit_signal("request::activate", "mouse_click", {raise = true}) awful.mouse.client.resize(c) end) ) @@ -559,13 +552,11 @@ client.connect_signal("request::titlebars", function(c) -- buttons for the titlebar local buttons = gears.table.join( awful.button({ }, 1, function() - client.focus = c - c:raise() + c:emit_signal("request::activate", "titlebar", {raise = true}) awful.mouse.client.move(c) end), awful.button({ }, 3, function() - client.focus = c - c:raise() + c:emit_signal("request::activate", "titlebar", {raise = true}) awful.mouse.client.resize(c) end) ) @@ -598,10 +589,7 @@ end) -- Enable sloppy focus, so that focus follows mouse. client.connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end + c:emit_signal("request::activate", "mouse_enter", {raise = true}) end) -- @DOC_BORDER@