Merge branch 'mikabox/maybe' into wip/mikabox
authorMikael Magnusson <mikachu@gmail.com>
Wed, 17 Apr 2013 11:06:53 +0000 (13:06 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Wed, 17 Apr 2013 11:06:53 +0000 (13:06 +0200)
Conflicts:
openbox/client_list_combined_menu.c
openbox/config.c
openbox/event.c
openbox/moveresize.c

1  2 
obrender/font.c
obrender/render.h
openbox/client_list_combined_menu.c
openbox/config.c
openbox/event.c
openbox/keyboard.c
openbox/menu.h
openbox/menuframe.c
openbox/menuframe.h
openbox/mouse.c
openbox/moveresize.c

diff --cc obrender/font.c
Simple merge
Simple merge
index ef31a26c12afb9cb7c92ae59832f4ea3ed6b11fc,dfae21ed9a778f75fc1e8331fca0fb8ade50f527..9c98d93ad69921e50116435c72d4cfdd3254a7c3
@@@ -51,10 -51,15 +51,16 @@@ static gboolean self_update(ObMenuFram
  
      menu_clear_entries(menu);
  
-     for (desktop = 0; desktop < screen_num_desktops; desktop++) {
+     for (desktop_it = 0; desktop_it < screen_num_desktops; desktop_it++) {
          gboolean empty = TRUE;
          gboolean onlyiconic = TRUE;
 +        gboolean noicons = TRUE;
+         
+         desktop = desktop_it;
+         if (desktop == 0)
+             desktop = screen_desktop;
+         else if (desktop <= screen_desktop)
+             desktop -= 1;
  
          menu_add_separator(menu, SEPARATOR, screen_desktop_names[desktop]);
          for (it = focus_order; it; it = g_list_next(it)) {
index 3558164693f5373616471684fe91de338ea7b6e0,0bb9e2b5ea769b810680665f9c8c14724e472c2e..322d7051b3e120f845937b5fc4c6b7be04c2e5e6
@@@ -446,44 -389,41 +446,46 @@@ static void parse_per_app_settings(xmlN
  
  static void parse_key(xmlNodePtr node, GList *keylist)
  {
 -    gchar *key;
 +    gchar *keystring, **keys, **key;
      xmlNodePtr n;
      gboolean is_chroot = FALSE;
+     gboolean grab = TRUE;
  
 -    if (!obt_xml_attr_string(node, "key", &key))
 +    if (!obt_xml_attr_string(node, "key", &keystring))
          return;
  
      obt_xml_attr_bool(node, "chroot", &is_chroot);
+     obt_xml_attr_bool(node, "grab", &grab);
  
 -    keylist = g_list_append(keylist, key);
 +    keys = g_strsplit(keystring, " ", 0);
 +    for (key = keys; *key; ++key) {
 +        keylist = g_list_append(keylist, *key);
  
 -    if ((n = obt_xml_find_node(node->children, "keybind"))) {
 -        while (n) {
 -            parse_key(n, keylist);
 -            n = obt_xml_find_node(n->next, "keybind");
 +        if ((n = obt_xml_find_node(node->children, "keybind"))) {
 +            while (n) {
 +                parse_key(n, keylist);
 +                n = obt_xml_find_node(n->next, "keybind");
 +            }
          }
 -    }
 -    else if ((n = obt_xml_find_node(node->children, "action"))) {
 -        while (n) {
 -            ObActionsAct *action;
 -
 -            action = actions_parse(n);
 -            if (action)
 -                keyboard_bind(keylist, action, grab);
 -            n = obt_xml_find_node(n->next, "action");
 +        else if ((n = obt_xml_find_node(node->children, "action"))) {
 +            while (n) {
 +                ObActionsAct *action;
 +
 +                action = actions_parse(n);
 +                if (action)
-                     keyboard_bind(keylist, action);
++                    keyboard_bind(keylist, action, grab);
 +                n = obt_xml_find_node(n->next, "action");
 +            }
          }
 -    }
  
 -    if (is_chroot)
 -        keyboard_chroot(keylist);
  
 -    g_free(key);
 -    keylist = g_list_delete_link(keylist, g_list_last(keylist));
 +        if (is_chroot)
 +            keyboard_chroot(keylist);
 +        keylist = g_list_delete_link(keylist, g_list_last(keylist));
 +    }
 +
 +    g_strfreev(keys);
 +    g_free(keystring);
  }
  
  static void parse_keyboard(xmlNodePtr node, gpointer d)
diff --cc openbox/event.c
index 518c6b237223ff9c919ce6ec8e3e29a33f17eaa4,c867617d822183845b9c9a1d2809161c7a00157a..28d23228cd22a9252d83ef51f160a52dc326b8cb
@@@ -720,8 -719,14 +722,13 @@@ static void event_process(const XEvent 
              if (prompt && !used)
                  used = event_handle_prompt(prompt, e);
  
 -            if (e->type == ButtonPress) {
 +            if (e->type == ButtonPress)
                  pressed = e->xbutton.button;
 -                pressed_win = e->xbutton.subwindow;
 -            }
++
+             /* We ignored the release event so make sure we don't think
+                the button is still pressed */
+             else if (e->type == ButtonRelease)
+                 button = 0;
          }
      }
      else if (e->type == KeyPress || e->type == KeyRelease ||
Simple merge
diff --cc openbox/menu.h
Simple merge
Simple merge
Simple merge
diff --cc openbox/mouse.c
index 4b92003767e9c3d25bb542ddb1e3cd7251464b75,34f5245404befc5dfa5ea251b54cbba7a49c219d..37bf302595f1eb96f9232de05eb5551699ddd944
@@@ -209,9 -211,9 +211,9 @@@ void mouse_replay_pointer(void
  gboolean mouse_event(ObClient *client, XEvent *e)
  {
      static Time ltime;
-     static guint button = 0, state = 0, lbutton = 0;
+     static guint state = 0, lbutton = 0;
      static Window lwindow = None;
 -    static gint px, py, pwx = -1, pwy = -1;
 +    static gint px, py, pwx = -1, pwy = -1, lx = -10, ly = -10;
      gboolean used = FALSE;
  
      ObFrameContext context;
index 1625ccf01ccddd7aa5d0fc9036ab4c7ed5fdde14,4ca38f91f5f8076a0dd200bd46aff7081ec41dc9..68a02def6f767a723098153df25e16aeb69065a1
@@@ -263,8 -262,11 +263,13 @@@ void moveresize_start(ObClient *c, gin
      cur_h = start_ch;
  
      moveresize_in_progress = TRUE;
 +    waiting_for_sync = 0;
 +
+     if (moving)
+         do_move(FALSE, 0);
+     else
+         do_resize();
  #ifdef SYNC
      if (config_resize_redraw && !moving && obt_display_extension_sync &&
          moveresize_client->sync_request && moveresize_client->sync_counter &&