X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fcyclewindows.c;h=a64d225694910b1f560a99eeeb03bc7b2803cc82;hb=34b332c22acb9f7f194eb8de80b5f4a6529e7e16;hp=a038f31aaac29f876d013525327f08cdf870b881;hpb=d179d6428ae585a3b8a13479bfe4586e41de2ff9;p=chaz%2Fopenbox diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index a038f31a..a64d2256 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -11,6 +11,7 @@ typedef struct { gboolean linear; gboolean dock_windows; gboolean desktop_windows; + gboolean only_hilite_windows; gboolean all_desktops; gboolean forward; gboolean bar; @@ -74,6 +75,8 @@ static gpointer setup_func(xmlNodePtr node, if ((n = obt_xml_find_node(node, "dialog"))) { if (obt_xml_node_contains(n, "none")) o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_NONE; + else if (obt_xml_node_contains(n, "no")) + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_NONE; else if (obt_xml_node_contains(n, "icons")) o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_ICONS; } @@ -83,6 +86,8 @@ static gpointer setup_func(xmlNodePtr node, o->raise = obt_xml_node_bool(n); if ((n = obt_xml_find_node(node, "panels"))) o->dock_windows = obt_xml_node_bool(n); + if ((n = obt_xml_find_node(node, "hilite"))) + o->only_hilite_windows = obt_xml_node_bool(n); if ((n = obt_xml_find_node(node, "desktop"))) o->desktop_windows = obt_xml_node_bool(n); if ((n = obt_xml_find_node(node, "allDesktops"))) @@ -154,6 +159,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) ft = focus_cycle(o->forward, o->all_desktops, + !o->only_hilite_windows, o->dock_windows, o->desktop_windows, o->linear, @@ -175,13 +181,14 @@ static gboolean i_input_func(guint initial_state, gboolean *used) { Options *o = options; - guint mods; + guint mods, initial_mods; + initial_mods = obt_keyboard_only_modmasks(initial_state); mods = obt_keyboard_only_modmasks(e->xkey.state); if (e->type == KeyRelease) { /* remove from the state the mask of the modifier key being released, if it is a modifier key being released that is */ - mods &= ~obt_keyboard_keycode_to_modmask(e->xkey.keycode); + mods &= ~obt_keyboard_keyevent_to_modmask(e); } if (e->type == KeyPress) { @@ -195,14 +202,14 @@ static gboolean i_input_func(guint initial_state, } /* There were no modifiers and they pressed enter */ - else if (sym == XK_Return && !initial_state) { + else if ((sym == XK_Return || sym == XK_KP_Enter) && !initial_mods) { o->cancel = FALSE; o->state = e->xkey.state; return FALSE; } } /* They released the modifiers */ - else if (e->type == KeyRelease && initial_state && !(mods & initial_state)) + else if (e->type == KeyRelease && initial_mods && !(mods & initial_mods)) { o->cancel = FALSE; o->state = e->xkey.state; @@ -226,6 +233,7 @@ static void i_post_func(gpointer options) ft = focus_cycle(o->forward, o->all_desktops, + !o->only_hilite_windows, o->dock_windows, o->desktop_windows, o->linear,