client: when redrawing a window, set the mouse focus on this window if
it has been performed on this window.
This commit is contained in:
parent
fd35fc6d11
commit
d755a6bb64
|
@ -154,6 +154,9 @@ Misc
|
|||
*Mod4 \+ Shift \+ i*::
|
||||
Print the client class and instance.
|
||||
|
||||
*Mod4 \+ Shift \+ r*::
|
||||
Redraw the focused window.
|
||||
|
||||
CUSTOMIZATION
|
||||
-------------
|
||||
*awesome* is customized by creating a custom '$XDG_CONFIG_HOME/awesome/rc.lua' file.
|
||||
|
|
|
@ -224,6 +224,7 @@ keybinding({ modkey, "Control" }, "Return", function () client.focus:swap(awful.
|
|||
keybinding({ modkey }, "o", awful.client.movetoscreen):add()
|
||||
keybinding({ modkey }, "Tab", awful.client.focus.history.previous):add()
|
||||
keybinding({ modkey }, "u", awful.client.urgent.jumpto):add()
|
||||
keybinding({ modkey, "Shift" }, "r", function () client.focus:redraw() end):add()
|
||||
|
||||
-- Layout manipulation
|
||||
keybinding({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add()
|
||||
|
|
9
client.c
9
client.c
|
@ -1068,8 +1068,17 @@ static int
|
|||
luaA_client_redraw(lua_State *L)
|
||||
{
|
||||
client_t **c = luaA_checkudata(L, 1, "client");
|
||||
|
||||
xcb_unmap_window(globalconf.connection, (*c)->win);
|
||||
xcb_map_window(globalconf.connection, (*c)->win);
|
||||
|
||||
/* Set the focus on the current window if the redraw has been
|
||||
performed on the window where the pointer is currently on
|
||||
because after the unmapping/mapping, the focus is lost */
|
||||
if(globalconf.screen_focus->client_focus == *c)
|
||||
xcb_set_input_focus(globalconf.connection, XCB_INPUT_FOCUS_POINTER_ROOT,
|
||||
(*c)->win, XCB_CURRENT_TIME);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue