I'm porting my game to wxWidgets 2.8.0, it works on Win32 and X11 but on MacOSX 10.4.8, I don't receive EVT_LEFT_UP and EVT_RIGHT_UP events. I had to make the following changes to get mouse events :
#ifdef __WXMAC__
EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent)
#else
EVT_LEFT_UP(MyFrame::OnMouseLeftUp)
EVT_RIGHT_UP(MyFrame::OnMouseRightUp)
#endif
void MyFrame::OnMouseEvent(wxMouseEvent& event)
{
if (event.LeftUp())
OnMouseLeftUp(event);
if (event.RightUp())
OnMouseRightUp(event);
}
is it normal ?
wxMac mouse events problems Topic is solved
Now i do it on a wxGLCanvas, but iirc i've already done it on wxFrames toooplayez wrote:I created a child wxWindow, and now I receive the EVT_LEFT_UP and EVT_RIGHT_UP events. But on the parent window, I have to do as explained in the first post.
Do you use a child window ? (or wxGLCanvas)
once i got a similar error, and it was because 2 components were set to catch the same mouse event
if not, we'll need code to help further
I modified the minimal sample to show my problem (no mouse click events in the parent window).
uncomment
//#define SND_WND
to set up a child window, and you will receive the mouse click events.
I never receive the SetFocus and KillFocus events (in the parent or child window). Any idea ?
uncomment
//#define SND_WND
to set up a child window, and you will receive the mouse click events.
I never receive the SetFocus and KillFocus events (in the parent or child window). Any idea ?
- Attachments
-
- minimal.cpp
- (8.7 KiB) Downloaded 92 times
I tried to do as advised here (use Connect() instread of macro) :
http://wxwidgets.blogspot.com/2007/01/i ... nnect.html
But it doesn't change anything.
Should I report this as a bug on
http://sourceforge.net/tracker/?group_i ... tid=109863
?
http://wxwidgets.blogspot.com/2007/01/i ... nnect.html
But it doesn't change anything.
Should I report this as a bug on
http://sourceforge.net/tracker/?group_i ... tid=109863
?
Unless someone knows something i don't, i guess sooplayez wrote: Should I report this as a bug on
http://sourceforge.net/tracker/?group_i ... tid=109863
?
good luck
problem solved on
http://sourceforge.net/tracker/index.ph ... tid=109863
http://sourceforge.net/tracker/index.ph ... tid=109863