use the result from XGetGeometry correctly

This commit is contained in:
Dana Jansens 2003-08-20 22:50:04 +00:00
parent 533992f5aa
commit d59508ae91

View file

@ -203,7 +203,7 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e)
static int px, py; static int px, py;
gboolean click = FALSE; gboolean click = FALSE;
gboolean dclick = FALSE; gboolean dclick = FALSE;
switch (e->type) { switch (e->type) {
case ButtonPress: case ButtonPress:
px = e->xbutton.x_root; px = e->xbutton.x_root;
@ -229,12 +229,11 @@ 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;
Status s;
xerror_set_ignore(TRUE); xerror_set_ignore(TRUE);
s = XGetGeometry(ob_display, e->xbutton.window, junk1 = XGetGeometry(ob_display, e->xbutton.window,
&wjunk, &junk1, &junk2, &w, &h, &b, &ujunk); &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk);
xerror_set_ignore(FALSE); xerror_set_ignore(FALSE);
if (s == Success) { if (junk1) {
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) &&