From: H.G.Muller Date: Wed, 28 Jan 2015 22:17:23 +0000 (+0100) Subject: Let transfer focus from Board to ICS Input X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e5156fd4c6007cb79c7a1d16b99ca4f48c5bce9e;p=xboard.git Let transfer focus from Board to ICS Input in the input field of the ICS Interaction window transfers focus to the board, but there was no way to transfer focus back without actually typing something in the input field. now does that. Unlike typing printables, it does not close the chat pane, though. In addition, when the chat pane is open now also transfers focus to the board, rather than closing the chat pane. This makes quick transparent switching between board and Chat / ICS Interaction possible. It is no longer possible to simply hide the chat pane, though. But this was usually done for typing a command, and swicthing to the board with and typing the command there has the same effect. --- diff --git a/dialogs.c b/dialogs.c index c58c3d0..f07dcf7 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1901,6 +1901,7 @@ IcsHist (int n, Option *opt, DialogClass dlg) if(opt != &chatOptions[CHAT_IN] && !(opt == &chatOptions[CHAT_PARTNER] && n == 33)) return 0; switch(n) { case 33: // + if(1) BoardToTop(); else if(hidden) BoardToTop(); else PaneSwitch(); break; @@ -2094,6 +2095,7 @@ ChatProc () void ConsoleAutoPopUp (char *buf) { + if(*buf == 27) { if(appData.icsActive && DialogExists(ChatDlg)) HardSetFocus (&chatOptions[CHAT_IN], ChatDlg); return; } if(!appData.autoBox) return; if(appData.icsActive) { // text typed to board in ICS mode: divert to ICS input box if(DialogExists(ChatDlg)) { // box already exists: append to current contents diff --git a/gtk/xboard.c b/gtk/xboard.c index 3588c9d..b2c080c 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -1930,7 +1930,7 @@ void MoveTypeInProc(eventkey) buf[0]=eventkey->keyval; buf[1]='\0'; - if (eventkey->keyval > 32 && eventkey->keyval < 256) + if (eventkey->keyval > 32 && eventkey->keyval < 256 || *buf == 27) ConsoleAutoPopUp (buf); }