Now the Shortcuts are more consistent.
[st.git] / st.c
diff --git a/st.c b/st.c
index 01d4410..386e6c0 100644 (file)
--- a/st.c
+++ b/st.c
@@ -275,7 +275,7 @@ typedef struct {
        uint b;
        uint mask;
        char *s;
-} Mousekey;
+} MouseShortcut;
 
 typedef struct {
        KeySym k;
@@ -695,9 +695,10 @@ utf8validate(Rune *u, size_t i)
 void
 selinit(void)
 {
-       memset(&sel.tclick1, 0, sizeof(sel.tclick1));
-       memset(&sel.tclick2, 0, sizeof(sel.tclick2));
+       clock_gettime(CLOCK_MONOTONIC, &sel.tclick1);
+       clock_gettime(CLOCK_MONOTONIC, &sel.tclick2);
        sel.mode = SEL_IDLE;
+       sel.snap = 0;
        sel.ob.x = -1;
        sel.primary = NULL;
        sel.clipboard = NULL;
@@ -943,7 +944,7 @@ void
 bpress(XEvent *e)
 {
        struct timespec now;
-       Mousekey *mk;
+       MouseShortcut *mk;
 
        if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
                mousereport(e);