]> Dogcows Code - chaz/openbox/blobdiff - openbox/config.c
take numbers as args for the popup options too
[chaz/openbox] / openbox / config.c
index c5c1aeb9d139d64dfc09d8574478d99dcac80d6f..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
@@ -41,6 +42,8 @@ GSList *config_desktops_names;
 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;
@@ -292,6 +295,22 @@ 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))
+            config_resize_popup_show = 0;
+        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,
@@ -369,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;
@@ -531,6 +551,8 @@ void config_startup(ObParseInst *i)
     parse_register(i, "desktops", parse_desktops, NULL);
 
     config_resize_redraw = TRUE;
+    config_resize_popup_show = 1; /* nonpixel increments */
+    config_resize_popup_pos = 0;  /* center of client */
 
     parse_register(i, "resize", parse_resize, NULL);
 
@@ -567,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.026093 seconds and 4 git commands to generate.