mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
focus scratch window when it appears, and don't select it for focusing in history
This commit is contained in:
parent
1d57d7b327
commit
85e5baa4b1
2 changed files with 6 additions and 2 deletions
6
client.c
6
client.c
|
@ -191,6 +191,8 @@ client_focus(Client *c, int screen, Bool from_mouse)
|
|||
|
||||
if(c)
|
||||
{
|
||||
/* unban the client before focusing or it will fail */
|
||||
client_unban(c);
|
||||
/* save sel in focus history */
|
||||
focus_add_client(c);
|
||||
if(globalconf.screens[c->screen].opacity_unfocused != -1)
|
||||
|
@ -1108,12 +1110,14 @@ uicb_client_setscratch(int screen,
|
|||
* \ingroup ui_callback
|
||||
*/
|
||||
void
|
||||
uicb_client_togglescratch(int screen __attribute__ ((unused)),
|
||||
uicb_client_togglescratch(int screen,
|
||||
char *arg __attribute__ ((unused)))
|
||||
{
|
||||
if(globalconf.scratch.client)
|
||||
{
|
||||
globalconf.scratch.isvisible = !globalconf.scratch.isvisible;
|
||||
if(globalconf.scratch.isvisible)
|
||||
client_focus(globalconf.scratch.client, screen, False);
|
||||
globalconf.screens[globalconf.scratch.client->screen].need_arrange = True;
|
||||
widget_invalidate_cache(globalconf.scratch.client->screen, WIDGET_CACHE_CLIENTS);
|
||||
}
|
||||
|
|
2
focus.c
2
focus.c
|
@ -74,7 +74,7 @@ focus_get_latest_client_for_tags(Tag **t, int nindex)
|
|||
int i = 0;
|
||||
|
||||
for(node = globalconf.focus; node; node = node->next)
|
||||
if(node->client && !node->client->skip)
|
||||
if(node->client && !node->client->skip && node->client != globalconf.scratch.client)
|
||||
for(tags = t; *tags; tags++)
|
||||
if(is_client_tagged(node->client, *tags))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue