From 91a1b089097cb3ba66f779df80fa7a51490aa785 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 10 Feb 2008 18:30:07 -0500 Subject: [PATCH] force the resize popup to be on-screen (not negative position) --- openbox/config.c | 5 +++++ openbox/geom.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.2