Location loc = {0};
if (mons_find(ev->window, &loc))
{
- printf("ENTER(w: 0x%lx c: 0x%lx)\n", ev->window, loc.client->win);
- client_focus(loc.client);
+ printf("ENTER(w: 0x%lx c: 0x%lx s: %d m: %d d: %d)\n", ev->window, loc.client->win, ev->state, ev->mode, ev->detail);
+ if (!ev->state && !ev->mode)
+ {
+ client_focus(loc.client);
+ }
+ else
+ {
+ //XSetInputFocus(X.disp, loc.client->frame, RevertToPointerRoot, CurrentTime);
+ }
}
}
{
X.eventfns[ev.type](&ev);
}
- XSync(X.disp, False);
}
return 0;
void client_adjust(Client* c)
{
int shaded = (c->flags & F_SHADED);
- int minheight = (shaded ? MIN_HEIGHT : 3*MIN_HEIGHT);
+ int floating = (c->flags & (F_DIALOG|F_FLOATING));
+ int minheight = (shaded || !floating ? MIN_HEIGHT : 3*MIN_HEIGHT);
if (c->w < minheight) c->w = minheight;
if (c->h < minheight) c->h = minheight;
XMoveResizeWindow(X.disp, c->frame, c->x, c->y, c->w, (shaded ? minheight : c->h));
}
}
mons_layer(mon);
- XSync(X.disp, False);
}
static void remove_client(Location* loc, Client* c)
client_setshade(prev, (prev->h <= MIN_HEIGHT));
client_setshade(c, (c->h <= MIN_HEIGHT));
client_adjust(prev);
- mouse_totitle(c);
client_adjust(c);
}
}