From: Dana Jansens Date: Sun, 10 Feb 2008 23:30:07 +0000 (-0500) Subject: force the resize popup to be on-screen (not negative position) X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=91a1b089097cb3ba66f779df80fa7a51490aa785;p=chaz%2Fopenbox force the resize popup to be on-screen (not negative position) --- diff --git a/openbox/config.c b/openbox/config.c index 673af4bd..e1954a79 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -675,6 +675,11 @@ static void parse_resize(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, if ((n2 = parse_find_node("y", n->children))) config_parse_gravity_coord(doc, n2, &config_resize_popup_fixed.y); + + config_resize_popup_fixed.x.pos = + MAX(config_resize_popup_fixed.x.pos, 0); + config_resize_popup_fixed.y.pos = + MAX(config_resize_popup_fixed.y.pos, 0); } } } diff --git a/openbox/geom.h b/openbox/geom.h index bdcd3c55..7c5ee32e 100644 --- a/openbox/geom.h +++ b/openbox/geom.h @@ -23,7 +23,7 @@ #include typedef struct _GravityCoord { - int pos; + gint pos; gboolean center; gboolean opposite; } GravityCoord;