summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-20 22:50:04 +0000
committerDana Jansens <danakj@orodu.net>2003-08-20 22:50:04 +0000
commitd59508ae910dc095e207910cbba301d79c4f5ef0 (patch)
tree3a51279b2df0f84a79c025f32ed43b761898549d
parent533992f5aae6804eb77b90f70bf032a09a373930 (diff)
use the result from XGetGeometry correctly
-rw-r--r--openbox/mouse.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/openbox/mouse.c b/openbox/mouse.c
index 3872b83d..58dc07c9 100644
--- a/openbox/mouse.c
+++ b/openbox/mouse.c
@@ -203,7 +203,7 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e)
static int px, py;
gboolean click = FALSE;
gboolean dclick = FALSE;
-
+
switch (e->type) {
case ButtonPress:
px = e->xbutton.x_root;
@@ -229,12 +229,11 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e)
int junk1, junk2;
Window wjunk;
guint ujunk, b, w, h;
- Status s;
xerror_set_ignore(TRUE);
- s = XGetGeometry(ob_display, e->xbutton.window,
- &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk);
+ junk1 = XGetGeometry(ob_display, e->xbutton.window,
+ &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk);
xerror_set_ignore(FALSE);
- if (s == Success) {
+ if (junk1) {
if (e->xbutton.x >= (signed)-b &&
e->xbutton.y >= (signed)-b &&
e->xbutton.x < (signed)(w+b) &&