Hack to make shift-alt-tab (actually anyothermodifiers-key)
cycle backwards though window list (ticket 271). SVN revision: 40094
This commit is contained in:
parent
f1852e27b0
commit
e438f8898c
1
src/E.h
1
src/E.h
|
@ -341,6 +341,7 @@ typedef struct {
|
|||
Window last_bpress2;
|
||||
unsigned int last_button;
|
||||
unsigned int last_keycode;
|
||||
unsigned int last_keystate;
|
||||
char double_click;
|
||||
char on_screen;
|
||||
#if USE_COMPOSITE
|
||||
|
|
|
@ -305,6 +305,7 @@ HandleEvent(XEvent * ev)
|
|||
{
|
||||
case KeyPress:
|
||||
Mode.events.last_keycode = ev->xkey.keycode;
|
||||
Mode.events.last_keystate = ev->xkey.state;
|
||||
case KeyRelease:
|
||||
Mode.events.time = ev->xkey.time;
|
||||
ModeGetXY(ev->xbutton.root, ev->xkey.x_root, ev->xkey.y_root);
|
||||
|
|
14
src/warp.c
14
src/warp.c
|
@ -64,6 +64,7 @@ static WarpFocusWin *warpFocusWindow = NULL;
|
|||
|
||||
static int warpFocusIndex = 0;
|
||||
static unsigned int warpFocusKey = 0;
|
||||
static unsigned int warpFocusState = 0;
|
||||
static int warplist_num = 0;
|
||||
static WarplistItem *warplist;
|
||||
|
||||
|
@ -297,7 +298,10 @@ WarpFocus(int delta)
|
|||
|
||||
/* Remember invoking keycode (ugly hack) */
|
||||
if (!fw || !EoIsShown(fw))
|
||||
warpFocusKey = Mode.events.last_keycode;
|
||||
{
|
||||
warpFocusKey = Mode.events.last_keycode;
|
||||
warpFocusState = Mode.events.last_keystate;
|
||||
}
|
||||
|
||||
if (!warplist)
|
||||
{
|
||||
|
@ -414,7 +418,12 @@ WarpFocusHandleEvent(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
|||
{
|
||||
case KeyPress:
|
||||
if (ev->xkey.keycode == warpFocusKey)
|
||||
key = 0x80000000;
|
||||
{
|
||||
if ((ev->xkey.state & Mode.masks.mod_key_mask) == warpFocusState)
|
||||
key = 0x80000000;
|
||||
else
|
||||
key = 0x80000001;
|
||||
}
|
||||
else
|
||||
key = XLookupKeysym(&ev->xkey, 0);
|
||||
switch (key)
|
||||
|
@ -426,6 +435,7 @@ WarpFocusHandleEvent(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
|||
WarpFocus(1);
|
||||
break;
|
||||
case XK_Up:
|
||||
case 0x80000001:
|
||||
WarpFocus(-1);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue