Alexandre Julliard : wineconsole: Avoid reentering WINECON_GrabChanges.
Alexandre Julliard
julliard at winehq.org
Fri Sep 9 10:56:45 CDT 2011
Module: wine
Branch: master
Commit: 4a1481152706aac10efc31aa9ab22eeef0020a81
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4a1481152706aac10efc31aa9ab22eeef0020a81
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Sep 8 22:27:41 2011 +0200
wineconsole: Avoid reentering WINECON_GrabChanges.
---
programs/wineconsole/winecon_private.h | 1 +
programs/wineconsole/wineconsole.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/programs/wineconsole/winecon_private.h b/programs/wineconsole/winecon_private.h
index 951b45a..1daf581 100644
--- a/programs/wineconsole/winecon_private.h
+++ b/programs/wineconsole/winecon_private.h
@@ -61,6 +61,7 @@ struct inner_data {
HWND hWnd; /* handle of 'user' window or NULL for 'curses' */
INT nCmdShow; /* argument of WinMain */
BOOL in_set_config; /* to handle re-entrant calls to WINECON_SetConfig */
+ BOOL in_grab_changes;/* to handle re-entrant calls to WINECON_GrabChanges */
BOOL dying; /* to TRUE when we've been notified by server that child has died */
int (*fnMainLoop)(struct inner_data* data);
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index 56be619..70c7a83 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -205,6 +205,8 @@ void WINECON_GrabChanges(struct inner_data* data)
int i, num, ev_found;
HANDLE h;
+ if (data->in_grab_changes) return;
+
SERVER_START_REQ( get_console_renderer_events )
{
wine_server_set_reply( req, evts, sizeof(evts) );
@@ -258,6 +260,7 @@ void WINECON_GrabChanges(struct inner_data* data)
ev_found = i;
}
+ data->in_grab_changes = TRUE;
for (i = 0; i < num; i++)
{
switch (evts[i].event)
@@ -355,6 +358,7 @@ void WINECON_GrabChanges(struct inner_data* data)
WINE_FIXME("Unknown event type (%d)\n", evts[i].event);
}
}
+ data->in_grab_changes = FALSE;
}
/******************************************************************
More information about the wine-cvs
mailing list