static void bpress(XEvent *);
static void bmotion(XEvent *);
static void selnotify(XEvent *);
+static void selclear(XEvent *);
static void selrequest(XEvent *);
static void selinit(void);
[MotionNotify] = bmotion,
[ButtonPress] = bpress,
[ButtonRelease] = brelease,
+ [SelectionClear] = selclear,
[SelectionNotify] = selnotify,
[SelectionRequest] = selrequest,
};
XConvertSelection(xw.dpy, XA_PRIMARY, sel.xtarget, XA_PRIMARY, xw.win, CurrentTime);
}
+void selclear(XEvent *e) {
+ if(sel.bx == -1)
+ return;
+ sel.bx = -1;
+ tsetdirt(sel.b.y, sel.e.y);
+}
+
void
selrequest(XEvent *e) {
XSelectionRequestEvent *xsre;