Ignore:
Timestamp:
Jul 20, 1999, 9:42:36 AM (26 years ago)
Author:
sandervl
Message:

Accelerator support (not working) + bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/pmwindow.cpp

    r340 r342  
    1 /* $Id: pmwindow.cpp,v 1.12 1999-07-19 18:40:43 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.13 1999-07-20 07:42:36 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    2424#include "oslibutil.h"
    2525#include "oslibgdi.h"
     26#include "oslibmsg.h"
    2627
    2728HMQ  hmq = 0;                             /* Message queue handle         */
     
    7576   }
    7677
    77    return(TRUE);
     78   return OSLibInitMsgQueue();
    7879} /* End of main */
    7980//******************************************************************************
     
    163164    case WM_ADJUSTWINDOWPOS:
    164165    {
    165       RECTLOS2 rectChild;
    166       ULONG x, y;
     166      ULONG    x, y;
     167      PSWP     pswp = (PSWP)mp1;
    167168
    168169        dprintf(("OS2: WM_ADJUSTWINDOWPOS %x", hwnd));
    169170
    170         WinQueryWindowRect(hwnd, (PRECTL)&rectChild);
    171 
    172         //Calculate position relative to parent window (real window or desktop)
    173         x = rectChild.xLeft;
    174 //        y = MapOS2ToWin32Y(hwnd, &rectChild, rectChild.yBottom);
    175 
    176         if(win32wnd->MsgMove(x, y)) {
    177             goto RunDefWndProc;
    178         }
    179         break;
     171        if(pswp->fl & SWP_MOVE) {
     172            if(win32wnd->isChild()) {
     173                x = pswp->x;
     174                y = pswp->cy - y - 1;
     175            }
     176            else {
     177                OSLIBPOINT point;
     178
     179                point.x = pswp->x;
     180                point.y = pswp->y;
     181
     182                MapOS2ToWin32Point(OSLIB_HWND_DESKTOP, hwnd, &point);
     183                x = point.x;
     184                y = point.y;
     185            }
     186            if(win32wnd->MsgMove(x, y)) {
     187                goto RunDefWndProc;
     188            }
     189            break;
     190        }
     191        goto RunDefWndProc;
    180192    }
    181193
     
    183195    {
    184196        dprintf(("OS2: WM_WINDOWPOSCHANGED %x", hwnd));
     197        goto RunDefWndProc;
    185198    }
    186199
     
    383396            win32wnd->MsgCommand(CMD_MENU, SHORT1FROMMP(mp1), 0);
    384397        }
     398        if(SHORT1FROMMP(mp2) == CMDSRC_ACCELERATOR) {
     399            win32wnd->MsgCommand(CMD_ACCELERATOR, SHORT1FROMMP(mp1), 0);
     400        }
    385401        //todo controls + accelerators
    386402        break;
    387403
    388404    case WM_SYSCOMMAND:
     405        dprintf(("WM_SYSCOMMAND"));
     406        break;
    389407
    390408    case WM_CHAR:
     409        dprintf(("WM_CHAR"));
    391410
    392411    case WM_INITMENU:
Note: See TracChangeset for help on using the changeset viewer.