mirror of
https://github.com/0intro/wmii
synced 2024-11-22 05:42:05 +03:00
Add padding to the wimenu prompt. Closes issue #177.
This commit is contained in:
parent
4757b9af11
commit
e42c5a1be6
@ -29,8 +29,9 @@ def program_list(path):
|
|||||||
for d in path:
|
for d in path:
|
||||||
try:
|
try:
|
||||||
for f in os.listdir(d):
|
for f in os.listdir(d):
|
||||||
if f not in names and os.access('%s/%s' % (d, f),
|
p = '%s/%s' % (d, f)
|
||||||
os.X_OK):
|
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)
|
names.append(f)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
@ -144,7 +144,7 @@ _menu_draw(bool draw) {
|
|||||||
rp = ZR; // SET(rp)
|
rp = ZR; // SET(rp)
|
||||||
if (prompt) {
|
if (prompt) {
|
||||||
if (!promptw)
|
if (!promptw)
|
||||||
promptw = textwidth(font, prompt) + 2 * ltwidth;
|
promptw = textwidth(font, prompt) + 2 * ltwidth + pad;
|
||||||
rd.min.x += promptw;
|
rd.min.x += promptw;
|
||||||
|
|
||||||
rp = r;
|
rp = r;
|
||||||
|
@ -18,6 +18,7 @@ OBJ = area \
|
|||||||
client \
|
client \
|
||||||
column \
|
column \
|
||||||
div \
|
div \
|
||||||
|
error \
|
||||||
event \
|
event \
|
||||||
ewmh \
|
ewmh \
|
||||||
float \
|
float \
|
||||||
|
@ -121,6 +121,13 @@ bool find(Area**, Frame**, int, bool, bool);
|
|||||||
int stack_count(Frame*, int*);
|
int stack_count(Frame*, int*);
|
||||||
Frame* stack_find(Area*, Frame*, int, bool);
|
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 */
|
/* event.c */
|
||||||
void check_x_event(IxpConn*);
|
void check_x_event(IxpConn*);
|
||||||
void dispatch_event(XEvent*);
|
void dispatch_event(XEvent*);
|
||||||
|
@ -179,6 +179,7 @@ readmouse(Point *p, uint *button) {
|
|||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
dispatch_event(&ev);
|
dispatch_event(&ev);
|
||||||
default:
|
default:
|
||||||
|
Dprint(DEvent, "readmouse(): ignored: %E\n", &ev);
|
||||||
continue;
|
continue;
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
@ -597,14 +598,17 @@ mouse_checkresize(Frame *f, Point p, bool exec) {
|
|||||||
q = quadrant(r, p);
|
q = quadrant(r, p);
|
||||||
if(rect_haspoint_p(p, f->grabbox)) {
|
if(rect_haspoint_p(p, f->grabbox)) {
|
||||||
cur = cursor[CurTCross];
|
cur = cursor[CurTCross];
|
||||||
if(exec) mouse_movegrabbox(f->client, false);
|
if(exec)
|
||||||
|
mouse_movegrabbox(f->client, false);
|
||||||
}
|
}
|
||||||
else if(f->area->floating) {
|
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.x - p.x <= 2
|
||||||
|| r.max.y - p.y <= 2) {
|
|| r.max.y - p.y <= 2) {
|
||||||
cur = quad_cursor(q);
|
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))
|
else if(exec && rect_haspoint_p(p, f->titlebar))
|
||||||
mouse_movegrabbox(f->client, true);
|
mouse_movegrabbox(f->client, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user