wordpad: Properly save window rect on closing Min/Maximized windows

Dylan Smith dylan.ah.smith at gmail.com
Thu Jul 3 11:51:17 CDT 2008


Previously the window size and position was obtained in such a way that
when the window is closed while minimized, it would be hidden when the
program is started again.  Closing a maximized window would save the
size of the maximized window and use it as the normal/restored size when
the program is started again.

This patch gets the normal position RECT using GetWindowPlacement, and
also saves the maximized state in the registry.  The window is now
shown, on application startup, in the same way that native Wordpad does.

Note: While testing in KDE 3.5.9, I found that maximizing the window
does not cause Wine to recognize the window as maximized, so the normal
position RECT from GetWindowPlacement would be the same as from
GetWindowRect, however setting the window to this size and position will
still make it look maximized.  I focused on correcting wordpad, so
tested this by manipulating the registry in KDE, and also testing in
Windows.
---
 programs/wordpad/registry.c |   26 +++++++++++++++++++++++---
 programs/wordpad/wordpad.c  |    9 +++++++--
 programs/wordpad/wordpad.h  |    1 +
 3 files changed, 31 insertions(+), 5 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-wordpad-Properly-save-window-rect-on-closing-Mi.diff.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080703/20aaa6fe/attachment-0001.txt 


More information about the wine-patches mailing list