Changeset 9765 for trunk/src


Ignore:
Timestamp:
Feb 6, 2003, 9:28:42 PM (23 years ago)
Author:
sandervl
Message:

Send WM_QUERYNEWPALETTE when a window receives focus; translate WM_REALIZEPALETTE into WM_PALETTECHANGED

Location:
trunk/src/user32
Files:
3 edited

Legend:

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

    r9607 r9765  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.98 2003-01-04 12:21:44 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.99 2003-02-06 20:28:38 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    199199        break;
    200200
     201    case WM_REALIZEPALETTE:
     202        winMsg->message = WINWM_PALETTECHANGED;
     203        break;
     204
    201205    case WM_WINDOWPOSCHANGED:
    202206    {
  • trunk/src/user32/pmwindow.cpp

    r9741 r9765  
    1 /* $Id: pmwindow.cpp,v 1.194 2003-01-29 13:07:30 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.195 2003-02-06 20:28:39 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    257257} /* End of main */
    258258//******************************************************************************
    259 #ifdef NEW_WGSS
    260259HBITMAP OPEN32API _O32_CreateBitmapFromPMHandle(HBITMAP hPMBitmap);
    261260
     
    270269    return yyrc;
    271270}
    272 #endif
    273271//******************************************************************************
    274272static void QueryPMMenuBitmaps()
     
    300298        hbmFrameMenu[PMMENU_CLOSEBUTTONDOWN] = GpiLoadBitmap(hdc, hModDisplay, SBMP_CLOSEDEP, 0, 0);
    301299
    302 #ifdef NEW_WGSS
    303300        //Create win32 bitmap handles of the OS/2 min, max and restore buttons
    304301        hBmpMinButton     = O32_CreateBitmapFromPMHandle(hbmFrameMenu[PMMENU_MINBUTTON]);
     
    310307        hBmpCloseButton   = O32_CreateBitmapFromPMHandle(hbmFrameMenu[PMMENU_CLOSEBUTTON]);
    311308        hBmpCloseButtonDown   = O32_CreateBitmapFromPMHandle(hbmFrameMenu[PMMENU_CLOSEBUTTONDOWN]);
    312 #endif
    313309        DevCloseDC(hdc);
    314310    }
     
    881877    case WM_REALIZEPALETTE:
    882878    {
    883         dprintf(("OS2: WM_REALIZEPALETTE"));
    884         goto RunDefWndProc;
     879        dprintf(("OS2: WM_REALIZEPALETTE %x", win32wnd->getWindowHandle()));
     880        win32wnd->DispatchMsgA(pWinMsg);
     881        break;
    885882    }
    886883
     
    15771574                    //    -> problems with update region if we don't do it
    15781575                    //       todo: rewrite whole handling
     1576                    dprintf(("PMFRAME: WM_WINDOWPOSCHANGED invalidate all"));
    15791577                    WinInvalidateRect(hwnd,NULL,TRUE);
    15801578                }
  • trunk/src/user32/win32wbase.cpp

    r9637 r9765  
    1 /* $Id: win32wbase.cpp,v 1.353 2003-01-06 16:15:13 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.354 2003-02-06 20:28:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    11021102    }
    11031103
     1104    // if in <= 8bpp mode, then we must send a WM_QUERYNEWPALETTE message here
     1105    // this gives the app the chance to realize its palette
     1106    if(ScreenBitsPerPel <= 8) {
     1107        SendMessageA(getWindowHandle(),WM_QUERYNEWPALETTE, 0, 0);
     1108    }
    11041109    return SendMessageA(getWindowHandle(),WM_SETFOCUS, hwnd, 0);
    11051110}
     
    37573762                    else ShowWindow(SW_HIDE);
    37583763                }
     3764
    37593765#ifdef DEBUG
    37603766                PrintWindowStyle(ss.styleNew, 0);
Note: See TracChangeset for help on using the changeset viewer.