Ignore:
Timestamp:
Apr 30, 2002, 8:47:46 PM (23 years ago)
Author:
sandervl
Message:

PF: Focus fix when minimizing window

File:
1 edited

Legend:

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

    r8304 r8350  
    1 /* $Id: oslibwin.cpp,v 1.119 2002-04-28 15:47:09 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.120 2002-04-30 18:47:46 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    550550
    551551    BOOL rc;
     552    HWND hwndNext;
    552553
    553554    rc = WinSetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_MINIMIZE);
     
    556557        if (rc)
    557558        {
    558           HWND activeHandle = (HWND)WinSendMsg(hwnd, WM_QUERYFOCUSCHAIN, MPFROMSHORT(QFC_ACTIVE), MPFROMHWND(hwnd));
    559           if (activeHandle != NULLHANDLE)
    560            rc = WinSetWindowPos(activeHandle, HWND_TOP, 0, 0, 0, 0, SWP_ACTIVATE | SWP_ZORDER);
     559          HENUM henum;
     560          henum = WinBeginEnumWindows(HWND_DESKTOP);
     561          while ((hwndNext = WinGetNextWindow(henum)) != NULLHANDLE)
     562          {
     563           if (WinIsWindowVisible(hwndNext) && WinIsWindowShowing(hwndNext)) break;
     564          }
     565          WinEndEnumWindows (henum);
     566          rc = WinSetWindowPos(hwndNext, HWND_TOP, 0, 0, 0, 0, SWP_ACTIVATE | SWP_ZORDER);
    561567        }
    562568    }
Note: See TracChangeset for help on using the changeset viewer.