Kirix Support Forums

wxFrameManager doesn't skip mouse move or button up

Please post any wxAUI patches or modifications you've created here. Thanks!

wxFrameManager doesn't skip mouse move or button up

Postby gerryiles on Mon Mar 13, 2006 12:50 pm

The wxFrameManager class takes care to call event.Skip() for left button down events that it doesn't handle but doesn't do the same for left button up or mouse move events. This causes problems if you need to capture the mouse in the frame class.

This patch should sort it out:

--- Trunk/XaraLX/wxXtra/manager.cpp (revision 627)
+++ Trunk/XaraLX/wxXtra/manager.cpp (revision 628)
@@ -4049,6 +4049,10 @@
pane.state &= ~wxPaneInfo::actionPane;
Update();
}
+ else
+ {
+ event.Skip();
+ }

m_action = actionNone;
m_last_mouse_move = wxPoint(); // see comment in OnMotion()
@@ -4198,6 +4202,10 @@
m_hover_button = NULL;
Repaint();
}
+ else
+ {
+ event.Skip();
+ }
}
}
}

Gerry
Senior Programmer, Xara Group Ltd.
gerryiles
Registered User
 
Posts: 1
Joined: Mon Mar 13, 2006 12:39 pm

Re: wxFrameManager doesn't skip mouse move or button up

Postby abligh on Mon Mar 13, 2006 1:10 pm

gerryiles wrote:The wxFrameManager class takes care to call event.Skip() for left button down events that it doesn't handle but doesn't do the same for left button up or mouse move events. This causes problems if you need to capture the mouse in the frame class.

This patch should sort it out:


This, and the fix for IdleEvents, are now up at http://www.alex.org.uk/wxAUI/index,html
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Return to wxAUI Patches & Modifications