Changeset 5725 for trunk/src/user32


Ignore:
Timestamp:
May 17, 2001, 11:50:30 AM (24 years ago)
Author:
sandervl
Message:

destroy menu window after it has been used (instead of just hiding it)

Location:
trunk/src/user32
Files:
3 edited

Legend:

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

    r4865 r5725  
    1 /* $Id: menu.cpp,v 1.29 2001-01-01 11:48:10 sandervl Exp $*/
     1/* $Id: menu.cpp,v 1.30 2001-05-17 09:50:29 sandervl Exp $*/
    22/*
    33 * Menu functions
     
    20832083        if (submenu->hWnd == MENU_GetTopPopupWnd() )
    20842084        {
    2085             ShowWindow( submenu->hWnd, SW_HIDE );
     2085            DestroyWindow( submenu->hWnd );
     2086            submenu->hWnd = 0;
     2087//            ShowWindow( submenu->hWnd, SW_HIDE );
    20862088            uSubPWndLevel = 0;
    20872089        }
     
    30363038        if (menu && menu->wFlags & MF_POPUP)
    30373039        {
    3038             ShowWindow( menu->hWnd, SW_HIDE );
    3039             uSubPWndLevel = 0;
     3040                DestroyWindow( menu->hWnd );
     3041                menu->hWnd = 0;
     3042//            ShowWindow( menu->hWnd, SW_HIDE );
     3043                uSubPWndLevel = 0;
    30403044        }
    30413045        MENU_SelectItem( mt.hOwnerWnd, mt.hTopMenu, NO_SELECTED_ITEM, FALSE, 0 );
  • trunk/src/user32/win32dlg.cpp

    r5685 r5725  
    1 /* $Id: win32dlg.cpp,v 1.62 2001-05-11 08:39:44 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.63 2001-05-17 09:50:30 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    253253
    254254        HWND hwndPreInitFocus = GetFocus();
    255         if(SendInternalMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param)) {
    256             SetFocus(hwndFocus);
     255        if(SendInternalMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param))
     256        {
     257            /* check where the focus is again,
     258             * some controls status might have changed in WM_INITDIALOG */
     259            hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE );
     260            if(GetFocus() != hwndFocus) {
     261                SetFocus(hwndFocus);
     262            }
    257263        }
    258264        else
     
    260266            /* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
    261267               but the focus has not changed, set the focus where we expect it. */
    262                 if ( (getStyle() & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
    263                     SetFocus( hwndFocus );
     268            if ( (getStyle() & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
     269                SetFocus( hwndFocus );
    264270        }
    265271
  • trunk/src/user32/win32wbase.cpp

    r5721 r5725  
    1 /* $Id: win32wbase.cpp,v 1.257 2001-05-16 07:42:26 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.258 2001-05-17 09:50:30 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    30943094
    30953095    dprintf(("SetActiveWindow %x", getWindowHandle()));
     3096    if(GetActiveWindow() == getWindowHandle()) {
     3097        dprintf(("Window already active"));
     3098        return getWindowHandle();
     3099    }
    30963100    if (HOOK_IsHooked( WH_CBT ))
    30973101    {
Note: See TracChangeset for help on using the changeset viewer.