commit fd462e83c757c863a21ea67cb552f1987ffd5dd0
parent d520de9001f8c0a84bb5a23e1b2c6bb34c95200c
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Thu, 6 Jul 2006 14:44:26 +0200
same fix in wmiir.c reported by aki, proceeded with input widget
Diffstat:
2 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/cmd/wmiir.c b/cmd/wmiir.c
@@ -50,6 +50,9 @@ xcreate(char *file)
unsigned int fid;
char *p = strrchr(file, '/');
+ if(!p)
+ p = file;
+
fid = c.root_fid << 2;
/* walk to bottom-most directory */
*p = 0;
diff --git a/liblitz/input.c b/liblitz/input.c
@@ -178,7 +178,6 @@ xdraw(BlitzInput *i)
void
blitz_bpress_input(BlitzInput *i, int button, int x, int y)
{
- XEvent ev;
char *ostart, *oend;
if(blitz_ispointinrect(x, y, &i->rect)) {
@@ -205,23 +204,6 @@ blitz_bpress_input(BlitzInput *i, int button, int x, int y)
GrabModeAsync, GrabModeAsync, None,
i->cursor, CurrentTime) != GrabSuccess)
return;
-
- for(;;) {
- XMaskEvent(i->blitz->dpy,
- ButtonPressMask | ButtonReleaseMask | PointerMotionMask, &ev);
- switch (ev.type) {
- default: break;
- case ButtonRelease:
- XUngrabPointer(i->blitz->dpy, CurrentTime);
- blitz_brelease_input(i, ev.xbutton.button,
- ev.xbutton.x, ev.xbutton.y, ev.xbutton.time);
- return;
- break;
- case MotionNotify:
- blitz_bmotion_input(i, ev.xbutton.x, ev.xbutton.y);
- break;
- }
- }
}
static void
@@ -288,6 +270,7 @@ blitz_brelease_input(BlitzInput *i, int button, int x, int y, unsigned long time
i->ydbclk = y;
Drop:
+ XUngrabPointer(i->blitz->dpy, CurrentTime);
i->drag = False;
if(i->button)
i->curstart = i->curend;