Changeset 20134


Ignore:
Timestamp:
Jan 2, 2003, 6:02:06 PM (22 years ago)
Author:
sandervl
Message:

corrected regressions caused by previous setfocus fix; make sure owner isn't disabled when specifying SWP_DEACTIVATE

Location:
tags/trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/user32/oslibwin.cpp

    r20133 r20134  
    1 /* $Id: oslibwin.cpp,v 1.135 2003-01-02 15:21:58 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.136 2003-01-02 17:02:04 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    734734   //SvL: Must also deactivate the window when hiding it or else focus won't
    735735   //     change. (NOTE: make sure this doesn't cause regressions (01-02-2003)
    736    if (  fuFlags & SWP_HIDEWINDOW_W)  flags |= SWP_HIDE|SWP_DEACTIVATE;
     736   if (  fuFlags & SWP_HIDEWINDOW_W) {
     737       flags |= SWP_HIDE|SWP_DEACTIVATE;
     738   }
    737739
    738740   if (  fuFlags & SWP_NOSENDCHANGING_W) flags |= SWP_NOADJUST;
  • TabularUnified tags/trunk/src/user32/win32wbase.cpp

    r20119 r20134  
    1 /* $Id: win32wbase.cpp,v 1.349 2003-01-01 14:29:44 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.350 2003-01-02 17:02:05 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    25802580    swp.hwnd = OS2HwndFrame;
    25812581
     2582    //SvL: Must also deactivate the window when hiding it or else focus won't
     2583    //     change. (NOTE: make sure this doesn't cause regressions (01-02-2003)
     2584    if((swp.fl & (SWPOS_HIDE|SWPOS_DEACTIVATE)) == (SWPOS_HIDE|SWPOS_DEACTIVATE))
     2585    {
     2586        //we must make sure the owner is not disabled or else the focus will
     2587        //be switched to the wrong window
     2588        Win32BaseWindow *topOwner;
     2589
     2590        if(getOwner() == NULL) {
     2591             windowDesktop->addRef();
     2592             topOwner = windowDesktop;
     2593        }
     2594        else topOwner = GetWindowFromHandle(getOwner()->GetTopParent());
     2595
     2596        if(topOwner != NULL) {
     2597             DWORD dwStyle = topOwner->GetWindowLong(GWL_STYLE, FALSE);
     2598             if(dwStyle & WS_DISABLED) {
     2599                 swp.fl &= ~SWPOS_DEACTIVATE;
     2600             }
     2601        }
     2602        else DebugInt3();
     2603    }
     2604
    25822605    if(fuFlags & SWP_SHOWWINDOW && !IsWindowVisible(getWindowHandle())) {
    25832606        setStyle(getStyle() | WS_VISIBLE);
  • TabularUnified tags/trunk/src/user32/window.cpp

    r20132 r20134  
    1 /* $Id: window.cpp,v 1.129 2003-01-02 15:21:45 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.130 2003-01-02 17:02:06 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    756756 BOOL activate, ret;
    757757 TEB *teb;
    758    
     758
     759    dprintf(("SetFocus %x", hwnd));   
    759760    teb = GetThreadTEB();
    760761    if(teb == NULL) {
Note: See TracChangeset for help on using the changeset viewer.