fixing some warnings, adding proper OnChar support for special keys
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -689,7 +689,7 @@ void wxOSX_mouseEvent(NSView* self, SEL _cmd, NSEvent *event)
|
|||||||
impl->mouseEvent(event, self, _cmd);
|
impl->mouseEvent(event, self, _cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL wxOSX_acceptsFirstMouse(NSView* self, SEL _cmd, NSEvent *event)
|
BOOL wxOSX_acceptsFirstMouse(NSView* WXUNUSED(self), SEL WXUNUSED(_cmd), NSEvent *WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// This is needed to support click through, otherwise the first click on a window
|
// This is needed to support click through, otherwise the first click on a window
|
||||||
// will not do anything unless it is the active window already.
|
// will not do anything unless it is the active window already.
|
||||||
@@ -1333,6 +1333,7 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
|
|||||||
|
|
||||||
- (void)animationDidEnd:(NSAnimation*)animation
|
- (void)animationDidEnd:(NSAnimation*)animation
|
||||||
{
|
{
|
||||||
|
wxUnusedVar(animation);
|
||||||
m_isDone = true;
|
m_isDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1948,11 +1949,21 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
|
|||||||
if ( m_wxPeer->MacIsUserPane() && [event type] == NSKeyDown)
|
if ( m_wxPeer->MacIsUserPane() && [event type] == NSKeyDown)
|
||||||
{
|
{
|
||||||
if ( !result )
|
if ( !result )
|
||||||
|
{
|
||||||
|
if ( wxevent.GetKeyCode() < WXK_SPACE || wxevent.GetKeyCode() == WXK_DELETE || wxevent.GetKeyCode() >= WXK_START )
|
||||||
|
{
|
||||||
|
// eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars
|
||||||
|
wxKeyEvent wxevent2(wxevent) ;
|
||||||
|
wxevent2.SetEventType(wxEVT_CHAR);
|
||||||
|
GetWXPeer()->OSXHandleKeyEvent(wxevent2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
||||||
[[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
|
[[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||||
else
|
else
|
||||||
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
|
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||||
|
}
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user