X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=bc3ad5a4667fa870bc4ea6485e6fdf9b032bbcaa;hb=7ceb3d1f72eabfa678e5cfae176c57630ad98c43;hp=8f570c25ef7e45ac40bb776f2fc84e0ed6615d02;hpb=d2b75db8d7519a20af8bf09e9c205507f9ff828c;p=st.git diff --git a/x.c b/x.c index 8f570c2..bc3ad5a 100644 --- a/x.c +++ b/x.c @@ -426,7 +426,8 @@ mouseaction(XEvent *e, uint release) for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { if (ms->release == release && ms->button == e->xbutton.button && - match(ms->mod, e->xbutton.state & ~forcemousemod)) { + (match(ms->mod, e->xbutton.state) || /* exact or forced */ + match(ms->mod, e->xbutton.state & ~forcemousemod))) { ms->func(&(ms->arg)); return 1; } @@ -1153,8 +1154,8 @@ xinit(int cols, int rows) win.mode = MODE_NUMLOCK; resettitle(); - XMapWindow(xw.dpy, xw.win); xhints(); + XMapWindow(xw.dpy, xw.win); XSync(xw.dpy, False); clock_gettime(CLOCK_MONOTONIC, &xsel.tclick1);