]> Dogcows Code - chaz/openbox/blobdiff - openbox/config.c
take numbers as args for the popup options too
[chaz/openbox] / openbox / config.c
index 6a8dfaca1fa9fe6d5dfb002262e0ebc21e4facd2..4b58fbd969d29ea46c279daf8418337b5a92199d 100644 (file)
@@ -1,6 +1,7 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
    config.c for the Openbox window manager
+   Copyright (c) 2004        Mikael Magnusson
    Copyright (c) 2003        Ben Jansens
 
    This program is free software; you can redistribute it and/or modify
@@ -42,6 +43,7 @@ gint    config_screen_firstdesk;
 
 gboolean config_resize_redraw;
 gint     config_resize_popup_show;
+gint     config_resize_popup_pos;
 
 ObStackingLayer config_dock_layer;
 gboolean        config_dock_floating;
@@ -294,6 +296,7 @@ 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))) {
+        config_resize_popup_show = parse_int(doc, n);
         if (parse_contains("Always", doc, n))
             config_resize_popup_show = 2;
         else if (parse_contains("Never", doc, n))
@@ -301,6 +304,13 @@ static void parse_resize(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
         else if (parse_contains("Nonpixel", doc, n))
             config_resize_popup_show = 1;
     }
+    if ((n = parse_find_node("popupPosition", node))) {
+        config_resize_popup_pos = parse_int(doc, n);
+        if (parse_contains("Top", doc, n))
+            config_resize_popup_pos = 1;
+        else if (parse_contains("Center", doc, n))
+            config_resize_popup_pos = 0;
+    }
 }
 
 static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
@@ -378,6 +388,7 @@ static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
                        gpointer d)
 {
+    xmlNodePtr n;
     for (node = node->children; node; node = node->next) {
         if (!xmlStrcasecmp(node->name, (const xmlChar*) "file")) {
             gchar *c;
@@ -540,7 +551,8 @@ void config_startup(ObParseInst *i)
     parse_register(i, "desktops", parse_desktops, NULL);
 
     config_resize_redraw = TRUE;
-    config_resize_popup_show = 1;
+    config_resize_popup_show = 1; /* nonpixel increments */
+    config_resize_popup_pos = 0;  /* center of client */
 
     parse_register(i, "resize", parse_resize, NULL);
 
@@ -577,7 +589,7 @@ void config_startup(ObParseInst *i)
     parse_register(i, "resistance", parse_resistance, NULL);
 
     config_menu_warppointer = TRUE;
-    config_menu_xorstyle = TRUE;
+    config_menu_xorstyle = FALSE;
     config_menu_hilightfirst = TRUE;
     config_menu_hide_delay = 250;
     config_menu_files = NULL;
This page took 0.024249 seconds and 4 git commands to generate.