Don't request touch event generation for all windows by default, this
has an inherent overhead and is not needed for 99% of the application
windows, so require calling EnableTouchEvents() explicitly to do it
instead.
Note that this requires properly initializing gesture recognizers in
wxOSX now that they're not always allocated, otherwise releasing them
when destroying the window would crash.
Take NSView* in the callback used by [NSView sortSubviewsUsingFunction:context:]
only when using 10.12 SDK, but not when using earlier ones, as the callback
was still taking just "id" in them.
Don't call makeFirstResponder:nil from windowDidResignKey: because it's
not a native behavior and subtly breaks some things (e.g. paste managers
or keyboard switched under some settings).
This was done to provide the illusion of Windows-like focus behavior
when a TLW is deactivated. macOS separates the concept of active ("key")
window and focus ("first responder") within it and it's possible and
normal to have the latter assigned even in inactive (non-key) windows.
wxOSX reset the responder to trigger wxEVT_KILL_FOCUS.
Instead, keep the first responder untouched and only run wx-side code to
handle focus lost as well as focus set in windowDidBecomeKey: This would
preserve behavior compatibility with other ports, while also playing
nice with macOS.
Disabled controls are not supposed to accept any input, so don't send any
mouse events to them.
This fixes the behaviour of wxSlider which could be moved (and generated the
corresponding events) even when it was disabled.
Closes#17194.
Change the animation delay from ridiculously long (half a second) to
somewhat more reasonable 200ms to bring it in line with Windows per the
comment in this code. Feels more similar to native macOS animations now
too.
Fix numerous focus-handling bugs in wxOSX in combination with
NSScrollView (which cannot get focus by itself and which was already
treated specially in many, but not all, places), including
- inability to set the focus
- loss of wxEVT_SET_FOCUS events
- loss of wxWindow<->NSView association after clearing wxDVC columns
The drag mask passed by Cocoa is conservative and doesn't include
NSDragOperationMove which was added later. Override
draggingSourceOperationMaskForLocal to include that flag if it's wanted.
This also moving of text the default behaviour.
Closes#13819.
Closes#14726.
Commit f40e8bf uncovered a problem with dragging where when the
NSDragOperationLink bit is set in the drag mask (which by default always
is the case) the result is a wxDragLink operation instead of wxDragCopy
or wxDragMove. To fix this give priority to move and copy instead when
converting the drag mask to a wxDrag result.
This fixes copying through DND in wxRichTextCtrl.
See #13819.
To reduce duplication of the same changes, merge the nearly identical
wxWidgetCocoaImpl::draggingEntered and draggingUpdated into private
function wxOnDraggingEnteredOrUpdated.
Since [NSString characterAtIndex:] return UTF-16 values, it can't be used as a
"character", convert the entire NSString to wxString and iterate over it to
obtain the real characters that should be sent in wxEVT_CHAR events.
Closes#16979.
A window with wxFRAME_SHAPED style can still not defined any valid shape
actually, in which case wxFRAME_SHAPED should be just ignored.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775