bugfix: Saving normal position rect
Hirofumi Katayama
katayama.hirofumi.mz at gmail.com
Wed Jul 23 22:16:35 CDT 2008
The position of maximized window should not be saved.
Notepad should save the restored position rather than the maximized position.
diff -u -r wineold/wine-1.1.0/programs/notepad/main.c
wine/wine-1.1.0/programs/notepad/main.c
--- wineold/wine-1.1.0/programs/notepad/main.c Fri Jun 27 23:24:42 2008
+++ wine/wine-1.1.0/programs/notepad/main.c Thu Jul 24 02:25:25 2008
@@ -118,8 +118,9 @@
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey,
&disp) == ERROR_SUCCESS)
{
DWORD data;
-
- GetWindowRect(Globals.hMainWnd, &main_rect);
+ WINDOWPLACEMENT wndpl;
+ GetWindowPlacement(Globals.hMainWnd, &wndpl);
+ main_rect = wndpl.rcNormalPosition;
#define SET_NOTEPAD_REG(hkey, value_name, value_data) do { DWORD data
= (DWORD)(value_data); RegSetValueEx(hkey, value_name, 0, REG_DWORD,
(LPBYTE)&data, sizeof(DWORD)); }while(0)
SET_NOTEPAD_REG(hkey, value_fWrap, Globals.bWrapLongLines);
More information about the wine-patches
mailing list