}
}
-static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
- gpointer data)
+static void parse_menu(xmlNodePtr node, gpointer d)
{
xmlNodePtr n;
- for (node = node->children; node; node = node->next) {
- if (!xmlStrcasecmp(node->name, (const xmlChar*) "file")) {
- gchar *c;
+ node = node->children;
- c = obt_parse_node_string(node);
- if ((n = parse_find_node("hideDelay", node)))
- config_menu_hide_delay = parse_int(doc, n);
- if ((n = parse_find_node("middle", node)))
- config_menu_middle = parse_bool(doc, n);
- if ((n = parse_find_node("submenuShowDelay", node)))
- config_submenu_show_delay = parse_int(doc, n);
- if ((n = parse_find_node("applicationIcons", node)))
- config_menu_client_list_icons = parse_bool(doc, n);
- if ((n = parse_find_node("manageDesktops", node)))
- config_menu_manage_desktops = parse_bool(doc, n);
-
- while ((node = parse_find_node("file", node))) {
- gchar *c = parse_string(doc, node);
++ if ((n = obt_parse_find_node(node, "hideDelay")))
++ config_menu_hide_delay = obt_parse_node_int(n);
++ if ((n = obt_parse_find_node(node, "middle")))
++ config_menu_middle = obt_parse_node_bool(n);
++ if ((n = obt_parse_find_node(node, "submenuShowDelay")))
++ config_submenu_show_delay = obt_parse_node_int(n);
++ if ((n = obt_parse_find_node(node, "applicationIcons")))
++ config_menu_client_list_icons = obt_parse_node_bool(n);
++ if ((n = obt_parse_find_node(node, "manageDesktops")))
++ config_menu_manage_desktops = obt_parse_node_bool(n);
++
++ while ((node = obt_parse_find_node(node, "file"))) {
++ gchar *c = obt_parse_node_string(node);
config_menu_files = g_slist_append(config_menu_files,
- parse_expand_tilde(c));
+ obt_paths_expand_tilde(c));
g_free(c);
- }
- if ((n = obt_parse_find_node(node, "hideDelay")))
- config_menu_hide_delay = obt_parse_node_int(n);
- if ((n = obt_parse_find_node(node, "middle")))
- config_menu_middle = obt_parse_node_bool(n);
- if ((n = obt_parse_find_node(node, "submenuShowDelay")))
- config_submenu_show_delay = obt_parse_node_int(n);
- if ((n = obt_parse_find_node(node, "applicationIcons")))
- config_menu_client_list_icons = obt_parse_node_bool(n);
- if ((n = obt_parse_find_node(node, "manageDesktops")))
- config_menu_manage_desktops = obt_parse_node_bool(n);
+ node = node->next;
}
}
h = cur_h;
client_try_configure(moveresize_client, &x, &y, &w, &h,
&lw, &lh, TRUE);
- if (w == moveresize_client->area.width &&
- h == moveresize_client->area.height)
+ if (!(w == moveresize_client->area.width &&
+ h == moveresize_client->area.height))
{
- return;
- }
#ifdef SYNC
- if (config_resize_redraw && obt_display_extension_sync &&
- moveresize_client->sync_request && moveresize_client->sync_counter &&
- !moveresize_client->not_responding)
- {
- XEvent ce;
- XSyncValue val;
-
- /* are we already waiting for the sync counter to catch up? */
- if (waiting_for_sync)
- return;
-
- /* increment the value we're waiting for */
- ++moveresize_client->sync_counter_value;
- XSyncIntToValue(&val, moveresize_client->sync_counter_value);
-
- /* tell the client what we're waiting for */
- ce.xclient.type = ClientMessage;
- ce.xclient.message_type = OBT_PROP_ATOM(WM_PROTOCOLS);
- ce.xclient.display = obt_display;
- ce.xclient.window = moveresize_client->window;
- ce.xclient.format = 32;
- ce.xclient.data.l[0] = OBT_PROP_ATOM(NET_WM_SYNC_REQUEST);
- ce.xclient.data.l[1] = event_curtime;
- ce.xclient.data.l[2] = XSyncValueLow32(val);
- ce.xclient.data.l[3] = XSyncValueHigh32(val);
- ce.xclient.data.l[4] = 0l;
- XSendEvent(obt_display, moveresize_client->window, FALSE,
- NoEventMask, &ce);
-
- waiting_for_sync = TRUE;
-
- obt_main_loop_timeout_remove(ob_main_loop, sync_timeout_func);
- obt_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC * 2,
- sync_timeout_func,
- NULL, NULL, NULL);
- }
- if (config_resize_redraw && extensions_sync &&
- moveresize_client->sync_request &&
- moveresize_client->sync_counter &&
++ if (config_resize_redraw && obt_display_extension_sync &&
++ moveresize_client->sync_request && moveresize_client->sync_counter &&
+ !moveresize_client->not_responding)
+ {
+ XEvent ce;
+ XSyncValue val;
+
+ /* are we already waiting for the sync counter to catch up? */
+ if (waiting_for_sync)
+ return;
+
+ /* increment the value we're waiting for */
+ ++moveresize_client->sync_counter_value;
+ XSyncIntToValue(&val, moveresize_client->sync_counter_value);
+
+ /* tell the client what we're waiting for */
+ ce.xclient.type = ClientMessage;
- ce.xclient.message_type = prop_atoms.wm_protocols;
- ce.xclient.display = ob_display;
++ ce.xclient.message_type = OBT_PROP_ATOM(WM_PROTOCOLS);
++ ce.xclient.display = obt_display;
+ ce.xclient.window = moveresize_client->window;
+ ce.xclient.format = 32;
- ce.xclient.data.l[0] = prop_atoms.net_wm_sync_request;
++ ce.xclient.data.l[0] = OBT_PROP_ATOM(NET_WM_SYNC_REQUEST);
+ ce.xclient.data.l[1] = event_curtime;
+ ce.xclient.data.l[2] = XSyncValueLow32(val);
+ ce.xclient.data.l[3] = XSyncValueHigh32(val);
+ ce.xclient.data.l[4] = 0l;
- XSendEvent(ob_display, moveresize_client->window, FALSE,
++ XSendEvent(obt_display, moveresize_client->window, FALSE,
+ NoEventMask, &ce);
+
+ waiting_for_sync = TRUE;
+
- ob_main_loop_timeout_remove(ob_main_loop, sync_timeout_func);
- ob_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC * 2,
- sync_timeout_func, NULL, NULL, NULL);
++ obt_main_loop_timeout_remove(ob_main_loop, sync_timeout_func);
++ obt_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC * 2,
++ sync_timeout_func,
++ NULL, NULL, NULL);
+ }
#endif
- client_configure(moveresize_client, cur_x, cur_y, cur_w, cur_h,
- TRUE, FALSE, FALSE);
+ client_configure(moveresize_client, cur_x, cur_y, cur_w, cur_h,
- TRUE, FALSE, FALSE);
++ TRUE, FALSE, FALSE);
+ }
/* this would be better with a fixed width font ... XXX can do it better
if there are 2 text boxes */