changeset: 2441:ea3781647895
user: Kris Maglione <jg_AT_suckless.org>
date: Sun Mar 29 23:07:36 2009 -0400
files: cmd/menu/dat.h cmd/menu/main.c cmd/menu/menu.c
description:
Don't grab the keyboard until EOF when isatty(0)
diff -r 1b1343972f22 -r ea3781647895 cmd/menu/dat.h
--- a/cmd/menu/dat.h Sun Mar 29 23:01:07 2009 -0400
+++ b/cmd/menu/dat.h Sun Mar 29 23:07:36 2009 -0400
@@ -57,6 +57,8 @@
EXTERN IxpServer srv;
+EXTERN Window* barwin;
+
EXTERN Item* items;
EXTERN Item* matchfirst;
EXTERN Item* matchstart;
diff -r 1b1343972f22 -r ea3781647895 cmd/menu/main.c
--- a/cmd/menu/main.c Sun Mar 29 23:01:07 2009 -0400
+++ b/cmd/menu/main.c Sun Mar 29 23:07:36 2009 -0400
@@ -8,6 +8,7 @@
#include <X11/Xproto.h>
#include <locale.h>
#include <strings.h>
+#include <unistd.h>
#include <bio.h>
#include "fns.h"
#define link _link
@@ -251,7 +252,8 @@
initdisplay();
xext_init();
- menu_init();
+ if(!isatty(0))
+ menu_init();
if(address && *address)
client = ixp_mount(address);
@@ -294,6 +296,9 @@
}
}
+ if(barwin == nil)
+ menu_init();
+
init_screens();
i = ixp_serverloop(&srv);
diff -r 1b1343972f22 -r ea3781647895 cmd/menu/menu.c
--- a/cmd/menu/menu.c Sun Mar 29 23:01:07 2009 -0400
+++ b/cmd/menu/menu.c Sun Mar 29 23:07:36 2009 -0400
@@ -4,7 +4,6 @@
#include <unistd.h>
#include "fns.h"
-static Window* barwin;
static Handlers handlers;
static int ltwidth;
Received on Mon Mar 30 2009 - 03:11:36 UTC
This archive was generated by hypermail 2.2.0 : Mon Mar 30 2009 - 03:12:04 UTC