fixed detach annoyances, identified problem with visual attaching clients from detached clients

This commit is contained in:
garbeam 2005-12-09 01:42:52 +02:00
parent 100c1b38db
commit d824b961b0
3 changed files with 10 additions and 7 deletions

View File

@ -333,11 +333,14 @@ void attach_client(Client * c)
}
void detach_client(Client *c) {
Page *p;
if (c->frame)
c->frame->area->layout->detach(c->frame->area, c);
if (c->destroyed)
destroy_client(c);
sel_page(get_sel_page());
p = get_sel_page();
sel_page(p);
draw_page(p);
}
Client *get_sel_client()

View File

@ -28,7 +28,7 @@ static void _attach_client(void *obj, char *cmd);
static void _detach_client(void *obj, char *cmd);
static void _close_client(void *obj, char *cmd);
static void pager(void *obj, char *cmd);
static void icons(void *obj, char *cmd);
static void detached_clients(void *obj, char *cmd);
/* action table for /ctl namespace */
Action wm_acttbl[] = {
@ -40,7 +40,7 @@ Action wm_acttbl[] = {
{"close", _close_client},
{"quit", quit},
{"pager", pager},
{"icons", icons},
{"detached clients", detached_clients},
{0, 0}
};
@ -279,7 +279,7 @@ static void pager(void *obj, char *cmd)
}
}
static void draw_icons()
static void draw_detached_clients()
{
unsigned int i, ic, ir, tw, th, rows, cols, size;
int dx, dy;
@ -317,7 +317,7 @@ static void draw_icons()
}
static void icons(void *obj, char *cmd)
static void detached_clients(void *obj, char *cmd)
{
XEvent ev;
int i, n;
@ -329,7 +329,7 @@ static void icons(void *obj, char *cmd)
XClearWindow(dpy, transient);
XMapRaised(dpy, transient);
draw_icons();
draw_detached_clients();
while (XGrabKeyboard
(dpy, transient, True, GrabModeAsync, GrabModeAsync,
CurrentTime) != GrabSuccess)

View File

@ -130,7 +130,7 @@ kbind normal $MODKEY-C-w,y wmirc
kbind normal $MODKEY-t 'extern xterm ''+sb'' -bg ''#000000'' -fg ''#ffffff'' -cr ''#ffffff'' -sl 4000 -fn -artwiz-smoothansi-*-*-*-*-*-*-*-*-*-*-*-*'
kbind normal $MODKEY-d 'wmir write /wm/ctl detach'
kbind normal $MODKEY-a 'wmir write /wm/ctl attach'
kbind normal $MODKEY-S-a 'wmir write /wm/ctl icons'
kbind normal $MODKEY-S-a 'wmir write /wm/ctl ''detached clients''
kbind normal $MODKEY-Return 'wmir write /wm/sel/ctl ''select zoomed'''
kbind normal $MODKEY-C-y 'wmir write /wm/ctl new'
kbind normal $MODKEY-u 'wmir write /wm/sel/layout/sel/frame/sel/locked 0'