From: Mikael Magnusson Date: Wed, 17 Apr 2013 11:06:53 +0000 (+0200) Subject: Merge branch 'mikabox/maybe' into wip/mikabox X-Git-Tag: mikabox-3.5-7~35 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=b4a82c5a7c4502a8e345e73c76754e84356cd528;p=mikachu%2Fopenbox.git Merge branch 'mikabox/maybe' into wip/mikabox Conflicts: openbox/client_list_combined_menu.c openbox/config.c openbox/event.c openbox/moveresize.c --- b4a82c5a7c4502a8e345e73c76754e84356cd528 diff --cc openbox/client_list_combined_menu.c index ef31a26c,dfae21ed..9c98d93a --- a/openbox/client_list_combined_menu.c +++ b/openbox/client_list_combined_menu.c @@@ -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)) { diff --cc openbox/config.c index 35581646,0bb9e2b5..322d7051 --- a/openbox/config.c +++ b/openbox/config.c @@@ -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 518c6b23,c867617d..28d23228 --- a/openbox/event.c +++ b/openbox/event.c @@@ -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 || diff --cc openbox/mouse.c index 4b920037,34f52454..37bf3025 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@@ -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; diff --cc openbox/moveresize.c index 1625ccf0,4ca38f91..68a02def --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@@ -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 &&