From f04a53528f1c6b13b5ba7fd185eafc958cddab24 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 15 Aug 2015 10:38:37 +0200 Subject: [PATCH] signals: put cursor in the middle left of the focused window Previously, cursor was put in the upper left corner but there are so many stuff that may display tooltips at this place... --- rc/signals.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rc/signals.lua b/rc/signals.lua index 5ae008b..e45f9c0 100644 --- a/rc/signals.lua +++ b/rc/signals.lua @@ -4,17 +4,11 @@ local icons = loadrc("icons", "vbe/icons") local focus_from_mouse = false local function mouse_follow_focus(c) -- Move the mouse to the top left corner - local margin = function() - if c.class == "Chromium" or c.class == "Emacs" then return 30 - else return 10 - end - end - margin = margin() if c.type ~= "dialog" then local cc = c:geometry() local _, x, y = awful.mouse.client.corner(nil, "top_left") - if x and y and cc.width > margin * 2 and cc.height > margin * 2 then - mouse.coords({ x = x + margin , y = y + margin }, true) + if x and y then + mouse.coords({ x = x + 20 , y = y + cc.height / 2 }, true) end end end