[PATCH] Notepad: Don't save maximized size

Hirofumi Katayama katayama.hirofumi.mz at gmail.com
Mon Sep 8 22:46:15 CDT 2008


---
 programs/notepad/main.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/programs/notepad/main.c b/programs/notepad/main.c
index f231f20..9d38993 100644
--- a/programs/notepad/main.c
+++ b/programs/notepad/main.c
@@ -118,8 +118,11 @@ static VOID NOTEPAD_SaveSettingToRegistry(void)
                 REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey,
&disp) == ERROR_SUCCESS)
     {
         DWORD data;
-
-        GetWindowRect(Globals.hMainWnd, &main_rect);
+        WINDOWPLACEMENT wndpl;
+
+        wndpl.length = sizeof(WINDOWPLACEMENT);
+        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);
-- 
1.6.0



More information about the wine-patches mailing list