[hackers] [wmii] Add padding to the wimenu prompt. Closes issue #177. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Tue, 6 Apr 2010 19:53:08 +0000 (UTC)

changeset: 2601:931a509765b5
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Tue Apr 06 15:53:33 2010 -0400
files: alternative_wmiircs/python/pygmi/util.py cmd/menu/menu.c cmd/wmii/Makefile cmd/wmii/fns.h cmd/wmii/mouse.c
description:
Add padding to the wimenu prompt. Closes issue #177.

diff -r 5973799cd90a -r 931a509765b5 alternative_wmiircs/python/pygmi/util.py
--- a/alternative_wmiircs/python/pygmi/util.py Mon Jan 25 02:01:19 2010 -0500
+++ b/alternative_wmiircs/python/pygmi/util.py Tue Apr 06 15:53:33 2010 -0400
@@ -29,8 +29,9 @@
     for d in path:
         try:
             for f in os.listdir(d):
- if f not in names and os.access('%s/%s' % (d, f),
- os.X_OK):
+ p = '%s/%s' % (d, f)
+ if f not in names and os.access(p, os.X_OK) and (
+ os.path.isfile(p) or os.path.islink(p)):
                     names.append(f)
         except Exception:
             pass
diff -r 5973799cd90a -r 931a509765b5 cmd/menu/menu.c
--- a/cmd/menu/menu.c Mon Jan 25 02:01:19 2010 -0500
+++ b/cmd/menu/menu.c Tue Apr 06 15:53:33 2010 -0400
@@ -144,7 +144,7 @@
         rp = ZR; // SET(rp)
         if (prompt) {
                 if (!promptw)
- promptw = textwidth(font, prompt) + 2 * ltwidth;
+ promptw = textwidth(font, prompt) + 2 * ltwidth + pad;
                 rd.min.x += promptw;
 
                 rp = r;
diff -r 5973799cd90a -r 931a509765b5 cmd/wmii/Makefile
--- a/cmd/wmii/Makefile Mon Jan 25 02:01:19 2010 -0500
+++ b/cmd/wmii/Makefile Tue Apr 06 15:53:33 2010 -0400
@@ -18,6 +18,7 @@
         client \
         column \
         div \
+ error \
         event \
         ewmh \
         float \
diff -r 5973799cd90a -r 931a509765b5 cmd/wmii/fns.h
--- a/cmd/wmii/fns.h Mon Jan 25 02:01:19 2010 -0500
+++ b/cmd/wmii/fns.h Tue Apr 06 15:53:33 2010 -0400
@@ -121,6 +121,13 @@
 int stack_count(Frame*, int*);
 Frame* stack_find(Area*, Frame*, int, bool);
 
+/* error.c */
+#define waserror() setjmp(pusherror())
+void error(char*, ...);
+void nexterror(void);
+void poperror(void);
+jmp_buf* pusherror(void);
+
 /* event.c */
 void check_x_event(IxpConn*);
 void dispatch_event(XEvent*);
diff -r 5973799cd90a -r 931a509765b5 cmd/wmii/mouse.c
--- a/cmd/wmii/mouse.c Mon Jan 25 02:01:19 2010 -0500
+++ b/cmd/wmii/mouse.c Tue Apr 06 15:53:33 2010 -0400
@@ -179,6 +179,7 @@
                 case PropertyNotify:
                         dispatch_event(&ev);
                 default:
+ Dprint(DEvent, "readmouse(): ignored: %E\n", &ev);
                         continue;
                 case ButtonPress:
                 case ButtonRelease:
@@ -597,14 +598,17 @@
         q = quadrant(r, p);
         if(rect_haspoint_p(p, f->grabbox)) {
                 cur = cursor[CurTCross];
- if(exec) mouse_movegrabbox(f->client, false);
+ if(exec)
+ mouse_movegrabbox(f->client, false);
         }
         else if(f->area->floating) {
- if(p.x <= 2 || p.y <= 2
+ if(p.x <= 2
+ || p.y <= 2
                 || r.max.x - p.x <= 2
                 || r.max.y - p.y <= 2) {
                         cur = quad_cursor(q);
- if(exec) mouse_resize(f->client, q, false);
+ if(exec)
+ mouse_resize(f->client, q, false);
                 }
                 else if(exec && rect_haspoint_p(p, f->titlebar))
                         mouse_movegrabbox(f->client, true);
Received on Tue Apr 06 2010 - 19:53:08 UTC

This archive was generated by hypermail 2.2.0 : Tue Apr 06 2010 - 20:00:06 UTC