2004-09-16 13:07:11 -04:00
|
|
|
--- src/command.c.orig Thu Sep 6 10:38:07 2001
|
|
|
|
+++ src/command.c Wed Sep 15 20:38:55 2004
|
|
|
|
@@ -477,6 +477,16 @@ get_pty(void)
|
|
|
|
ptydev = ttydev = _getpty(&fd, O_RDWR | O_NDELAY, 0622, 0);
|
|
|
|
if (ptydev == NULL)
|
|
|
|
goto Failed;
|
|
|
|
+#elif defined (__OpenBSD__)
|
|
|
|
+ int sfd;
|
|
|
|
+ static char tty_name[16];
|
|
|
|
+
|
|
|
|
+ ptydev = ttydev = tty_name;
|
|
|
|
+
|
|
|
|
+ if (openpty(&fd, &sfd, tty_name, NULL, NULL) < 0)
|
|
|
|
+ goto Failed;
|
|
|
|
+ close(sfd);
|
|
|
|
+
|
|
|
|
#elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__)
|
|
|
|
{
|
|
|
|
extern char *ptsname();
|
|
|
|
@@ -2148,11 +2158,23 @@ process_x_event(XEvent * ev)
|
2001-04-16 23:40:57 -04:00
|
|
|
static int bypass_keystate = 0;
|
|
|
|
int reportmode;
|
|
|
|
static int csrO = 0; /* Hops - csr offset in thumb/slider */
|
2004-09-16 13:07:11 -04:00
|
|
|
+#ifdef ZH
|
2001-04-16 23:40:57 -04:00
|
|
|
+ int k_status;
|
|
|
|
+ char kbuf[256];
|
2004-09-16 13:07:11 -04:00
|
|
|
+#endif
|
2001-04-16 23:40:57 -04:00
|
|
|
|
|
|
|
/* to give proper Scroll behaviour */
|
|
|
|
switch (ev->type) {
|
|
|
|
case KeyPress:
|
|
|
|
- lookup_key(ev);
|
2004-09-16 13:07:11 -04:00
|
|
|
+#ifdef ZH
|
2001-04-16 23:40:57 -04:00
|
|
|
+ k_status = send_key(Xdisplay, TermWin.parent, &ev->xkey, kbuf);
|
|
|
|
+ if (!k_status)
|
|
|
|
+ lookup_key(ev);
|
|
|
|
+ else if (kbuf[0])
|
|
|
|
+ tt_write(kbuf, strlen(kbuf));
|
2004-09-16 13:07:11 -04:00
|
|
|
+#else
|
|
|
|
+ lookup_key(ev);
|
|
|
|
+#endif
|
2001-04-16 23:40:57 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ClientMessage:
|
2004-09-16 13:07:11 -04:00
|
|
|
@@ -2217,6 +2239,9 @@ process_x_event(XEvent * ev)
|
2001-04-16 23:40:57 -04:00
|
|
|
|
|
|
|
case FocusIn:
|
|
|
|
if (!TermWin.focus) {
|
2004-09-16 13:07:11 -04:00
|
|
|
+#ifdef ZH
|
2001-04-16 23:40:57 -04:00
|
|
|
+ send_FocusIn(Xdisplay, TermWin.parent);
|
2004-09-16 13:07:11 -04:00
|
|
|
+#endif
|
2001-04-16 23:40:57 -04:00
|
|
|
TermWin.focus = 1;
|
|
|
|
#ifdef OFF_FOCUS_FADING
|
|
|
|
if( rs_fade != NULL )
|