$NetBSD: patch-ab,v 1.1 2001/04/23 04:44:21 toshii Exp $ --- misc.c.orig Fri Jul 12 14:01:43 1996 +++ misc.c @@ -242,9 +242,7 @@ (Widget)tekWidget : (Widget)term))) # endif /* !KTERM_NOTEK */ #endif - if (((ev->detail) != NotifyInferior) && - ev->focus && - !(screen->select & FOCUS)) + if (((ev->detail) != NotifyInferior) && ev->focus) selectwindow(screen, INWINDOW); } @@ -271,9 +269,7 @@ (Widget)tekWidget : (Widget)term))) # endif /* !KTERM_NOTEK */ #endif - if (((ev->detail) != NotifyInferior) && - ev->focus && - !(screen->select & FOCUS)) + if (((ev->detail) != NotifyInferior) && ev->focus) unselectwindow(screen, INWINDOW); } @@ -358,8 +354,8 @@ if(!Ttoggled) TCursorToggle(TOGGLE); } else { #endif /* !KTERM_NOTEK */ - if (screen->xic) - XUnsetICFocus(screen->xic); + if (screen->xic && screen->select == 0) + XUnsetICFocus(screen->xic); screen->select &= ~flag; if(screen->cursor_state && (screen->cursor_col != screen->cur_col ||