[client] Add client_redraw (FS#170)

This commit is contained in:
Arnaud Fontaine 2008-05-11 17:41:04 +01:00
parent 4966c46d60
commit a4c7ffffc7
5 changed files with 18 additions and 0 deletions

View File

@ -125,6 +125,8 @@ DEFAULTS KEY BINDINGS
Zoom client.
*Mod4 \+ Control \+ space*::
Set client floating.
*Mod4 \+ s*::
Redraw the client.
*Mod4 \+ Shift \+ c*::
Kill client.
*Mod4 \+ Shift \+ q*::

View File

@ -129,6 +129,7 @@ keys
key { modkey = {"Mod4", "Control"} key = "space" command = "client_setfloating" }
key { modkey = {"Mod4"} key = "s" command = "client_togglescratch" }
key { modkey = {"Mod4", "Control"} key = "s" command = "client_setscratch" }
key { modkey = {"Mod4"} key = "r" command = "client_redraw" }
key { modkey = {"Mod4", "Shift"} key = "c" command = "client_kill" }
key { modkey = {"Mod4", "Shift"} key = "q" command = "quit" }
key { modkey = {"Mod4", "Control"} key = "r" command = "restart" }

View File

@ -1244,6 +1244,19 @@ uicb_client_setscratch(int screen, char *arg __attribute__ ((unused)))
globalconf.screens[screen].need_arrange = true;
}
void
uicb_client_redraw(int screen __attribute__ ((unused)),
char *arg __attribute__ ((unused)))
{
if(!globalconf.focus->client)
return;
/* Use unmap/map ATM but it would be better to used SendEvent,
* however the client doesn't seem to handle it... */
xcb_unmap_window(globalconf.connection, globalconf.focus->client->win);
xcb_map_window(globalconf.connection, globalconf.focus->client->win);
}
/** Toggle the scratch client's visibility.
* \param screen screen number
* \param arg unused argument

View File

@ -54,6 +54,7 @@ uicb_t uicb_client_focus;
uicb_t uicb_client_setfloating;
uicb_t uicb_client_togglescratch;
uicb_t uicb_client_setscratch;
uicb_t uicb_client_redraw;
DO_SLIST(client_t, client, p_delete)

1
uicb.c
View File

@ -58,6 +58,7 @@ const name_func_link_t UicbList[] =
{ "client_setfloating", uicb_client_setfloating },
{ "client_togglescratch", uicb_client_togglescratch },
{ "client_setscratch", uicb_client_setscratch },
{ "client_redraw", uicb_client_redraw },
/* focus.h */
{ "focus_history", uicb_focus_history },
{ "focus_client_byname", uicb_focus_client_byname },