Ignore:
Timestamp:
May 26, 2000, 8:43:35 PM (25 years ago)
Author:
sandervl
Message:

Tasklist fixes

File:
1 edited

Legend:

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

    r3603 r3610  
    1 /* $Id: win32wbase.cpp,v 1.194 2000-05-24 19:30:06 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.195 2000-05-26 18:43:34 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    149149  hClipRegion        = 0;
    150150
     151  hTaskList          = 0;
     152
    151153  if(currentProcessId == -1)
    152154  {
     
    161163Win32BaseWindow::~Win32BaseWindow()
    162164{
     165    if(hTaskList) {
     166        OSLibWinRemoveFromTasklist(hTaskList);
     167    }
     168
    163169    OSLibWinSetVisibleRegionNotify(OS2HwndFrame, FALSE);
    164170    OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, 0);
     
    240246    PrintWindowStyle(cs->style, cs->dwExStyle);
    241247#endif
     248
     249    //If window has no owner/parent window, then it will be added to the tasklist
     250    //(depending on visibility state)
     251    if (!cs->hwndParent) fTaskList = TRUE;
    242252
    243253    sw = SW_SHOW;
     
    501511
    502512  OSLibWinConvertStyle(dwStyle,dwExStyle,&dwOSWinStyle);
    503 #if 0
    504   if(((dwStyle & (WS_CAPTION|WS_POPUP)) == WS_CAPTION) && (getParent() == NULL || getParent() == windowDesktop)) {
    505         fTaskList = TRUE;
    506   }
    507 #else
    508   if (((dwStyle & (WS_CAPTION | WS_SYSMENU | 0xC0000000)) == (WS_CAPTION | WS_SYSMENU))) fTaskList = TRUE;
    509 #endif
    510513
    511514  OS2Hwnd = OSLibWinCreateWindow((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
     
    520523  }
    521524  OSLibWinSetVisibleRegionNotify(OS2HwndFrame, TRUE);
    522 
    523525  SetLastError(0);
    524526  return TRUE;
     
    664666  //Note: Solitaire crashes when receiving WM_SIZE messages before WM_CREATE
    665667  fCreated = TRUE;
     668
     669  if(fTaskList) {
     670        hTaskList = OSLibWinAddToTaskList(OS2HwndFrame, windowNameA, (cs->style & WS_VISIBLE) ? 1 : 0);
     671  }
    666672
    667673  if (SendInternalMessageA(WM_NCCREATE,0,(LPARAM)cs))
     
    13371343        {
    13381344          HandleNCPaint((HRGN)1);
    1339           OSLibWinSetWindowText(OS2HwndFrame,(LPSTR)windowNameA);
     1345          if(hTaskList) {
     1346                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     1347          }
    13401348        }
    13411349
     
    17951803        {
    17961804          HandleNCPaint((HRGN)1);
    1797           OSLibWinSetWindowText(OS2HwndFrame,(LPSTR)windowNameA);
     1805          if(hTaskList) {
     1806                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     1807          }
    17981808        }
    17991809
     
    20982108
    20992109    if(showstate & SWPOS_SHOW) {
    2100             setStyle(getStyle() | WS_VISIBLE);
    2101     }
    2102     else    setStyle(getStyle() & ~WS_VISIBLE);
    2103 
     2110         setStyle(getStyle() | WS_VISIBLE);
     2111         if(hTaskList) {
     2112                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     2113         }
     2114    }
     2115    else {
     2116        if(hTaskList) {
     2117                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     2118        }
     2119        setStyle(getStyle() & ~WS_VISIBLE);
     2120    }
    21042121    showFlag = (nCmdShow != SW_HIDE);
    21052122
     
    22482265        //SvL: TODO: Send WM_SHOWWINDOW??
    22492266        OSLibWinShowWindow(OS2Hwnd, SWPOS_SHOW);
     2267        if(hTaskList) {
     2268                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     2269        }
    22502270    }
    22512271    else
     
    22542274        //SvL: TODO: Send WM_SHOWWINDOW??
    22552275        OSLibWinShowWindow(OS2Hwnd, SWPOS_HIDE);
     2276        if(hTaskList) {
     2277                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     2278        }
    22562279    }
    22572280    rc = OSLibWinSetMultWindowPos(&swp, 1);
Note: See TracChangeset for help on using the changeset viewer.