]> git.saurik.com Git - wxWidgets.git/blame - docs/microwin/microwindows.patches
correction for Mac OS X compilation
[wxWidgets.git] / docs / microwin / microwindows.patches
CommitLineData
8cd38986
JS
1diff -rbu2 microwin.orig/src/mwin/winevent.c microwin/src/mwin/winevent.c
2--- microwin.orig/src/mwin/winevent.c Sun Nov 26 04:57:52 2000
3+++ microwin/src/mwin/winevent.c Thu Jul 5 17:08:35 2001
4@@ -166,5 +166,5 @@
5
6 /* then possibly send user mouse message*/
7- if(hittest == HTCLIENT) {
8+ if(hittest == HTCLIENT || hwnd == GetCapture()) {
9 pt.x = cursorx;
10 pt.y = cursory;
11diff -rbu2 microwin.orig/src/mwin/winuser.c microwin/src/mwin/winuser.c
12--- microwin.orig/src/mwin/winuser.c Wed Jul 5 01:36:42 2000
13+++ microwin/src/mwin/winuser.c Mon Jul 2 13:11:51 2001
14@@ -137,7 +137,11 @@
15 }
16
17+/*
18+ * A helper function for sharing code between PeekMessage and GetMessage
19+ */
20+
21 BOOL WINAPI
22-PeekMessage(LPMSG lpMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax,
23- UINT wRemoveMsg)
24+PeekMessageHelper(LPMSG lpMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax,
25+ UINT wRemoveMsg, BOOL returnIfEmptyQueue)
26 {
27 HWND wp;
28@@ -146,4 +150,8 @@
29 /* check if no messages in queue*/
30 if(mwMsgHead.head == NULL) {
31+ /* Added by JACS so it doesn't reach MwSelect */
32+ if (returnIfEmptyQueue)
33+ return FALSE;
34+
35 #if PAINTONCE
36 /* check all windows for pending paint messages*/
37@@ -177,4 +185,12 @@
38
39 BOOL WINAPI
40+PeekMessage(LPMSG lpMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax,
41+ UINT wRemoveMsg)
42+{
43+ /* Never wait in MwSelect: pass TRUE */
44+ return PeekMessageHelper(lpMsg, hwnd, uMsgFilterMin, uMsgFilterMax, wRemoveMsg, TRUE);
45+}
46+
47+BOOL WINAPI
48 GetMessage(LPMSG lpMsg,HWND hwnd,UINT wMsgFilterMin,UINT wMsgFilterMax)
49 {
50@@ -183,5 +199,6 @@
51 * so this code will work
52 */
53- while(!PeekMessage(lpMsg, hwnd, wMsgFilterMin, wMsgFilterMax,PM_REMOVE))
54+ /* Always wait in MwSelect if there are messages: pass FALSE */
55+ while(!PeekMessageHelper(lpMsg, hwnd, wMsgFilterMin, wMsgFilterMax,PM_REMOVE, FALSE))
56 continue;
57 return lpMsg->message != WM_QUIT;