wineconsole patch
Andreas Mohr
andi at rhlx01.fht-esslingen.de
Sat Jun 29 14:10:56 CDT 2002
Hi all,
- use PeekMessage loop around GetMessage
When exposing the wineconsole window not via the caption bar, but via
a click into the window content instead, the message processing got
completely stuck. As we don't get an event handle notification in such cases,
the MessageWaitForMultipleObjectsEx/GetMessage processing lost its
execution coherence. Thus use PeekMessage loop to make sure we process
every message currently available on a hSynchro event.
Boy, I'm happy this major annoyance is gone...
This also fixes redrawing when scrolling down when having text in the last
console line.
- added German resource file
- realign some dialog parts
- "Property" -> "Properties"
- add some traces
Maybe we'll actually manage to achieve a joyful winedbg usage again
sometimes :-))
--
Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: programs/wineconsole/user.c
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/user.c,v
retrieving revision 1.12
diff -u -r1.12 user.c
--- programs/wineconsole/user.c 2 Jun 2002 21:20:43 -0000 1.12
+++ programs/wineconsole/user.c 29 Jun 2002 19:02:49 -0000
@@ -820,8 +820,8 @@
InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, (UINT_PTR)hSubMenu, buff);
LoadString(hInstance, IDS_DEFAULT, buff, sizeof(buff) / sizeof(WCHAR));
InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING, IDS_DEFAULT, buff);
- LoadString(hInstance, IDS_PROPERTY, buff, sizeof(buff) / sizeof(WCHAR));
- InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING, IDS_PROPERTY, buff);
+ LoadString(hInstance, IDS_PROPERTIES, buff, sizeof(buff) / sizeof(WCHAR));
+ InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING, IDS_PROPERTIES, buff);
return TRUE;
}
@@ -1260,7 +1260,7 @@
case IDS_DEFAULT:
WCUSER_GetProperties(data, FALSE);
break;
- case IDS_PROPERTY:
+ case IDS_PROPERTIES:
WCUSER_GetProperties(data, TRUE);
break;
default:
@@ -1273,7 +1273,7 @@
case IDS_DEFAULT:
WCUSER_GetProperties(data, FALSE);
break;
- case IDS_PROPERTY:
+ case IDS_PROPERTIES:
WCUSER_GetProperties(data, TRUE);
break;
case IDS_MARK:
@@ -1345,22 +1345,29 @@
for (;;)
{
- switch (MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT))
+ switch(MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT))
{
case WAIT_OBJECT_0:
if (!WINECON_GrabChanges(data) && data->curcfg.exit_on_die)
PostQuitMessage(0);
break;
case WAIT_OBJECT_0+1:
- switch (GetMessage(&msg, 0, 0, 0))
+ /* need to use PeekMessage loop instead of simple GetMessage:
+ * multiple messages might have arrived in between,
+ * so GetMessage would lead to delayed processing */
+ while (PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE))
{
- case -1: /* the event handle became invalid, so exit */
- return -1;
- case 0: /* WM_QUIT has been posted */
- return 0;
- default:
- DispatchMessage(&msg);
- break;
+ switch (GetMessage(&msg, 0, 0, 0))
+ {
+ case -1: /* the event handle became invalid, so exit */
+ return -1;
+ case 0: /* WM_QUIT has been posted */
+ return 0;
+ default:
+ WINE_TRACE("dispatching msg %04x\n", msg.message);
+ DispatchMessage(&msg);
+ break;
+ }
}
break;
default:
Index: programs/wineconsole/wineconsole.c
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/wineconsole.c,v
retrieving revision 1.14
diff -u -r1.14 wineconsole.c
--- programs/wineconsole/wineconsole.c 24 Jun 2002 23:00:47 -0000 1.14
+++ programs/wineconsole/wineconsole.c 29 Jun 2002 19:02:49 -0000
@@ -376,7 +376,7 @@
/* the handles here are created without the whistles and bells required by console
* (mainly because wineconsole doesn't need it)
- * - there are not inheritable
+ * - they are not inheritable
* - hConIn is not synchronizable
*/
SERVER_START_REQ(alloc_console)
@@ -390,6 +390,7 @@
}
SERVER_END_REQ;
if (!ret) goto error;
+ WINE_TRACE("using hConIn event %p, hSynchro event %p\n", data->hConIn, data->hSynchro);
SERVER_START_REQ( set_console_input_info )
{
Index: programs/wineconsole/wineconsole_En.rc
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/wineconsole_En.rc,v
retrieving revision 1.6
diff -u -r1.6 wineconsole_En.rc
--- programs/wineconsole/wineconsole_En.rc 1 Jun 2002 02:55:52 -0000 1.6
+++ programs/wineconsole/wineconsole_En.rc 29 Jun 2002 19:02:49 -0000
@@ -22,7 +22,7 @@
BEGIN
IDS_EDIT, "&Edit"
IDS_DEFAULT, "&Default"
-IDS_PROPERTY, "&Property"
+IDS_PROPERTIES, "&Properties"
IDS_MARK, "&Mark"
IDS_COPY, "&Copy"
IDS_PASTE, "&Paste"
@@ -41,19 +41,20 @@
CAPTION " Options "
FONT 8, "Helv"
{
- GROUPBOX "Cursor size", -1, 10, 11, 100, 44, BS_GROUPBOX
- AUTORADIOBUTTON "&Small", IDC_OPT_CURSOR_SMALL, 14, 23, 84, 10, WS_TABSTOP
- AUTORADIOBUTTON "&Medium", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP
- AUTORADIOBUTTON "&Large", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP
+ GROUPBOX "Cursor size", -1, 10, 11, 60, 44, BS_GROUPBOX
+ AUTORADIOBUTTON "&Small", IDC_OPT_CURSOR_SMALL, 14, 23, 44, 10, WS_TABSTOP
+ AUTORADIOBUTTON "&Medium", IDC_OPT_CURSOR_MEDIUM, 14, 33, 44, 10, WS_TABSTOP
+ AUTORADIOBUTTON "&Large", IDC_OPT_CURSOR_LARGE, 14, 43, 44, 10, WS_TABSTOP
- GROUPBOX "Control", -1, 115, 11, 85, 44, BS_GROUPBOX
- LTEXT "Popup menu", -1, 119, 23, 40, 10
- AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 159, 23, 40, 10, WS_TABSTOP
- AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 159, 33, 40, 10, WS_TABSTOP
- AUTOCHECKBOX "&Quick edit", IDC_OPT_QUICK_EDIT, 119, 44, 40, 10, WS_TABSTOP|BS_MULTILINE|BS_LEFTTEXT
+ GROUPBOX "Control", -1, 75, 11, 125, 44, BS_GROUPBOX
+ LTEXT "Popup menu", -1, 79, 23, 40, 10
+ AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 129, 23, 60, 10, WS_TABSTOP
+ AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 129, 33, 60, 10, WS_TABSTOP
+ LTEXT "Quick edit", -1, 79, 43, 50, 10
+ AUTOCHECKBOX "&enable", IDC_OPT_QUICK_EDIT, 129, 43, 60, 10, WS_TABSTOP
GROUPBOX "Command history", -1, 10, 57, 190, 35, BS_GROUPBOX
- LTEXT "&Numbers of recalled commands :", -1, 14, 67, 78, 18
+ LTEXT "&Number of recalled commands :", -1, 14, 67, 78, 18
EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
AUTOCHECKBOX "&Remove doubles", IDC_OPT_HIST_DOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
Index: programs/wineconsole/wineconsole_Fr.rc
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/wineconsole_Fr.rc,v
retrieving revision 1.5
diff -u -r1.5 wineconsole_Fr.rc
--- programs/wineconsole/wineconsole_Fr.rc 23 Mar 2002 18:45:40 -0000 1.5
+++ programs/wineconsole/wineconsole_Fr.rc 29 Jun 2002 19:02:49 -0000
@@ -22,7 +22,7 @@
BEGIN
IDS_EDIT, "&Editer"
IDS_DEFAULT, "Par &d?faut"
-IDS_PROPERTY, "&Propri?t?s"
+IDS_PROPERTIES, "&Propri?t?s"
IDS_MARK, "&Marquer"
IDS_COPY, "&Copier"
IDS_PASTE, "C&oller"
@@ -41,16 +41,17 @@
CAPTION " Options "
FONT 8, "Helv"
{
- GROUPBOX "Taille du curseur", -1, 10, 11, 100, 44, BS_GROUPBOX
- AUTORADIOBUTTON "&Petit", IDC_OPT_CURSOR_SMALL, 14, 23, 84, 10, WS_TABSTOP
- AUTORADIOBUTTON "&Moyen", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP
- AUTORADIOBUTTON "&Grand", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP
+ GROUPBOX "Taille du curseur", -1, 10, 11, 60, 44, BS_GROUPBOX
+ AUTORADIOBUTTON "&Petit", IDC_OPT_CURSOR_SMALL, 14, 23, 44, 10, WS_TABSTOP
+ AUTORADIOBUTTON "&Moyen", IDC_OPT_CURSOR_MEDIUM, 14, 33, 44, 10, WS_TABSTOP
+ AUTORADIOBUTTON "&Grand", IDC_OPT_CURSOR_LARGE, 14, 43, 44, 10, WS_TABSTOP
- GROUPBOX "Contr?le", -1, 115, 11, 85, 44, BS_GROUPBOX
- LTEXT "Popup menu", -1, 119, 23, 40, 10
- AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 159, 23, 40, 10, WS_TABSTOP
- AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 159, 33, 40, 10, WS_TABSTOP
- AUTOCHECKBOX "&Edition rapide", IDC_OPT_QUICK_EDIT, 119, 44, 60, 10, WS_TABSTOP|BS_MULTILINE|BS_LEFTTEXT
+ GROUPBOX "Contr?le", -1, 75, 11, 125, 44, BS_GROUPBOX
+ LTEXT "Popup menu", -1, 79, 23, 50, 10
+ AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 129, 23, 60, 10, WS_TABSTOP
+ AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 129, 33, 60, 10, WS_TABSTOP
+ LTEXT "Edition rapide", -1, 79, 43, 50, 10
+ AUTOCHECKBOX "&activer", IDC_OPT_QUICK_EDIT, 129, 43, 60, 10, WS_TABSTOP
GROUPBOX "Historique des commandes", -1, 10, 57, 190, 35, BS_GROUPBOX
LTEXT "&Taille de la m?moire tampon :", -1, 14, 67, 78, 18
Index: programs/wineconsole/wineconsole_res.h
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/wineconsole_res.h,v
retrieving revision 1.4
diff -u -r1.4 wineconsole_res.h
--- programs/wineconsole/wineconsole_res.h 10 Mar 2002 00:21:20 -0000 1.4
+++ programs/wineconsole/wineconsole_res.h 29 Jun 2002 19:02:49 -0000
@@ -21,7 +21,7 @@
/* strings */
#define IDS_EDIT 0x100
#define IDS_DEFAULT 0x101
-#define IDS_PROPERTY 0x102
+#define IDS_PROPERTIES 0x102
#define IDS_MARK 0x110
#define IDS_COPY 0x111
Index: programs/wineconsole/wineconsole_res.rc
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/wineconsole_res.rc,v
retrieving revision 1.2
diff -u -r1.2 wineconsole_res.rc
--- programs/wineconsole/wineconsole_res.rc 10 Mar 2002 00:21:20 -0000 1.2
+++ programs/wineconsole/wineconsole_res.rc 29 Jun 2002 19:02:49 -0000
@@ -24,3 +24,4 @@
#include "wineconsole_En.rc"
#include "wineconsole_Fr.rc"
+#include "wineconsole_De.rc"
Index: server/console.c
===================================================================
RCS file: /home/wine/wine/server/console.c,v
retrieving revision 1.40
diff -u -r1.40 console.c
--- server/console.c 2 Jun 2002 21:22:22 -0000 1.40
+++ server/console.c 29 Jun 2002 19:02:50 -0000
@@ -270,7 +270,7 @@
{
console_input->active = (struct screen_buffer*)grab_object( screen_buffer );
- /* generate the fist events */
+ /* generate the initial events */
evt.event = CONSOLE_RENDERER_ACTIVE_SB_EVENT;
console_input_events_append( console_input->evt, &evt );
-------------- next part --------------
/*
* Copyright 2002 Andreas Mohr
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_EDIT, "Edi&tieren"
IDS_DEFAULT, "Stan&dard"
IDS_PROPERTIES, "&Eigenschaften"
IDS_MARK, "&Markieren"
IDS_COPY, "&Copy"
IDS_PASTE, "&Paste"
IDS_SELECTALL, "&Alles ausw?hlen"
IDS_SCROLL, "Sc&rollen"
IDS_SEARCH, "&Suchen"
IDS_FNT_DISPLAY, "Jeder Buchstabe ist %ld Pixel breit und %ld Pixel hoch"
IDS_FNT_PREVIEW_1, "Dies ist ein Test"
IDS_FNT_PREVIEW_2, ""
IDS_DLG_TIT_DEFAULT "Setup - Standardeinstellungen"
IDS_DLG_TIT_CURRENT "Setup - aktuelle Einstellungen"
END
IDD_OPTION DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Optionen "
FONT 8, "Helv"
{
GROUPBOX "Cursorgr?sse", -1, 10, 11, 60, 44, BS_GROUPBOX
AUTORADIOBUTTON "&Klein", IDC_OPT_CURSOR_SMALL, 14, 23, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Mittel", IDC_OPT_CURSOR_MEDIUM, 14, 33, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Gross", IDC_OPT_CURSOR_LARGE, 14, 43, 44, 10, WS_TABSTOP
GROUPBOX "Steuerung", -1, 75, 11, 125, 44, BS_GROUPBOX
LTEXT "Popup-Men?", -1, 79, 23, 50, 10
AUTOCHECKBOX "&Strg", IDC_OPT_CONF_CTRL, 129, 23, 60, 10, WS_TABSTOP
AUTOCHECKBOX "&Umschalt", IDC_OPT_CONF_SHIFT, 129, 33, 60, 10, WS_TABSTOP
LTEXT "Quick-Edit", -1, 79, 43, 50, 10
AUTOCHECKBOX "&aktiv", IDC_OPT_QUICK_EDIT, 129, 43, 60, 10, WS_TABSTOP
GROUPBOX "Befehlshistorie", -1, 10, 57, 190, 35, BS_GROUPBOX
LTEXT "&Anzahl gemerkter Befehle :", -1, 14, 67, 78, 18
EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
AUTOCHECKBOX "&Entferne doppelte", IDC_OPT_HIST_DOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
}
IDD_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Schriftart "
FONT 8, "Helv"
{
LTEXT "&Schriftart", -1, 5, 5, 24, 8
LISTBOX IDC_FNT_LIST_FONT, 5, 18, 90, 42, LBS_SORT|WS_VSCROLL
LTEXT "F&arbe", -1, 100, 5, 50, 8
CONTROL "", IDC_FNT_COLOR_FG, "WineConColorPreview", 0L, 100, 18, 48, 16
CONTROL "", IDC_FNT_COLOR_BK, "WineConColorPreview", 0L, 100, 40, 48, 16
LTEXT "&Gr?sse", -1, 158, 5, 40, 8
LISTBOX IDC_FNT_LIST_SIZE, 158, 18, 40, 60, WS_VSCROLL
CONTROL "", IDC_FNT_PREVIEW, "WineConFontPreview", 0L, 5, 60, 109, 40
LTEXT "", IDC_FNT_FONT_INFO, 128, 76, 80, 18
}
IDD_CONFIG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Konfiguration "
FONT 8, "Helv"
{
GROUPBOX "Pufferbereich", -1, 10, 11, 110, 42, BS_GROUPBOX
LTEXT "&Breite :", -1, 14, 25, 54, 9
EDITTEXT IDC_CNF_SB_WIDTH, 78, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "&H?he :", -1, 14, 39, 54, 9
EDITTEXT IDC_CNF_SB_HEIGHT, 78, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "Fenstergr?sse", -1, 10, 55, 110, 42
LTEXT "Brei&te :", -1, 14, 69, 54, 9
EDITTEXT IDC_CNF_WIN_WIDTH, 78, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "H?h&e :", -1, 14, 83, 54, 9
EDITTEXT IDC_CNF_WIN_HEIGHT, 78, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
}
More information about the wine-patches
mailing list