]> Dogcows Code - chaz/openbox/blob - openbox/config.c
add showDelay to dock
[chaz/openbox] / openbox / config.c
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3 config.c for the Openbox window manager
4 Copyright (c) 2004 Mikael Magnusson
5 Copyright (c) 2003 Ben Jansens
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 See the COPYING file for a copy of the GNU General Public License.
18 */
19
20 #include "config.h"
21 #include "keyboard.h"
22 #include "mouse.h"
23 #include "prop.h"
24 #include "translate.h"
25 #include "parser/parse.h"
26 #include "openbox.h"
27
28 gboolean config_focus_new;
29 gboolean config_focus_follow;
30 guint config_focus_delay;
31 gboolean config_focus_raise;
32 gboolean config_focus_last;
33
34 ObPlacePolicy config_place_policy;
35
36 gchar *config_theme;
37 gboolean config_theme_keepborder;
38 gboolean config_theme_hidedisabled;
39
40 gchar *config_title_layout;
41
42 gint config_desktops_num;
43 GSList *config_desktops_names;
44 gint config_screen_firstdesk;
45
46 gboolean config_resize_redraw;
47 gboolean config_resize_four_corners;
48 gint config_resize_popup_show;
49 gint config_resize_popup_pos;
50
51 ObStackingLayer config_dock_layer;
52 gboolean config_dock_floating;
53 gboolean config_dock_nostrut;
54 ObDirection config_dock_pos;
55 gint config_dock_x;
56 gint config_dock_y;
57 ObOrientation config_dock_orient;
58 gboolean config_dock_hide;
59 guint config_dock_hide_delay;
60 guint config_dock_show_delay;
61 guint config_dock_app_move_button;
62 guint config_dock_app_move_modifiers;
63
64 guint config_keyboard_reset_keycode;
65 guint config_keyboard_reset_state;
66
67 gint config_mouse_threshold;
68 gint config_mouse_dclicktime;
69
70 gboolean config_menu_warppointer;
71 gboolean config_menu_xorstyle;
72 guint config_menu_hide_delay;
73 gboolean config_menu_client_list_icons;
74
75 GSList *config_menu_files;
76
77 gint config_resist_win;
78 gint config_resist_edge;
79
80 gboolean config_resist_layers_below;
81
82 /*
83
84 <keybind key="C-x">
85 <action name="ChangeDesktop">
86 <desktop>3</desktop>
87 </action>
88 </keybind>
89
90 */
91
92 static void parse_key(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
93 GList *keylist)
94 {
95 gchar *key;
96 ObAction *action;
97 xmlNodePtr n, nact;
98 GList *it;
99
100 if ((n = parse_find_node("chainQuitKey", node))) {
101 key = parse_string(doc, n);
102 translate_key(key, &config_keyboard_reset_state,
103 &config_keyboard_reset_keycode);
104 g_free(key);
105 }
106
107 n = parse_find_node("keybind", node);
108 while (n) {
109 if (parse_attr_string("key", n, &key)) {
110 keylist = g_list_append(keylist, key);
111
112 parse_key(i, doc, n->children, keylist);
113
114 it = g_list_last(keylist);
115 g_free(it->data);
116 keylist = g_list_delete_link(keylist, it);
117 }
118 n = parse_find_node("keybind", n->next);
119 }
120 if (keylist) {
121 nact = parse_find_node("action", node);
122 while (nact) {
123 if ((action = action_parse(i, doc, nact,
124 OB_USER_ACTION_KEYBOARD_KEY)))
125 keyboard_bind(keylist, action);
126 nact = parse_find_node("action", nact->next);
127 }
128 }
129 }
130
131 static void parse_keyboard(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
132 gpointer d)
133 {
134 keyboard_unbind_all();
135
136 parse_key(i, doc, node->children, NULL);
137 }
138
139 /*
140
141 <context name="Titlebar">
142 <mousebind button="Left" action="Press">
143 <action name="Raise"></action>
144 </mousebind>
145 </context>
146
147 */
148
149 static void parse_mouse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
150 gpointer d)
151 {
152 xmlNodePtr n, nbut, nact;
153 gchar *buttonstr;
154 gchar *contextstr;
155 ObUserAction uact;
156 ObMouseAction mact;
157 ObAction *action;
158
159 mouse_unbind_all();
160
161 node = node->children;
162
163 if ((n = parse_find_node("dragThreshold", node)))
164 config_mouse_threshold = parse_int(doc, n);
165 if ((n = parse_find_node("doubleClickTime", node)))
166 config_mouse_dclicktime = parse_int(doc, n);
167
168 n = parse_find_node("context", node);
169 while (n) {
170 if (!parse_attr_string("name", n, &contextstr))
171 goto next_n;
172 nbut = parse_find_node("mousebind", n->children);
173 while (nbut) {
174 if (!parse_attr_string("button", nbut, &buttonstr))
175 goto next_nbut;
176 if (parse_attr_contains("press", nbut, "action")) {
177 uact = OB_USER_ACTION_MOUSE_PRESS;
178 mact = OB_MOUSE_ACTION_PRESS;
179 } else if (parse_attr_contains("release", nbut, "action")) {
180 uact = OB_USER_ACTION_MOUSE_RELEASE;
181 mact = OB_MOUSE_ACTION_RELEASE;
182 } else if (parse_attr_contains("click", nbut, "action")) {
183 uact = OB_USER_ACTION_MOUSE_CLICK;
184 mact = OB_MOUSE_ACTION_CLICK;
185 } else if (parse_attr_contains("doubleclick", nbut,"action")) {
186 uact = OB_USER_ACTION_MOUSE_DOUBLE_CLICK;
187 mact = OB_MOUSE_ACTION_DOUBLE_CLICK;
188 } else if (parse_attr_contains("drag", nbut, "action")) {
189 uact = OB_USER_ACTION_MOUSE_MOTION;
190 mact = OB_MOUSE_ACTION_MOTION;
191 } else
192 goto next_nbut;
193 nact = parse_find_node("action", nbut->children);
194 while (nact) {
195 if ((action = action_parse(i, doc, nact, uact)))
196 mouse_bind(buttonstr, contextstr, mact, action);
197 nact = parse_find_node("action", nact->next);
198 }
199 g_free(buttonstr);
200 next_nbut:
201 nbut = parse_find_node("mousebind", nbut->next);
202 }
203 g_free(contextstr);
204 next_n:
205 n = parse_find_node("context", n->next);
206 }
207 }
208
209 static void parse_focus(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
210 gpointer d)
211 {
212 xmlNodePtr n;
213
214 node = node->children;
215
216 if ((n = parse_find_node("focusNew", node)))
217 config_focus_new = parse_bool(doc, n);
218 if ((n = parse_find_node("followMouse", node)))
219 config_focus_follow = parse_bool(doc, n);
220 if ((n = parse_find_node("focusDelay", node)))
221 config_focus_delay = parse_int(doc, n) * 1000;
222 if ((n = parse_find_node("raiseOnFocus", node)))
223 config_focus_raise = parse_bool(doc, n);
224 if ((n = parse_find_node("focusLast", node)))
225 config_focus_last = parse_bool(doc, n);
226 }
227
228 static void parse_placement(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
229 gpointer d)
230 {
231 xmlNodePtr n;
232
233 node = node->children;
234
235 if ((n = parse_find_node("policy", node)))
236 if (parse_contains("UnderMouse", doc, n))
237 config_place_policy = OB_PLACE_POLICY_MOUSE;
238 }
239
240 static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
241 gpointer d)
242 {
243 xmlNodePtr n;
244
245 node = node->children;
246
247 if ((n = parse_find_node("name", node))) {
248 gchar *c;
249
250 g_free(config_theme);
251 c = parse_string(doc, n);
252 config_theme = parse_expand_tilde(c);
253 g_free(c);
254 }
255 if ((n = parse_find_node("titleLayout", node))) {
256 g_free(config_title_layout);
257 config_title_layout = parse_string(doc, n);
258 }
259 if ((n = parse_find_node("keepBorder", node)))
260 config_theme_keepborder = parse_bool(doc, n);
261 if ((n = parse_find_node("hideDisabled", node)))
262 config_theme_hidedisabled = parse_bool(doc, n);
263 }
264
265 static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
266 gpointer d)
267 {
268 xmlNodePtr n;
269
270 node = node->children;
271
272 if ((n = parse_find_node("number", node))) {
273 gint d = parse_int(doc, n);
274 if (d > 0)
275 config_desktops_num = d;
276 }
277 if ((n = parse_find_node("firstdesk", node))) {
278 gint d = parse_int(doc, n);
279 if (d > 0)
280 config_screen_firstdesk = d;
281 }
282 if ((n = parse_find_node("names", node))) {
283 GSList *it;
284 xmlNodePtr nname;
285
286 for (it = config_desktops_names; it; it = it->next)
287 g_free(it->data);
288 g_slist_free(config_desktops_names);
289 config_desktops_names = NULL;
290
291 nname = parse_find_node("name", n->children);
292 while (nname) {
293 config_desktops_names = g_slist_append(config_desktops_names,
294 parse_string(doc, nname));
295 nname = parse_find_node("name", nname->next);
296 }
297 }
298 }
299
300 static void parse_resize(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
301 gpointer d)
302 {
303 xmlNodePtr n;
304
305 node = node->children;
306
307 if ((n = parse_find_node("drawContents", node)))
308 config_resize_redraw = parse_bool(doc, n);
309 if ((n = parse_find_node("fourCorner", node)))
310 config_resize_four_corners = parse_bool(doc, n);
311 if ((n = parse_find_node("popupShow", node))) {
312 config_resize_popup_show = parse_int(doc, n);
313 if (parse_contains("Always", doc, n))
314 config_resize_popup_show = 2;
315 else if (parse_contains("Never", doc, n))
316 config_resize_popup_show = 0;
317 else if (parse_contains("Nonpixel", doc, n))
318 config_resize_popup_show = 1;
319 }
320 if ((n = parse_find_node("popupPosition", node))) {
321 config_resize_popup_pos = parse_int(doc, n);
322 if (parse_contains("Top", doc, n))
323 config_resize_popup_pos = 1;
324 else if (parse_contains("Center", doc, n))
325 config_resize_popup_pos = 0;
326 }
327 }
328
329 static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
330 gpointer d)
331 {
332 xmlNodePtr n;
333
334 node = node->children;
335
336 if ((n = parse_find_node("position", node))) {
337 if (parse_contains("TopLeft", doc, n))
338 config_dock_floating = FALSE,
339 config_dock_pos = OB_DIRECTION_NORTHWEST;
340 else if (parse_contains("Top", doc, n))
341 config_dock_floating = FALSE,
342 config_dock_pos = OB_DIRECTION_NORTH;
343 else if (parse_contains("TopRight", doc, n))
344 config_dock_floating = FALSE,
345 config_dock_pos = OB_DIRECTION_NORTHEAST;
346 else if (parse_contains("Right", doc, n))
347 config_dock_floating = FALSE,
348 config_dock_pos = OB_DIRECTION_EAST;
349 else if (parse_contains("BottomRight", doc, n))
350 config_dock_floating = FALSE,
351 config_dock_pos = OB_DIRECTION_SOUTHEAST;
352 else if (parse_contains("Bottom", doc, n))
353 config_dock_floating = FALSE,
354 config_dock_pos = OB_DIRECTION_SOUTH;
355 else if (parse_contains("BottomLeft", doc, n))
356 config_dock_floating = FALSE,
357 config_dock_pos = OB_DIRECTION_SOUTHWEST;
358 else if (parse_contains("Left", doc, n))
359 config_dock_floating = FALSE,
360 config_dock_pos = OB_DIRECTION_WEST;
361 else if (parse_contains("Floating", doc, n))
362 config_dock_floating = TRUE;
363 }
364 if (config_dock_floating) {
365 if ((n = parse_find_node("floatingX", node)))
366 config_dock_x = parse_int(doc, n);
367 if ((n = parse_find_node("floatingY", node)))
368 config_dock_y = parse_int(doc, n);
369 } else {
370 if ((n = parse_find_node("noStrut", node)))
371 config_dock_nostrut = parse_bool(doc, n);
372 }
373 if ((n = parse_find_node("stacking", node))) {
374 if (parse_contains("top", doc, n))
375 config_dock_layer = OB_STACKING_LAYER_ABOVE;
376 else if (parse_contains("normal", doc, n))
377 config_dock_layer = OB_STACKING_LAYER_NORMAL;
378 else if (parse_contains("bottom", doc, n))
379 config_dock_layer = OB_STACKING_LAYER_BELOW;
380 }
381 if ((n = parse_find_node("direction", node))) {
382 if (parse_contains("horizontal", doc, n))
383 config_dock_orient = OB_ORIENTATION_HORZ;
384 else if (parse_contains("vertical", doc, n))
385 config_dock_orient = OB_ORIENTATION_VERT;
386 }
387 if ((n = parse_find_node("autoHide", node)))
388 config_dock_hide = parse_bool(doc, n);
389 if ((n = parse_find_node("hideDelay", node)))
390 config_dock_hide_delay = parse_int(doc, n) * 1000;
391 if ((n = parse_find_node("showDelay", node)))
392 config_dock_show_delay = parse_int(doc, n) * 1000;
393 if ((n = parse_find_node("moveButton", node))) {
394 gchar *str = parse_string(doc, n);
395 guint b, s;
396 if (translate_button(str, &s, &b)) {
397 config_dock_app_move_button = b;
398 config_dock_app_move_modifiers = s;
399 } else {
400 g_warning("invalid button '%s'", str);
401 }
402 g_free(str);
403 }
404 }
405
406 static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
407 gpointer d)
408 {
409 xmlNodePtr n;
410 for (node = node->children; node; node = node->next) {
411 if (!xmlStrcasecmp(node->name, (const xmlChar*) "file")) {
412 gchar *c;
413
414 c = parse_string(doc, node);
415 config_menu_files = g_slist_append(config_menu_files,
416 parse_expand_tilde(c));
417 g_free(c);
418 }
419 if ((n = parse_find_node("warpPointer", node)))
420 config_menu_warppointer = parse_bool(doc, n);
421 if ((n = parse_find_node("xorStyle", node)))
422 config_menu_xorstyle = parse_bool(doc, n);
423 if ((n = parse_find_node("hideDelay", node)))
424 config_menu_hide_delay = parse_int(doc, n);
425 if ((n = parse_find_node("desktopMenuIcons", node)))
426 config_menu_client_list_icons = parse_bool(doc, n);
427 }
428 }
429
430 static void parse_resistance(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
431 gpointer d)
432 {
433 xmlNodePtr n;
434
435 node = node->children;
436 if ((n = parse_find_node("strength", node)))
437 config_resist_win = parse_int(doc, n);
438 if ((n = parse_find_node("screen_edge_strength", node)))
439 config_resist_edge = parse_int(doc, n);
440 if ((n = parse_find_node("edges_hit_layers_below", node)))
441 config_resist_layers_below = parse_bool(doc, n);
442 }
443
444 typedef struct
445 {
446 const gchar *key;
447 const gchar *actname;
448 } ObDefKeyBind;
449
450 static void bind_default_keyboard()
451 {
452 ObDefKeyBind *it;
453 ObDefKeyBind binds[] = {
454 { "A-Tab", "NextWindow" },
455 { "S-A-Tab", "PreviousWindow" },
456 { "A-F4", "Close" },
457 { NULL, NULL }
458 };
459
460 for (it = binds; it->key; ++it) {
461 GList *l = g_list_append(NULL, g_strdup(it->key));
462 keyboard_bind(l, action_from_string(it->actname,
463 OB_USER_ACTION_KEYBOARD_KEY));
464 }
465 }
466
467 typedef struct
468 {
469 const gchar *button;
470 const gchar *context;
471 const ObMouseAction mact;
472 const gchar *actname;
473 } ObDefMouseBind;
474
475 static void bind_default_mouse()
476 {
477 ObDefMouseBind *it;
478 ObDefMouseBind binds[] = {
479 { "Left", "Client", OB_MOUSE_ACTION_PRESS, "Focus" },
480 { "Middle", "Client", OB_MOUSE_ACTION_PRESS, "Focus" },
481 { "Right", "Client", OB_MOUSE_ACTION_PRESS, "Focus" },
482 { "Left", "Desktop", OB_MOUSE_ACTION_PRESS, "Focus" },
483 { "Middle", "Desktop", OB_MOUSE_ACTION_PRESS, "Focus" },
484 { "Right", "Desktop", OB_MOUSE_ACTION_PRESS, "Focus" },
485 { "Left", "Titlebar", OB_MOUSE_ACTION_PRESS, "Focus" },
486 { "Left", "Handle", OB_MOUSE_ACTION_PRESS, "Focus" },
487 { "Left", "BLCorner", OB_MOUSE_ACTION_PRESS, "Focus" },
488 { "Left", "BRCorner", OB_MOUSE_ACTION_PRESS, "Focus" },
489 { "Left", "TLCorner", OB_MOUSE_ACTION_PRESS, "Focus" },
490 { "Left", "TRCorner", OB_MOUSE_ACTION_PRESS, "Focus" },
491 { "Left", "Close", OB_MOUSE_ACTION_PRESS, "Focus" },
492 { "Left", "Maximize", OB_MOUSE_ACTION_PRESS, "Focus" },
493 { "Left", "Iconify", OB_MOUSE_ACTION_PRESS, "Focus" },
494 { "Left", "Icon", OB_MOUSE_ACTION_PRESS, "Focus" },
495 { "Left", "AllDesktops", OB_MOUSE_ACTION_PRESS, "Focus" },
496 { "Left", "Shade", OB_MOUSE_ACTION_PRESS, "Focus" },
497 { "Left", "Client", OB_MOUSE_ACTION_CLICK, "Raise" },
498 { "Left", "Titlebar", OB_MOUSE_ACTION_CLICK, "Raise" },
499 { "Middle", "Titlebar", OB_MOUSE_ACTION_CLICK, "Lower" },
500 { "Left", "Handle", OB_MOUSE_ACTION_CLICK, "Raise" },
501 { "Left", "BLCorner", OB_MOUSE_ACTION_CLICK, "Raise" },
502 { "Left", "BRCorner", OB_MOUSE_ACTION_CLICK, "Raise" },
503 { "Left", "TLCorner", OB_MOUSE_ACTION_CLICK, "Raise" },
504 { "Left", "TRCorner", OB_MOUSE_ACTION_CLICK, "Raise" },
505 { "Left", "Close", OB_MOUSE_ACTION_CLICK, "Raise" },
506 { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "Raise" },
507 { "Left", "Iconify", OB_MOUSE_ACTION_CLICK, "Raise" },
508 { "Left", "Icon", OB_MOUSE_ACTION_CLICK, "Raise" },
509 { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "Raise" },
510 { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "Raise" },
511 { "Left", "Close", OB_MOUSE_ACTION_CLICK, "Close" },
512 { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "ToggleMaximizeFull" },
513 { "Left", "Iconify", OB_MOUSE_ACTION_CLICK, "Iconify" },
514 { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "ToggleOmnipresent" },
515 { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "ToggleShade" },
516 { "Left", "TLCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
517 { "Left", "TRCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
518 { "Left", "BLCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
519 { "Left", "BRCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
520 { "Left", "Titlebar", OB_MOUSE_ACTION_MOTION, "Move" },
521 { "A-Left", "Frame", OB_MOUSE_ACTION_MOTION, "Move" },
522 { "A-Middle", "Frame", OB_MOUSE_ACTION_MOTION, "Resize" },
523 { NULL, NULL, 0, NULL }
524 };
525
526 for (it = binds; it->button; ++it) {
527 ObUserAction uact;
528 switch (it->mact) {
529 case OB_MOUSE_ACTION_PRESS:
530 uact = OB_USER_ACTION_MOUSE_PRESS; break;
531 case OB_MOUSE_ACTION_RELEASE:
532 uact = OB_USER_ACTION_MOUSE_RELEASE; break;
533 case OB_MOUSE_ACTION_CLICK:
534 uact = OB_USER_ACTION_MOUSE_CLICK; break;
535 case OB_MOUSE_ACTION_DOUBLE_CLICK:
536 uact = OB_USER_ACTION_MOUSE_DOUBLE_CLICK; break;
537 case OB_MOUSE_ACTION_MOTION:
538 uact = OB_USER_ACTION_MOUSE_MOTION; break;
539 case OB_NUM_MOUSE_ACTIONS:
540 g_assert_not_reached();
541 }
542 mouse_bind(it->button, it->context, it->mact,
543 action_from_string(it->actname, uact));
544 }
545 }
546
547 void config_startup(ObParseInst *i)
548 {
549 config_focus_new = TRUE;
550 config_focus_follow = FALSE;
551 config_focus_delay = 0;
552 config_focus_raise = FALSE;
553 config_focus_last = FALSE;
554
555 parse_register(i, "focus", parse_focus, NULL);
556
557 config_place_policy = OB_PLACE_POLICY_SMART;
558
559 parse_register(i, "placement", parse_placement, NULL);
560
561 config_theme = NULL;
562
563 config_title_layout = g_strdup("NLIMC");
564 config_theme_keepborder = TRUE;
565 config_theme_hidedisabled = FALSE;
566
567 parse_register(i, "theme", parse_theme, NULL);
568
569 config_desktops_num = 4;
570 config_screen_firstdesk = 1;
571 config_desktops_names = NULL;
572
573 parse_register(i, "desktops", parse_desktops, NULL);
574
575 config_resize_redraw = TRUE;
576 config_resize_four_corners = FALSE;
577 config_resize_popup_show = 1; /* nonpixel increments */
578 config_resize_popup_pos = 0; /* center of client */
579
580 parse_register(i, "resize", parse_resize, NULL);
581
582 config_dock_layer = OB_STACKING_LAYER_ABOVE;
583 config_dock_pos = OB_DIRECTION_NORTHEAST;
584 config_dock_floating = FALSE;
585 config_dock_nostrut = FALSE;
586 config_dock_x = 0;
587 config_dock_y = 0;
588 config_dock_orient = OB_ORIENTATION_VERT;
589 config_dock_hide = FALSE;
590 config_dock_hide_delay = 300;
591 config_dock_show_delay = 300;
592 config_dock_app_move_button = 2; /* middle */
593 config_dock_app_move_modifiers = 0;
594
595 parse_register(i, "dock", parse_dock, NULL);
596
597 translate_key("C-g", &config_keyboard_reset_state,
598 &config_keyboard_reset_keycode);
599
600 bind_default_keyboard();
601
602 parse_register(i, "keyboard", parse_keyboard, NULL);
603
604 config_mouse_threshold = 3;
605 config_mouse_dclicktime = 200;
606
607 bind_default_mouse();
608
609 parse_register(i, "mouse", parse_mouse, NULL);
610
611 config_resist_win = 10;
612 config_resist_edge = 20;
613 config_resist_layers_below = FALSE;
614
615 parse_register(i, "resistance", parse_resistance, NULL);
616
617 config_menu_warppointer = TRUE;
618 config_menu_xorstyle = TRUE;
619 config_menu_hide_delay = 250;
620 config_menu_client_list_icons = TRUE;
621 config_menu_files = NULL;
622
623 parse_register(i, "menu", parse_menu, NULL);
624 }
625
626 void config_shutdown()
627 {
628 GSList *it;
629
630 g_free(config_theme);
631
632 g_free(config_title_layout);
633
634 for (it = config_desktops_names; it; it = g_slist_next(it))
635 g_free(it->data);
636 g_slist_free(config_desktops_names);
637
638 for (it = config_menu_files; it; it = g_slist_next(it))
639 g_free(it->data);
640 g_slist_free(config_menu_files);
641 }
This page took 0.065008 seconds and 4 git commands to generate.