handle the XGetGeomtry failing for button releases

This commit is contained in:
Dana Jansens 2003-08-20 17:06:08 +00:00
parent 9e3d680cf7
commit 533992f5aa

View file

@ -1,5 +1,6 @@
#include "openbox.h" #include "openbox.h"
#include "config.h" #include "config.h"
#include "xerror.h"
#include "action.h" #include "action.h"
#include "event.h" #include "event.h"
#include "client.h" #include "client.h"
@ -228,8 +229,12 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e)
int junk1, junk2; int junk1, junk2;
Window wjunk; Window wjunk;
guint ujunk, b, w, h; guint ujunk, b, w, h;
XGetGeometry(ob_display, e->xbutton.window, Status s;
xerror_set_ignore(TRUE);
s = XGetGeometry(ob_display, e->xbutton.window,
&wjunk, &junk1, &junk2, &w, &h, &b, &ujunk); &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk);
xerror_set_ignore(FALSE);
if (s == Success) {
if (e->xbutton.x >= (signed)-b && if (e->xbutton.x >= (signed)-b &&
e->xbutton.y >= (signed)-b && e->xbutton.y >= (signed)-b &&
e->xbutton.x < (signed)(w+b) && e->xbutton.x < (signed)(w+b) &&
@ -250,6 +255,7 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e)
lbutton = 0; lbutton = 0;
lwindow = None; lwindow = None;
} }
}
button = 0; button = 0;
state = 0; state = 0;