]> Dogcows Code - chaz/openbox/commitdiff
if this works, i will be amazed. <resize><popupShow>nbr<//> nbr = 0 never show size...
authorMikael Magnusson <mikachu@comhem.se>
Sun, 21 Mar 2004 00:10:14 +0000 (00:10 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Sun, 21 Mar 2004 00:10:14 +0000 (00:10 +0000)
openbox/config.c
openbox/moveresize.c

index c5c1aeb9d139d64dfc09d8574478d99dcac80d6f..6a8dfaca1fa9fe6d5dfb002262e0ebc21e4facd2 100644 (file)
@@ -41,6 +41,7 @@ GSList *config_desktops_names;
 gint    config_screen_firstdesk;
 
 gboolean config_resize_redraw;
+gint     config_resize_popup_show;
 
 ObStackingLayer config_dock_layer;
 gboolean        config_dock_floating;
@@ -292,6 +293,14 @@ static void parse_resize(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
     
     if ((n = parse_find_node("drawContents", node)))
         config_resize_redraw = parse_bool(doc, n);
+    if ((n = parse_find_node("popupShow", node))) {
+        if (parse_contains("Always", doc, n))
+            config_resize_popup_show = 2;
+        else if (parse_contains("Never", doc, n))
+            config_resize_popup_show = 0;
+        else if (parse_contains("Nonpixel", doc, n))
+            config_resize_popup_show = 1;
+    }
 }
 
 static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
@@ -531,6 +540,7 @@ void config_startup(ObParseInst *i)
     parse_register(i, "desktops", parse_desktops, NULL);
 
     config_resize_redraw = TRUE;
+    config_resize_popup_show = 1;
 
     parse_register(i, "resize", parse_resize, NULL);
 
index 2344e86ad77eb18bb9e4b4fa6fe17e321bfec434..4b46e175bf1850537934d2d6ea0db7f241fdf096 100644 (file)
@@ -195,6 +195,10 @@ static void do_move(gboolean resist)
     client_configure(moveresize_client, OB_CORNER_TOPLEFT, cur_x, cur_y,
                      moveresize_client->area.width,
                      moveresize_client->area.height, TRUE, FALSE);
+    if (config_resize_popup_show == 2)
+        popup_coords(moveresize_client, "%d x %d",
+                moveresize_client->frame->area.x,
+                moveresize_client->frame->area.y);
 }
 
 static void do_resize(gboolean resist)
@@ -220,8 +224,11 @@ static void do_resize(gboolean resist)
 
     /* this would be better with a fixed width font ... XXX can do it better
        if there are 2 text boxes */
-    if (moveresize_client->size_inc.width > 1 ||
-        moveresize_client->size_inc.height > 1)
+    if (config_resize_popup_show == 2 ||
+            (config_resize_popup_show == 1 &&
+                (moveresize_client->size_inc.width > 1 ||
+                 moveresize_client->size_inc.height > 1))
+        )
         popup_coords(moveresize_client, "%d x %d",
                      moveresize_client->logical_size.width,
                      moveresize_client->logical_size.height);
This page took 0.034964 seconds and 4 git commands to generate.