Fix client flick at untab when free, split arrange closed with free mode

This commit is contained in:
Martin Duquesnoy 2012-01-29 05:18:51 +01:00
parent 3361a3b8bc
commit 8f52715fe3
4 changed files with 11 additions and 1 deletions

View File

@ -559,6 +559,7 @@ client_untab(struct client *c)
{
client_tab_focus(cc);
c->flags &= ~CLIENT_TABBED;
c->flags |= CLIENT_IGNORE_ENTER;
c->tabmaster = NULL;
/* Looking for tabbed client in cc, if there is not
@ -618,7 +619,10 @@ client_focus(struct client *c)
if(c->flags & CLIENT_FREE
&& !(c->flags & (CLIENT_FULLSCREEN | CLIENT_TABBED)))
{
c->tag->flags |= CLIENT_IGNORE_ENTER;
XRaiseWindow(W->dpy, c->frame);
}
XSetInputFocus(W->dpy, c->win, RevertToPointerRoot, CurrentTime);
}

View File

@ -64,6 +64,8 @@ event_enternotify(XEvent *e)
{
if(c->flags & CLIENT_IGNORE_ENTER)
c->flags ^= CLIENT_IGNORE_ENTER;
else if(c->tag->flags & TAG_IGNORE_ENTER)
c->tag->flags ^= TAG_IGNORE_ENTER;
else if(c != W->client && !(c->flags & CLIENT_TABBED))
client_focus(c);
}

View File

@ -319,6 +319,9 @@ layout_split_arrange_closed(struct client *ghost)
bool b = false;
enum position p;
if(!(ghost->flags & CLIENT_TILED))
return;
/* Search for single parent for easy resize
* Example case:
* ___________ ___________

View File

@ -166,6 +166,7 @@ struct tag
char *name;
int id;
#define TAG_URGENT 0x01
#define TAG_IGNORE_ENTER 0x02
Flags flags;
SLIST_HEAD(, client) clients;
TAILQ_HEAD(ssub, layout_set) sets;