From bdfd8d77762921ba0ee7f12f2fc2e21edc726887 Mon Sep 17 00:00:00 2001
From: David Webster <Dave.Webster@bhmi.com>
Date: Mon, 28 Jan 2002 23:10:25 +0000
Subject: [PATCH] Popup Menu processing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/os2/window.cpp | 20 ++++++++++----------
 src/os2/wx23.def   | 14 +++++---------
 2 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/src/os2/window.cpp b/src/os2/window.cpp
index c30bdb8ba4..e9f26646b4 100644
--- a/src/os2/window.cpp
+++ b/src/os2/window.cpp
@@ -1981,22 +1981,22 @@ bool wxWindowOS2::DoPopupMenu(
                    ,nX
                    ,nY
                    ,0L
-                   ,PU_HCONSTRAIN | PU_VCONSTRAIN | PU_MOUSEBUTTON2DOWN | PU_MOUSEBUTTON2
+                   ,PU_HCONSTRAIN | PU_VCONSTRAIN | PU_MOUSEBUTTON1 | PU_KEYBOARD
                   );
+
     while(bIsWaiting)
     {
-        QMSG                        vMsg;
+        QMSG                            vMsg;
+        BOOL                            bRc = ::WinGetMsg(vHabmain, &vMsg, HWND(NULL), 0, 0);
 
-        while (::WinPeekMsg(vHabmain, &vMsg, (HWND)0, WM_COMMAND, WM_COMMAND, PM_REMOVE)
-               && vMsg.msg != WM_QUIT)
+        if (vMsg.msg == WM_MENUEND || vMsg.msg == WM_COMMAND)
         {
-            wxTheApp->DoMessage((WXMSG*)&vMsg);
+            bIsWaiting = FALSE;
         }
-        if (vMsg.msg == WM_DESTROY || vMsg.msg == WM_QUIT)
-            break;
+        ::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
+
     }
     wxCurrentPopupMenu = NULL;
-
     pMenu->SetInvokingWindow(NULL);
     return TRUE;
 } // end of wxWindowOS2::DoPopupMenu
@@ -2498,8 +2498,8 @@ MRESULT wxWindowOS2::OS2WindowProc(
         case WM_BUTTON3MOTIONEND:
         case WM_BUTTON3MOTIONSTART:
             {
-                short x = LOWORD(lParam);
-                short y = HIWORD(lParam);
+                short x = LOWORD(wParam);
+                short y = HIWORD(wParam);
 
                 bProcessed = HandleMouseEvent(uMsg, x, y, (WXUINT)wParam);
             }
diff --git a/src/os2/wx23.def b/src/os2/wx23.def
index a6cce86f4f..4b67a2ef42 100644
--- a/src/os2/wx23.def
+++ b/src/os2/wx23.def
@@ -4,7 +4,7 @@ DATA MULTIPLE NONSHARED READWRITE LOADONCALL
 CODE LOADONCALL
 
 EXPORTS
-;From library:  F:\Dev\Wx2\WxWindows\lib\wx.lib
+;From library:  H:\DEV\WX2\WXWINDOWS\LIB\wx.lib
   ;From object file:  dummy.cpp
     ;PUBDEFs (Symbols available from object file):
       wxDummyChar
@@ -1772,7 +1772,7 @@ EXPORTS
       wxEVT_NC_LEFT_DCLICK
       wxEVT_INIT_DIALOG
       wxEVT_COMMAND_SET_FOCUS
-  ;From object file:  F:\DEV\WX2\WXWINDOWS\src\common\extended.c
+  ;From object file:  H:\DEV\WX2\WXWINDOWS\src\common\extended.c
     ;PUBDEFs (Symbols available from object file):
       ConvertToIeeeExtended
       ConvertFromIeeeExtended
@@ -2242,8 +2242,6 @@ EXPORTS
       __ne__10wxFontBaseCFRC6wxFont
       ;wxFontBase::GetFamilyString() const
       GetFamilyString__10wxFontBaseCFv
-      ;wxFontBase::SetDefaultEncoding(wxFontEncoding)
-      SetDefaultEncoding__10wxFontBaseF14wxFontEncoding
       ;wxFontBase::IsFixedWidth() const
       IsFixedWidth__10wxFontBaseCFv
       ;wxFontBase::New(int,int,int,int,unsigned long,const wxString&,wxFontEncoding)
@@ -3140,8 +3138,6 @@ EXPORTS
       __vft12wxPNGHandler8wxObject
       ;wxConstructorForwxPNGHandler()
       wxConstructorForwxPNGHandler__Fv
-      wx_png_error
-      wx_png_warning
       _PNG_stream_reader
       ;wxPNGHandler::SaveFile(wxImage*,wxOutputStream&,unsigned long)
       SaveFile__12wxPNGHandlerFP7wxImageR14wxOutputStreamUl
@@ -3152,6 +3148,8 @@ EXPORTS
       _PNG_stream_writer
       ;wxPNGHandler::sm_classwxPNGHandler
       sm_classwxPNGHandler__12wxPNGHandler
+      png_silent_error
+      png_silent_warning
   ;From object file:  ..\common\imagpnm.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxPNMHandler::SaveFile(wxImage*,wxOutputStream&,unsigned long)
@@ -5773,7 +5771,7 @@ EXPORTS
       Read32__17wxTextInputStreamFv
       ;wxTextInputStream::SkipIfEndOfLine(char)
       SkipIfEndOfLine__17wxTextInputStreamFc
-  ;From object file:  F:\DEV\WX2\WXWINDOWS\src\common\unzip.c
+  ;From object file:  H:\DEV\WX2\WXWINDOWS\src\common\unzip.c
     ;PUBDEFs (Symbols available from object file):
       unzReadCurrentFile
       unzGetCurrentFileInfo
@@ -6574,8 +6572,6 @@ EXPORTS
       SetForegroundColour__12wxWindowBaseFRC8wxColour
       ;wxWindowBase::SetBackgroundColour(const wxColour&)
       SetBackgroundColour__12wxWindowBaseFRC8wxColour
-      ;wxWindowBase::RemoveEventHandler(wxEvtHandler*)
-      RemoveEventHandler__12wxWindowBaseFP12wxEvtHandler
       ;wxWindowBase::Destroy()
       Destroy__12wxWindowBaseFv
       ;wxWindowBase::SetConstraints(wxLayoutConstraints*)
-- 
2.50.0

