Commit 945f4a79 authored by Kirill K. Smirnov's avatar Kirill K. Smirnov Committed by Alexandre Julliard

wineconsole: Move window handle to inner_data structure.

parent 2918a272
...@@ -953,6 +953,7 @@ enum init_return WCCURSES_InitBackend(struct inner_data* data) ...@@ -953,6 +953,7 @@ enum init_return WCCURSES_InitBackend(struct inner_data* data)
data->fnScroll = WCCURSES_Scroll; data->fnScroll = WCCURSES_Scroll;
data->fnSetFont = WCCURSES_SetFont; data->fnSetFont = WCCURSES_SetFont;
data->fnDeleteBackend = WCCURSES_DeleteBackend; data->fnDeleteBackend = WCCURSES_DeleteBackend;
data->hWnd = NULL;
if (wine_server_fd_to_handle(0, GENERIC_READ|SYNCHRONIZE, 0, if (wine_server_fd_to_handle(0, GENERIC_READ|SYNCHRONIZE, 0,
(obj_handle_t*)&PRIVATE(data)->hInput)) (obj_handle_t*)&PRIVATE(data)->hInput))
......
...@@ -434,7 +434,7 @@ static BOOL select_font(struct dialog_info* di) ...@@ -434,7 +434,7 @@ static BOOL select_font(struct dialog_info* di)
WCUSER_FillLogFont(&lf, di->font[size_idx].faceName, WCUSER_FillLogFont(&lf, di->font[size_idx].faceName,
di->font[size_idx].height, di->font[size_idx].weight); di->font[size_idx].height, di->font[size_idx].weight);
hFont = WCUSER_CopyFont(&config, PRIVATE(di->data)->hWnd, &lf, NULL); hFont = WCUSER_CopyFont(&config, di->data->hWnd, &lf, NULL);
if (!hFont) return FALSE; if (!hFont) return FALSE;
if (config.cell_height != di->font[size_idx].height) if (config.cell_height != di->font[size_idx].height)
...@@ -573,7 +573,7 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA ...@@ -573,7 +573,7 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA
WCUSER_FillLogFont(&lf, di->font[val].faceName, WCUSER_FillLogFont(&lf, di->font[val].faceName,
di->font[val].height, di->font[val].weight); di->font[val].height, di->font[val].weight);
DeleteObject(WCUSER_CopyFont(&di->config, DeleteObject(WCUSER_CopyFont(&di->config,
PRIVATE(di->data)->hWnd, &lf, NULL)); di->data->hWnd, &lf, NULL));
} }
val = (GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0) << 4) | val = (GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0) << 4) |
...@@ -831,7 +831,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) ...@@ -831,7 +831,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current)
psHead.pszCaption = buff; psHead.pszCaption = buff;
psHead.nPages = 3; psHead.nPages = 3;
psHead.hwndParent = PRIVATE(data)->hWnd; psHead.hwndParent = data->hWnd;
psHead.u3.phpage = psPage; psHead.u3.phpage = psPage;
WINECON_DumpConfig("init", refcfg); WINECON_DumpConfig("init", refcfg);
...@@ -846,7 +846,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) ...@@ -846,7 +846,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current)
if (refcfg == &data->curcfg) if (refcfg == &data->curcfg)
{ {
switch (DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_SAVE_SETTINGS), switch (DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_SAVE_SETTINGS),
PRIVATE(data)->hWnd, WCUSER_SaveDlgProc)) data->hWnd, WCUSER_SaveDlgProc))
{ {
case IDC_SAV_SAVE: save = TRUE; modify_session = TRUE; break; case IDC_SAV_SAVE: save = TRUE; modify_session = TRUE; break;
case IDC_SAV_SESSION: modify_session = TRUE; break; case IDC_SAV_SESSION: modify_session = TRUE; break;
......
...@@ -58,6 +58,7 @@ struct inner_data { ...@@ -58,6 +58,7 @@ struct inner_data {
HANDLE hConIn; /* console input handle */ HANDLE hConIn; /* console input handle */
HANDLE hConOut; /* screen buffer handle: has to be changed when active sb changes */ HANDLE hConOut; /* screen buffer handle: has to be changed when active sb changes */
HANDLE hSynchro; /* waitable handle signalled by server when something in server has been modified */ HANDLE hSynchro; /* waitable handle signalled by server when something in server has been modified */
HWND hWnd; /* handle of 'user' window or NULL for 'curses' */
INT nCmdShow; /* argument of WinMain */ INT nCmdShow; /* argument of WinMain */
int (*fnMainLoop)(struct inner_data* data); int (*fnMainLoop)(struct inner_data* data);
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
struct inner_data_user { struct inner_data_user {
/* the following fields are only user by the USER backend (should be hidden in user) */ /* the following fields are only user by the USER backend (should be hidden in user) */
HWND hWnd; /* handle to windows for rendering */
HFONT hFont; /* font used for rendering, usually fixed */ HFONT hFont; /* font used for rendering, usually fixed */
LONG ext_leading; /* external leading for hFont */ LONG ext_leading; /* external leading for hFont */
HDC hMemDC; /* memory DC holding the bitmap below */ HDC hMemDC; /* memory DC holding the bitmap below */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment