Ignore:
Timestamp:
May 14, 2003, 1:40:17 PM (22 years ago)
Author:
sandervl
Message:

Do not send any SetWindowPos related messages if the state of the window doesn't change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r10076 r10089  
    1 /* $Id: win32wbase.cpp,v 1.372 2003-05-06 13:50:37 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.373 2003-05-14 11:40:17 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    25392539    }
    25402540
    2541 #if 0
    2542     /* Fix redundant flags */
    2543     if(getStyle() & WS_VISIBLE) {
    2544         fuFlags &= ~SWP_SHOWWINDOW;
    2545     }
    2546     else
    2547     {
    2548         if (!(fuFlags & SWP_SHOWWINDOW))
    2549               fuFlags |= SWP_NOREDRAW;
    2550         fuFlags &= ~SWP_HIDEWINDOW;
    2551     }
    2552 
    2553 ////    if(cx < 0) cx = 0;
    2554 ////    if(cy < 0) cy = 0;
    2555 
    2556     if((rectWindow.right - rectWindow.left == cx) && (rectWindow.bottom - rectWindow.top == cy)) {
    2557         fuFlags |= SWP_NOSIZE;    /* Already the right size */
    2558     }
    2559 
    2560     if((rectWindow.left == x) && (rectWindow.top == y)) {
    2561         fuFlags |= SWP_NOMOVE;    /* Already the right position */
    2562     }
    2563 
    2564     if(getWindowHandle() == GetActiveWindow()) {
    2565         fuFlags |= SWP_NOACTIVATE;   /* Already active */
    2566     }
    2567     else
    2568     if((getStyle() & (WS_POPUP | WS_CHILD)) != WS_CHILD )
    2569     {
    2570         if(!(fuFlags & SWP_NOACTIVATE)) /* Bring to the top when activating */
    2571         {
    2572             fuFlags &= ~SWP_NOZORDER;
    2573             hwndInsertAfter = HWND_TOP;
     2541    if(state >= STATE_CREATED) {
     2542        /* Fix redundant flags */
     2543        if(getStyle() & WS_VISIBLE) {
     2544            fuFlags &= ~SWP_SHOWWINDOW;
     2545        }
     2546        else
     2547        {
     2548            if (!(fuFlags & SWP_SHOWWINDOW))
     2549                  fuFlags |= SWP_NOREDRAW;
     2550            fuFlags &= ~SWP_HIDEWINDOW;
     2551        }
     2552
     2553        if((rectWindow.right - rectWindow.left == cx) && (rectWindow.bottom - rectWindow.top == cy)) {
     2554            fuFlags |= SWP_NOSIZE;    /* Already the right size */
     2555        }
     2556
     2557        if((rectWindow.left == x) && (rectWindow.top == y)) {
     2558            fuFlags |= SWP_NOMOVE;    /* Already the right position */
     2559        }
     2560
     2561        if(getWindowHandle() == GetActiveWindow()) {
     2562            fuFlags |= SWP_NOACTIVATE;   /* Already active */
     2563        }
     2564        else
     2565        if((getStyle() & (WS_POPUP | WS_CHILD)) != WS_CHILD )
     2566        {
     2567            if(!(fuFlags & SWP_NOACTIVATE)) /* Bring to the top when activating */
     2568            {
     2569                fuFlags &= ~SWP_NOZORDER;
     2570                hwndInsertAfter = HWND_TOP;
     2571            }
    25742572        }
    25752573    }
    25762574    /* TODO: Check hwndInsertAfter */
    2577 #endif
    25782575
    25792576    //Note: Solitaire crashes when receiving WM_SIZE messages before WM_CREATE
Note: See TracChangeset for help on using the changeset viewer.