force the resize popup to be on-screen (not negative position)
authorDana Jansens <danakj@orodu.net>
Sun, 10 Feb 2008 23:30:07 +0000 (18:30 -0500)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 14 Feb 2008 18:40:02 +0000 (19:40 +0100)
openbox/config.c
openbox/geom.h

index 673af4b..e1954a7 100644 (file)
@@ -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);
             }
         }
     }
index bdcd3c5..7c5ee32 100644 (file)
@@ -23,7 +23,7 @@
 #include <glib.h>
 
 typedef struct _GravityCoord {
-    int pos;
+    gint pos;
     gboolean center;
     gboolean opposite;
 } GravityCoord;