- Timestamp:
- Aug 22, 2003, 3:16:45 PM (22 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/message.cpp
r8953 r10240 1 /* $Id: message.cpp,v 1. 5 2002-08-01 16:04:19sandervl Exp $ */1 /* $Id: message.cpp,v 1.6 2003-08-22 13:16:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 210 210 //otherwise use WinSendMsg to send it to the right process/thread 211 211 dprintf(("SendMessages (inter-process/thread) %x %x %x %x", Win32ToOS2Handle(hwnd), msg, wparam, lparam)); 212 result = OSLibSendMessage( Win32ToOS2Handle(hwnd), msg, wparam, lparam, TRUE);212 result = OSLibSendMessage(hwnd, Win32ToOS2Handle(hwnd), msg, wparam, lparam, TRUE); 213 213 ret = 1; 214 214 } … … 255 255 //otherwise use WinSendMsg to send it to the right process/thread 256 256 dprintf(("SendMessages (inter-process/thread) %x %x %x %x", Win32ToOS2Handle(hwnd), msg, wparam, lparam)); 257 result = OSLibSendMessage( Win32ToOS2Handle(hwnd), msg, wparam, lparam, FALSE);257 result = OSLibSendMessage(hwnd, Win32ToOS2Handle(hwnd), msg, wparam, lparam, FALSE); 258 258 ret = 1; 259 259 } -
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 /* -
trunk/src/user32/oslibmsg.h
r10216 r10240 1 /* $Id: oslibmsg.h,v 1.2 2 2003-08-08 13:30:19sandervl Exp $ */1 /* $Id: oslibmsg.h,v 1.23 2003-08-22 13:16:45 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 53 53 BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode); 54 54 BOOL OSLibPostMessage(HWND hwndWin32, HWND hwndOS2, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode); 55 ULONG OSLibSendMessage(HWND hwnd , ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode);55 ULONG OSLibSendMessage(HWND hwndWin32, HWND hwndOS2, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode); 56 56 ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend); 57 57 BOOL OSLibSendWinMessage(HWND hwnd, ULONG winmsg); -
trunk/src/user32/pmwindow.cpp
r10190 r10240 1 /* $Id: pmwindow.cpp,v 1.21 8 2003-07-31 15:56:44sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.219 2003-08-22 13:16:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 117 117 // WM_KEYDOWN messages come in properly. 118 118 static BOOL fKeyAltGrDown = FALSE; 119 119 static BOOL fEnableCDPolling = FALSE; 120 120 121 121 static char *PMDragExtractFiles(PDRAGINFO pDragInfo, ULONG *pcItems, ULONG *pulBytes); … … 343 343 { 344 344 fDragDropDisabled = fDisabled; 345 } 346 //****************************************************************************** 347 // Turn on CD Polling (window with 2 second timer to check CD disk presence) 348 // 349 // NOTE: This can cause PM hangs when executing a program for a very long time 350 // (block in IOCtl) 351 //****************************************************************************** 352 void WIN32API CustEnableCDPolling() 353 { 354 fEnableCDPolling = TRUE; 345 355 } 346 356 //****************************************************************************** … … 598 608 599 609 //Create CD notification window 600 if(hwndCD == 0 ) {610 if(hwndCD == 0 && fEnableCDPolling) { 601 611 hwndCD = WinCreateWindow(HWND_DESKTOP, WIN32_CDCLASS, 602 612 NULL, 0, 0, 0, 0, 0,
Note:
See TracChangeset
for help on using the changeset viewer.