aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio/client.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-30 05:01:53 +0000
committerrsc <devnull@localhost>2004-03-30 05:01:53 +0000
commitc005568a7fe03010dcd1b2df311e3cd7f7459448 (patch)
tree69249a0ae26535073d3f89d765335294d6920469 /src/cmd/rio/client.c
parent1cb3fa80938299775382766b4b754e6220bf9831 (diff)
downloadplan9port-c005568a7fe03010dcd1b2df311e3cd7f7459448.tar.gz
plan9port-c005568a7fe03010dcd1b2df311e3cd7f7459448.tar.bz2
plan9port-c005568a7fe03010dcd1b2df311e3cd7f7459448.zip
Border resizing and 9term greying.
Diffstat (limited to 'src/cmd/rio/client.c')
-rw-r--r--src/cmd/rio/client.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/cmd/rio/client.c b/src/cmd/rio/client.c
index c9f24c54..702ba9cb 100644
--- a/src/cmd/rio/client.c
+++ b/src/cmd/rio/client.c
@@ -25,10 +25,12 @@ setactive(Client *c, int on)
if (c->proto & Ptakefocus)
sendcmessage(c->window, wm_protocols, wm_take_focus, 0);
cmapfocus(c);
- }
- else
+ } else {
+ if (c->proto & Plosefocus)
+ sendcmessage(c->window, wm_protocols, wm_lose_focus, 0);
XGrabButton(dpy, AnyButton, AnyModifier, c->parent, False,
ButtonMask, GrabModeAsync, GrabModeSync, None, None);
+ }
draw_border(c, on);
}
@@ -49,7 +51,7 @@ draw_border(Client *c, int active)
pixel = c->screen->inactiveborder;
}
- if (debug) fprintf(stderr, "draw_border 0x%p pixel %ld active %d hold %d\n", c, pixel, active, c->hold);
+ if (debug) fprintf(stderr, "draw_border %p pixel %ld active %d hold %d\n", c, pixel, active, c->hold);
XSetWindowBackground(dpy, c->parent, pixel);
XClearWindow(dpy, c->parent);
}
@@ -104,10 +106,11 @@ nofocus(void)
}
current = 0;
if (w == 0) {
- mask = CWOverrideRedirect;
+ mask = CWOverrideRedirect/*|CWColormap*/;
attr.override_redirect = 1;
+ /* attr.colormap = screens[0].def_cmap;*/
w = XCreateWindow(dpy, screens[0].root, 0, 0, 1, 1, 0,
- CopyFromParent, InputOnly, CopyFromParent, mask, &attr);
+ 0 /*screens[0].depth*/, InputOnly, screens[0].vis, mask, &attr);
XMapWindow(dpy, w);
}
XSetInputFocus(dpy, w, RevertToPointerRoot, timestamp());