Ignore:
Timestamp:
Oct 24, 2001, 12:26:46 PM (24 years ago)
Author:
sandervl
Message:

IsWindowVisible fix for window with invisible owner

File:
1 edited

Legend:

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

    r7182 r7183  
    1 /* $Id: window.cpp,v 1.111 2001-10-24 09:53:14 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.112 2001-10-24 10:26:46 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    728728    ret = TRUE;
    729729
    730     //check visibility of parents
    731     hwndParent = GetParent(hwnd);
    732     while(hwndParent) {
    733         dwStyle = GetWindowLongA(hwndParent, GWL_STYLE);
    734         if(!(dwStyle & WS_VISIBLE)) {
    735             dprintf(("IsWindowVisible %x returned FALSE (parent %x invisible)", hwnd, hwndParent));
    736             return FALSE;
     730    if(dwStyle & WS_CHILD)
     731    {
     732        //check visibility of parents
     733        hwndParent = GetParent(hwnd);
     734        while(hwndParent) {
     735            dwStyle = GetWindowLongA(hwndParent, GWL_STYLE);
     736            if(!(dwStyle & WS_VISIBLE)) {
     737                dprintf(("IsWindowVisible %x returned FALSE (parent %x invisible)", hwnd, hwndParent));
     738                return FALSE;
     739            }
     740            if(!(dwStyle & WS_CHILD)) {
     741                break; //GetParent can also return the owner
     742            }
     743            hwndParent = GetParent(hwndParent);
    737744        }
    738         if(!(dwStyle & WS_CHILD)) {
    739             break; //GetParent can also return the owner
    740         }
    741         hwndParent = GetParent(hwndParent);
    742     }
    743 
     745    }
    744746end:
    745747    dprintf(("IsWindowVisible %x returned %d", hwnd, ret));
Note: See TracChangeset for help on using the changeset viewer.