[hackers] [wmii] Check for pending X11 events after serving a 9p connection.

From: Kris Maglione <jg_AT_suckless.org>
Date: Tue Feb 20 04:59:16 2007

changeset: 1912:d1f81815a442
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Feb 19 22:55:18 2007 -0500
summary: Check for pending X11 events after serving a 9p connection.

diff -r 07be89ca7f8f -r d1f81815a442 client.c
--- a/client.c Mon Feb 19 17:04:38 2007 -0500
+++ b/client.c Mon Feb 19 22:55:18 2007 -0500
@@ -47,9 +47,14 @@ create_client(Window w, XWindowAttribute
         XAddToSaveSet(blz.dpy, c->win);
         fwa.override_redirect = 1;
         fwa.background_pixmap = ParentRelative;
- fwa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask
- | ExposureMask | PointerMotionMask | KeyPressMask
- | ButtonPressMask | ButtonReleaseMask;
+ fwa.event_mask =
+ SubstructureRedirectMask
+ | SubstructureNotifyMask
+ | ExposureMask
+ | PointerMotionMask
+ | KeyPressMask
+ | ButtonPressMask
+ | ButtonReleaseMask;
         c->framewin = XCreateWindow(
                 /* display */ blz.dpy,
                 /* parent */ blz.root,
@@ -195,7 +200,10 @@ focus(Client *c, Bool restack) {
         View *v;
         Frame *f;
 
- if(!(f = c->sel)) return;
+ f = c->sel;
+ if(!f)
+ return;
+
         v = f->area->view;
         arrange_column(f->area, False);
         focus_view(screen, v);
diff -r 07be89ca7f8f -r d1f81815a442 main.c
--- a/main.c Mon Feb 19 17:04:38 2007 -0500
+++ b/main.c Mon Feb 19 22:55:18 2007 -0500
@@ -243,6 +243,12 @@ init_traps() {
         }
 }
 
+void
+check_9pcon(IXPConn *c) {
+ serve_9pcon(c);
+ check_x_event(c);
+}
+
 int
 main(int argc, char *argv[]) {
         char *wmiirc, *errstr, *namespace, *tmp;
@@ -366,7 +372,7 @@ main(int argc, char *argv[]) {
                 }
         }
 
- ixp_server_open_conn(&srv, i, &p9srv, serve_9pcon, nil);
+ ixp_server_open_conn(&srv, i, &p9srv, check_9pcon, nil);
         ixp_server_open_conn(&srv, ConnectionNumber(blz.dpy), nil, check_x_event, nil);
 
         view = nil;
Received on Tue Feb 20 2007 - 04:59:16 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:31 UTC