windows that start in Withdrawstate are skipped in focus list
This commit is contained in:
parent
629f2efb83
commit
e0c1472249
5
client.c
5
client.c
|
@ -262,6 +262,7 @@ focus(Client *c, Bool selscreen, int screen)
|
||||||
XSetInputFocus(globalconf.display,
|
XSetInputFocus(globalconf.display,
|
||||||
RootWindow(globalconf.display, get_phys_screen(screen)),
|
RootWindow(globalconf.display, get_phys_screen(screen)),
|
||||||
RevertToPointerRoot, CurrentTime);
|
RevertToPointerRoot, CurrentTime);
|
||||||
|
|
||||||
ewmh_update_net_active_window(get_phys_screen(screen));
|
ewmh_update_net_active_window(get_phys_screen(screen));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,8 +338,9 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
|
||||||
/* propagates border_width, if size doesn't change */
|
/* propagates border_width, if size doesn't change */
|
||||||
window_configure(globalconf.display, c->win, c->x, c->y, c->w, c->h, c->border);
|
window_configure(globalconf.display, c->win, c->x, c->y, c->w, c->h, c->border);
|
||||||
|
|
||||||
/* update sizehint */
|
/* update hints */
|
||||||
client_updatesizehints(c);
|
client_updatesizehints(c);
|
||||||
|
client_updatewmhints(c);
|
||||||
|
|
||||||
XSelectInput(globalconf.display, w, StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
|
XSelectInput(globalconf.display, w, StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
|
||||||
|
|
||||||
|
@ -541,6 +543,7 @@ client_updatewmhints(Client *c)
|
||||||
if((wmh = XGetWMHints(globalconf.display, c->win)))
|
if((wmh = XGetWMHints(globalconf.display, c->win)))
|
||||||
{
|
{
|
||||||
c->isurgent = (wmh->flags & XUrgencyHint);
|
c->isurgent = (wmh->flags & XUrgencyHint);
|
||||||
|
c->skip = (wmh->initial_state == WithdrawnState);
|
||||||
XFree(wmh);
|
XFree(wmh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
config.h
2
config.h
|
@ -125,6 +125,8 @@ struct Client
|
||||||
Bool isfixed;
|
Bool isfixed;
|
||||||
/** True if the window is maximized */
|
/** True if the window is maximized */
|
||||||
Bool ismax;
|
Bool ismax;
|
||||||
|
/** True if the client must be skipped from client list */
|
||||||
|
Bool skip;
|
||||||
/** Next client */
|
/** Next client */
|
||||||
Client *next;
|
Client *next;
|
||||||
/** Previous client */
|
/** Previous client */
|
||||||
|
|
8
layout.c
8
layout.c
|
@ -84,9 +84,9 @@ uicb_client_focusnext(int screen, char *arg __attribute__ ((unused)))
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
for(c = sel->next; c && !client_isvisible(c, screen); c = c->next);
|
for(c = sel->next; c && (c->skip || !client_isvisible(c, screen)); c = c->next);
|
||||||
if(!c)
|
if(!c)
|
||||||
for(c = globalconf.clients; c && !client_isvisible(c, screen); c = c->next);
|
for(c = globalconf.clients; c && (c->skip || !client_isvisible(c, screen)); c = c->next);
|
||||||
if(c)
|
if(c)
|
||||||
{
|
{
|
||||||
focus(c, True, screen);
|
focus(c, True, screen);
|
||||||
|
@ -106,11 +106,11 @@ uicb_client_focusprev(int screen, char *arg __attribute__ ((unused)))
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
for(c = sel->prev; c && !client_isvisible(c, screen); c = c->prev);
|
for(c = sel->prev; c && (c->skip || !client_isvisible(c, screen)); c = c->prev);
|
||||||
if(!c)
|
if(!c)
|
||||||
{
|
{
|
||||||
for(c = globalconf.clients; c && c->next; c = c->next);
|
for(c = globalconf.clients; c && c->next; c = c->next);
|
||||||
for(; c && !client_isvisible(c, screen); c = c->prev);
|
for(; c && (c->skip || !client_isvisible(c, screen)); c = c->prev);
|
||||||
}
|
}
|
||||||
if(c)
|
if(c)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue