X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fcyclewindows.c;h=bbcb6585a11422e22001bf22ab8925af321c13cd;hb=2acbf04cb4ef4a6d1bd0db748aabfba91db4f966;hp=a038f31aaac29f876d013525327f08cdf870b881;hpb=d179d6428ae585a3b8a13479bfe4586e41de2ff9;p=chaz%2Fopenbox diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index a038f31a..bbcb6585 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; @@ -83,6 +84,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 +157,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, @@ -181,7 +185,7 @@ static gboolean i_input_func(guint initial_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,7 +199,7 @@ 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_state) { o->cancel = FALSE; o->state = e->xkey.state; return FALSE; @@ -226,6 +230,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,