|
|
@ -29,9 +29,10 @@ typedef struct {
|
|
|
|
} Shortcut;
|
|
|
|
} Shortcut;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
typedef struct {
|
|
|
|
uint b;
|
|
|
|
uint mod;
|
|
|
|
uint mask;
|
|
|
|
uint button;
|
|
|
|
char *s;
|
|
|
|
void (*func)(const Arg *);
|
|
|
|
|
|
|
|
const Arg arg;
|
|
|
|
} MouseShortcut;
|
|
|
|
} MouseShortcut;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
typedef struct {
|
|
|
@ -56,6 +57,7 @@ static void selpaste(const Arg *);
|
|
|
|
static void zoom(const Arg *);
|
|
|
|
static void zoom(const Arg *);
|
|
|
|
static void zoomabs(const Arg *);
|
|
|
|
static void zoomabs(const Arg *);
|
|
|
|
static void zoomreset(const Arg *);
|
|
|
|
static void zoomreset(const Arg *);
|
|
|
|
|
|
|
|
static void ttysend(const Arg *);
|
|
|
|
|
|
|
|
|
|
|
|
/* config.h for applying patches and the configuration. */
|
|
|
|
/* config.h for applying patches and the configuration. */
|
|
|
|
#include "config.h"
|
|
|
|
#include "config.h"
|
|
|
@ -312,6 +314,12 @@ zoomreset(const Arg *arg)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
|
|
ttysend(const Arg *arg)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ttywrite(arg->s, strlen(arg->s), 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
int
|
|
|
|
evcol(XEvent *e)
|
|
|
|
evcol(XEvent *e)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -421,9 +429,9 @@ bpress(XEvent *e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
|
|
|
|
for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
|
|
|
|
if (e->xbutton.button == ms->b
|
|
|
|
if (e->xbutton.button == ms->button
|
|
|
|
&& match(ms->mask, e->xbutton.state)) {
|
|
|
|
&& match(ms->mod, e->xbutton.state)) {
|
|
|
|
ttywrite(ms->s, strlen(ms->s), 1);
|
|
|
|
ms->func(&(ms->arg));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|