fixed input focus issues reported of current tagbar

This commit is contained in:
Anselm R. Garbe 2006-07-04 15:49:10 +02:00
parent 153f2169aa
commit 857030f02c
2 changed files with 7 additions and 2 deletions

View File

@ -103,9 +103,10 @@ handle_buttonpress(XEvent *e)
if((f = frame_of_win(ev->window))) {
ev->state &= valid_mask;
if(blitz_bpress_input(&f->tagbar, ev->x, ev->y))
if(blitz_bpress_input(&f->tagbar, ev->x, ev->y)) {
draw_frame(f);
if((ev->state & def.mod) == def.mod) {
}
else if((ev->state & def.mod) == def.mod) {
focus(f->client, True);
switch(ev->button) {
case Button1:

View File

@ -174,6 +174,8 @@ blitz_bpress_input(BlitzInput *i, int x, int y)
if(!(i->drag = blitz_ispointinrect(x, y, &i->rect)))
return False;
XSetInputFocus(i->blitz->dpy, i->win,
RevertToPointerRoot, CurrentTime);
ostart = i->curstart;
oend = i->curend;
i->curstart = i->curend = charof(i, x, y);
@ -187,6 +189,8 @@ blitz_brelease_input(BlitzInput *i, int x, int y)
if(!(i->drag = blitz_ispointinrect(x, y, &i->rect)))
return False;
XSetInputFocus(i->blitz->dpy, i->win,
RevertToPointerRoot, CurrentTime);
oend = i->curend;
i->curend = charof(i, x, y);
i->drag = False;