]> Dogcows Code - chaz/openbox/commitdiff
Merge branch 'backport' into work
authorMikael Magnusson <mikachu@comhem.se>
Wed, 23 Apr 2008 14:41:35 +0000 (16:41 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Wed, 23 Apr 2008 15:07:10 +0000 (17:07 +0200)
Conflicts:

openbox/config.c
openbox/keyboard.c
openbox/moveresize.c

1  2 
openbox/config.c
openbox/keyboard.c
openbox/moveresize.c
render/image.c

index 6282bf85d8f6001a909b8032f33f385c26f5746a,d27451788481a9a433503249c7032999fdff5fd1..790b03ba35ec14d4b362dbca7649b7a5a659c43a
@@@ -820,28 -784,29 +820,28 @@@ static void parse_dock(xmlNodePtr node
      }
  }
  
 -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;
      }
  }
  
index a693a71c3d63ca3ea287aec1ce440f16b125c61f,8c5b55437acd5338f7ba1ceb0980eaa9de378a51..410eb6e0aaa139bd66967afb6ffae8414a75dafa
@@@ -50,14 -52,14 +50,14 @@@ static void grab_keys(gboolean grab
          p = curpos ? curpos->first_child : keyboard_firstnode;
          while (p) {
              if (p->key)
 -                grab_key(p->key, p->state, RootWindow(ob_display, ob_screen),
 +                grab_key(p->key, p->state, obt_root(ob_screen),
-                          GrabModeSync);
+                          GrabModeAsync);
              p = p->next_sibling;
          }
          if (curpos)
              grab_key(config_keyboard_reset_keycode,
                       config_keyboard_reset_state,
-                      obt_root(ob_screen), GrabModeSync);
 -                     RootWindow(ob_display, ob_screen), GrabModeAsync);
++                     obt_root(ob_screen), GrabModeAsync);
      }
  }
  
index f501996bca7dd9df24c6ebe6e3f9160d785dab03,f324818df86b058afa692c4b867ab5050c3f3177..e748cd3dcfdbfd17478fd07dde54a8cb63d23c1d
@@@ -363,53 -359,52 +363,52 @@@ static void do_resize(void
      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 */
diff --cc render/image.c
Simple merge
This page took 0.031653 seconds and 4 git commands to generate.