hello everybody!

i'm working on bug #137: some apps (for example winmine.exe) fail to
work in managed mode, but under desktop or in unmanaged mode everything
is ok. it took me quite some time to find out that problem is (most
probably) in ShowWindow() (windows/winpos.c), more concrete the
WS_VISIBLE flag isn't set when ShowWindow(hwnd,SW_NORMAL) is called.
that bit isn't set because of this piece of code in
WINPOS_MinMaximize():

case SW_RESTORE:
  if( wndPtr->dwStyle & WS_MINIMIZE )
  {
    if( wndPtr->flags & WIN_NATIVE ) {
      if( wndPtr->pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, TRUE )
) {
        TRACE("SETING MINMAX_NOSWP\n");
        swpFlags |= MINMAX_NOSWP;
      }
    }
  }
 

well, it seems strange to me that we set HAK_ICONICSTATE attr in case of
SW_RESTORE command, especially when this branch seems to be always
executed
when ShowWindow(hwnd,SW_NORMAL) is called. in case of non-managed mode
the third condition is false and nothing happens. not so in managed
mode. if i change the code to something like:

case SW_RESTORE:
  if( wndPtr->dwStyle & WS_MINIMIZE )
  {
    if( wndPtr->flags & WIN_NATIVE ) {
      wndPtr->pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, FALSE );
    }
  }
 
then things start to work.

maybe i'm completely wrong with these considerations (and i have a
feeling i'm). please explain to me.

martin

Reply via email to