mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
FS#160 - Windows size should not be reset to 0 when it is minimized
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1538 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
42615a30d9
commit
68cdbd31cc
@ -441,18 +441,22 @@ void WindowImplWin32::ProcessEvent(UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
// Resize event
|
// Resize event
|
||||||
case WM_SIZE :
|
case WM_SIZE :
|
||||||
{
|
{
|
||||||
// Update window size
|
// Ignore size events triggered by a minimize (size == 0 in this case)
|
||||||
RECT rectangle;
|
if (wParam != SIZE_MINIMIZED)
|
||||||
GetClientRect(myHandle, &rectangle);
|
{
|
||||||
myWidth = rectangle.right - rectangle.left;
|
// Update window size
|
||||||
myHeight = rectangle.bottom - rectangle.top;
|
RECT rectangle;
|
||||||
|
GetClientRect(myHandle, &rectangle);
|
||||||
|
myWidth = rectangle.right - rectangle.left;
|
||||||
|
myHeight = rectangle.bottom - rectangle.top;
|
||||||
|
|
||||||
Event event;
|
Event event;
|
||||||
event.Type = Event::Resized;
|
event.Type = Event::Resized;
|
||||||
event.Size.Width = myWidth;
|
event.Size.Width = myWidth;
|
||||||
event.Size.Height = myHeight;
|
event.Size.Height = myHeight;
|
||||||
PushEvent(event);
|
PushEvent(event);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gain focus event
|
// Gain focus event
|
||||||
|
Loading…
Reference in New Issue
Block a user