openbsd-ports/www/links+/patches/patch-x_c

49 lines
1.2 KiB
Plaintext

$OpenBSD: patch-x_c,v 1.6 2003/04/07 19:30:21 fgsch Exp $
--- x.c.orig Fri Jan 10 19:13:49 2003
+++ x.c Fri Apr 4 01:10:31 2003
@@ -611,7 +611,24 @@ static void x_process_events(void *data)
gd=x_find_gd(&(event.xkey.window));
if (!gd)break;
if (x_translate_key((XKeyEvent*)(&event),&k,&f))
- gd->keyboard_handler(gd,k,f);
+ {
+ if (k == KBD_INS && event.xkey.state & ShiftMask)
+ {
+ Atom pty;
+ if ((pty = XInternAtom(x_display, "XCLIP_OUT", False)))
+ {
+ XConvertSelection(
+ x_display,
+ XA_PRIMARY,
+ XA_STRING,
+ pty,
+ event.xbutton.window,
+ CurrentTime);
+ }
+
+ } else
+ gd->keyboard_handler(gd,k,f);
+ }
}
break;
@@ -659,8 +676,7 @@ static void x_process_events(void *data)
break;
case 2:
- if (event.xbutton.state & ShiftMask) return; /* paste */
- a=B_MIDDLE;
+ return; /* paste */
break;
default:
@@ -699,8 +715,6 @@ static void x_process_events(void *data)
break;
case 2:
- a=B_MIDDLE;
- if (event.xbutton.state & ShiftMask) /* paste */
{
Atom pty;
if ((pty = XInternAtom(x_display, "XCLIP_OUT", False)))