Xinqi Bao's Git

man page update
[st.git] / x.c
diff --git a/x.c b/x.c
index b5acc4c..12b7e7d 100644 (file)
--- a/x.c
+++ b/x.c
@@ -35,6 +35,7 @@ typedef struct {
        void (*func)(const Arg *);
        const Arg arg;
        uint  release;
+       int  altscrn;  /* 0: don't care, -1: not alt screen, 1: alt screen */
 } MouseShortcut;
 
 typedef struct {
@@ -472,6 +473,7 @@ mouseaction(XEvent *e, uint release)
        for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
                if (ms->release == release &&
                    ms->button == e->xbutton.button &&
+                   (!ms->altscrn || (ms->altscrn == (tisaltscr() ? 1 : -1))) &&
                    (match(ms->mod, state) ||  /* exact or forced */
                     match(ms->mod, state & ~forcemousemod))) {
                        ms->func(&(ms->arg));