remove paste
This commit is contained in:
parent
ef72d59495
commit
700f7a9ed2
@ -217,24 +217,6 @@ insert(const char *str, ssize_t n)
|
|||||||
match();
|
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
|
static void
|
||||||
readstdin(void)
|
readstdin(void)
|
||||||
{
|
{
|
||||||
@ -281,10 +263,6 @@ run(void)
|
|||||||
if (ev.xexpose.count == 0)
|
if (ev.xexpose.count == 0)
|
||||||
drw_map(drw, win, 0, 0, mw, mh);
|
drw_map(drw, win, 0, 0, mw, mh);
|
||||||
break;
|
break;
|
||||||
case SelectionNotify:
|
|
||||||
if (ev.xselection.property == utf8)
|
|
||||||
paste();
|
|
||||||
break;
|
|
||||||
case VisibilityNotify:
|
case VisibilityNotify:
|
||||||
if (ev.xvisibility.state != VisibilityUnobscured)
|
if (ev.xvisibility.state != VisibilityUnobscured)
|
||||||
XRaiseWindow(dpy, win);
|
XRaiseWindow(dpy, win);
|
||||||
|
Loading…
Reference in New Issue
Block a user