1
0

remove paste

This commit is contained in:
Deven Blake 2021-05-11 14:28:01 -04:00
parent ef72d59495
commit 700f7a9ed2

View File

@ -217,24 +217,6 @@ insert(const char *str, ssize_t n)
match();
}
static void
paste(void)
{
char *p, *q;
int di;
unsigned long dl;
Atom da;
/* we have been given the current selection, now insert it into input */
if (XGetWindowProperty(dpy, win, utf8, 0, (sizeof text / 4) + 1, False,
utf8, &da, &di, &dl, &dl, (unsigned char **)&p)
== Success && p) {
insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t)strlen(p));
XFree(p);
}
drawmenu();
}
static void
readstdin(void)
{
@ -281,10 +263,6 @@ run(void)
if (ev.xexpose.count == 0)
drw_map(drw, win, 0, 0, mw, mh);
break;
case SelectionNotify:
if (ev.xselection.property == utf8)
paste();
break;
case VisibilityNotify:
if (ev.xvisibility.state != VisibilityUnobscured)
XRaiseWindow(dpy, win);