mirror of
https://github.com/0intro/wmii
synced 2024-11-22 13:52:17 +03:00
fixed mouse grabbing for the moment
This commit is contained in:
parent
76a41dbdab
commit
24f4a8b42d
@ -28,6 +28,10 @@ alloc_client(Window w)
|
||||
void
|
||||
focus_client(Client * c)
|
||||
{
|
||||
Client *old = sel_client();
|
||||
|
||||
if(old)
|
||||
ungrab_client(old, AnyModifier, AnyButton);
|
||||
grab_client(c, Mod1Mask, Button1);
|
||||
grab_client(c, Mod1Mask, Button3);
|
||||
c->frame->sel = c;
|
||||
@ -37,13 +41,6 @@ focus_client(Client * c)
|
||||
invoke_wm_event(def[WM_EVENT_CLIENT_UPDATE]);
|
||||
}
|
||||
|
||||
void
|
||||
unfocus_client(Client * c)
|
||||
{
|
||||
ungrab_client(c, AnyModifier, AnyButton);
|
||||
grab_client(c, AnyModifier, AnyButton);
|
||||
}
|
||||
|
||||
void
|
||||
set_client_state(Client * c, int state)
|
||||
{
|
||||
@ -60,7 +57,7 @@ map_client(Client * c)
|
||||
{
|
||||
XMapRaised(dpy, c->win);
|
||||
set_client_state(c, NormalState);
|
||||
grab_client(c, AnyModifier, AnyButton);
|
||||
/* grab_client(c, AnyModifier, AnyButton); */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -64,9 +64,6 @@ handle_buttonpress(XEvent * e)
|
||||
handle_frame_buttonpress(ev, f);
|
||||
else if((c = win_to_client(ev->window)) && c->frame) {
|
||||
Layout *l = sel_layout();
|
||||
Client *old = sel_client();
|
||||
if(old != c)
|
||||
unfocus_client(old);
|
||||
if(l != c->frame->layout)
|
||||
focus_layout(c->frame->layout);
|
||||
focus_client(c);
|
||||
|
@ -420,8 +420,6 @@ focus_col(Layout *l, Client *c, Bool raise)
|
||||
Client *old = sel_col(l);
|
||||
Cell *cell = c->frame->aux;
|
||||
|
||||
if(old != c)
|
||||
unfocus_client(old);
|
||||
acme->sel = cell->col;
|
||||
cell->col->sel = cell;
|
||||
l->file[L_SEL_FRAME]->content = c->frame->file[F_PREFIX]->content;
|
||||
|
@ -188,8 +188,6 @@ focus_float(Layout *l, Client *c, Bool raise)
|
||||
Float *fl = l->aux;
|
||||
Client *old = fl->sel->sel;
|
||||
|
||||
if(old != c)
|
||||
unfocus_client(old);
|
||||
fl->sel = c->frame;
|
||||
l->file[L_SEL_FRAME]->content = c->frame->file[F_PREFIX]->content;
|
||||
if(raise) {
|
||||
|
@ -329,7 +329,6 @@ draw_detached_clients()
|
||||
configure_client(c);
|
||||
map_client(c);
|
||||
XRaiseWindow(dpy, c->win);
|
||||
grab_client(c, AnyModifier, AnyButton);
|
||||
XSync(dpy, False);
|
||||
c = c->next;
|
||||
}
|
||||
|
@ -223,7 +223,6 @@ void unmap_client(Client * c);
|
||||
void map_client(Client * c);
|
||||
void reparent_client(Client * c, Window w, int x, int y);
|
||||
void focus_client(Client * c);
|
||||
void unfocus_client(Client * c);
|
||||
void attach_client(Client * c);
|
||||
void detach_client(Client * c, Bool unmap);
|
||||
Client *sel_client();
|
||||
|
Loading…
Reference in New Issue
Block a user