Changeset 10240 for trunk/src/user32/oslibmsg.cpp
- Timestamp:
- Aug 22, 2003, 3:16:45 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsg.cpp
r10216 r10240 1 /* $Id: oslibmsg.cpp,v 1.7 5 2003-08-08 13:30:19sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.76 2003-08-22 13:16:44 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 693 693 default: 694 694 { 695 pMsgPacket = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 695 ULONG pid; 696 697 GetWindowThreadProcessId(hwndOdin, &pid); 698 699 //use shared or local memory depending on the target window 700 //(sfree can be used for any heap) 701 if(pid != GetCurrentProcessId()) { 702 pMsgPacket = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 703 } 704 else pMsgPacket = (POSTMSG_PACKET *)malloc(sizeof(POSTMSG_PACKET)); 705 696 706 if (!pMsgPacket) 697 707 { … … 718 728 * 719 729 * @returns 720 * @param hwnd OS/2 hwnd. 730 * @param hwndWin32 Odin window handle. 731 * @param hwndOS2 OS/2 window handle 721 732 * @param msg Odin message id. 722 733 * @param wParam Message param. … … 724 735 * @param fUnicode Unicode indicator. 725 736 */ 726 ULONG OSLibSendMessage(HWND hwnd , ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode)737 ULONG OSLibSendMessage(HWND hwndWin32, HWND hwndOS2, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode) 727 738 { 728 739 ULONG rc; /* return code on packing failure */ 729 740 void * pvMsgPacket; /* packed message (shared memory) */ 741 742 if(GetDesktopWindow() == hwndWin32) { 743 dprintf(("Ignore messages sent to the desktop window")); 744 return TRUE; 745 } 730 746 731 747 /* 732 748 * Call message packer. 733 749 */ 734 pvMsgPacket = OSLibPackMessage( NULLHANDLE, hwnd, msg, wParam, lParam, fUnicode, &rc);750 pvMsgPacket = OSLibPackMessage(hwndWin32, hwndOS2, msg, wParam, lParam, fUnicode, &rc); 735 751 if (!pvMsgPacket) 736 752 { … … 740 756 } 741 757 742 return (ULONG)WinSendMsg(hwnd , WIN32APP_POSTMSG+msg, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), pvMsgPacket);758 return (ULONG)WinSendMsg(hwndOS2, WIN32APP_POSTMSG+msg, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), pvMsgPacket); 743 759 } 744 760 //****************************************************************************** … … 779 795 { 780 796 void * pvMsgPacket; /* packed message (shared memory) */ 797 798 if(GetDesktopWindow() == hwndWin32) { 799 dprintf(("Ignore messages posted to the desktop window")); 800 return TRUE; 801 } 781 802 782 803 /*
Note:
See TracChangeset
for help on using the changeset viewer.