diff options
| -rw-r--r-- | config.h | 6 | ||||
| -rw-r--r-- | st.c | 5 | ||||
| -rw-r--r-- | st.h | 1 | ||||
| -rw-r--r-- | x.c | 12 | 
4 files changed, 15 insertions, 9 deletions
@@ -228,10 +228,8 @@ static MouseShortcut mshortcuts[] = {  MouseKey mkeys[] = {  	/* button               mask            function        argument */ -	{ Button4,              ShiftMask,      kscrollup,      {.i =  1} }, -	{ Button5,              ShiftMask,      kscrolldown,    {.i =  1} }, -	{ Button4,              MODKEY,         kscrollup,      {.i =  1} }, -	{ Button5,              MODKEY,         kscrolldown,    {.i =  1} }, +	{ Button4,              XK_NO_MOD,      kscrollup,      {.i =  1} }, +	{ Button5,              XK_NO_MOD,      kscrolldown,    {.i =  1} },  	{ Button4,              TERMMOD,        zoom,           {.f =  +1} },  	{ Button5,              TERMMOD,        zoom,           {.f =  -1} },  }; @@ -1063,6 +1063,11 @@ tnew(int col, int row)  	treset();  } +int tisaltscr(void) +{ +	return IS_SET(MODE_ALTSCREEN); +} +  void  tswapscreen(void)  { @@ -104,6 +104,7 @@ void sendbreak(const Arg *);  void toggleprinter(const Arg *);  int tattrset(int); +int tisaltscr(void);  void tnew(int, int);  void tresize(int, int);  void tsetdirtattr(int); @@ -442,11 +442,13 @@ bpress(XEvent *e)  		return;  	} -	for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { -		if (e->xbutton.button == ms->b -				&& match(ms->mask, e->xbutton.state)) { -			ttywrite(ms->s, strlen(ms->s), 1); -			return; +	if (tisaltscr()) { +		for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { +			if (e->xbutton.button == ms->b +					&& match(ms->mask, e->xbutton.state)) { +				ttywrite(ms->s, strlen(ms->s), 1); +				return; +			}  		}  	}  | 
