Ignore:
Timestamp:
Jan 20, 2000, 5:48:58 PM (26 years ago)
Author:
cbratschi
Message:

WM_CONTEXTMENU, sysmenu changes

File:
1 edited

Legend:

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

    r2469 r2483  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.15 2000-01-18 20:10:40 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.16 2000-01-20 16:48:55 cbratschi Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    208208        hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);
    209209
    210         if (IsNCMouseMsg(win32wnd)) 
     210        if (IsNCMouseMsg(win32wnd))
    211211        {
    212212          winMsg->message = WINWM_NCMOUSEMOVE;
    213213          winMsg->wParam  = (WPARAM)hittest;
    214214          winMsg->lParam  = MAKELONG(winMsg->pt.x,winMsg->pt.y);
    215         } 
     215        }
    216216        else
    217217        {
     
    234234        winMsg->message = WINWM_NCACTIVATE;
    235235        winMsg->wParam  = SHORT1FROMMP(os2Msg->mp1);
    236         return TRUE;
     236        return TRUE;
    237237      }
    238238      case WM_WINDOWPOSCHANGED:
    239239      {
    240         //todo: proper translation
    241         return FALSE;
     240        //todo: proper translation
     241        return FALSE;
    242242      }
    243243    }
     
    324324
    325325        if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
    326                 dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy));
    327                 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);
    328 
    329                 thdb->wp.hwnd = win32wnd->getWindowHandle();
    330                 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
    331                 {
    332                         Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
    333                         if(wndAfter)
    334                         thdb->wp.hwndInsertAfter = wndAfter->getWindowHandle();
    335                 }
    336 
    337                 PRECT lpRect = win32wnd->getWindowRect();
    338                 //SvL: Only send it when the client has changed & the frame hasn't
    339                 //     If the frame size/position has changed, pmframe.cpp will send
    340                 //     this message
    341                 if(lpRect->right == thdb->wp.x+thdb->wp.cx && lpRect->bottom == thdb->wp.y+thdb->wp.cy) {
    342                         winMsg->message = WINWM_WINDOWPOSCHANGED;
    343                         winMsg->lParam  = (LPARAM)&thdb->wp;
    344                         break;
    345                 }
     326                dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy));
     327                win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);
     328
     329                thdb->wp.hwnd = win32wnd->getWindowHandle();
     330                if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
     331                {
     332                        Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
     333                        if(wndAfter)
     334                        thdb->wp.hwndInsertAfter = wndAfter->getWindowHandle();
     335                }
     336
     337                PRECT lpRect = win32wnd->getWindowRect();
     338                //SvL: Only send it when the client has changed & the frame hasn't
     339                //     If the frame size/position has changed, pmframe.cpp will send
     340                //     this message
     341                if(lpRect->right == thdb->wp.x+thdb->wp.cx && lpRect->bottom == thdb->wp.y+thdb->wp.cy) {
     342                        winMsg->message = WINWM_WINDOWPOSCHANGED;
     343                        winMsg->lParam  = (LPARAM)&thdb->wp;
     344                        break;
     345                }
    346346        }
    347347        goto dummymessage;
     
    447447          winMsg->wParam  = (WPARAM)hittest;
    448448          winMsg->lParam  = MAKELONG(winMsg->pt.x,winMsg->pt.y);
    449         } 
     449        }
    450450        else
    451451        {
     
    672672
    673673    case WM_CONTEXTMENU:
     674        winMsg->message = WINWM_CONTEXTMENU;
     675        winMsg->wParam  = win32wnd->getWindowHandle();
     676        winMsg->lParam  = MAKELONG(winMsg->pt.x,winMsg->pt.y);
     677        break;
     678
    674679    case WM_INITMENU:
    675680    case WM_MENUSELECT:
Note: See TracChangeset for help on using the changeset viewer.