Replace NSInputManager for MacOS 10.6 and later.
This commit is contained in:
parent
08b871fa51
commit
85f52dceaa
@ -17,6 +17,7 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <AvailabilityMacros.h>
|
||||
#include "config.h"
|
||||
#import "GdkQuartzView.h"
|
||||
#include "gdkquartzwindow.h"
|
||||
@ -201,8 +202,12 @@
|
||||
/* discard invalid text input with Chinese input methods */
|
||||
str = "";
|
||||
[self unmarkText];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
|
||||
[currentInputManager markedTextAbandoned:self];
|
||||
#else
|
||||
[[NSTextInputContext currentInputContext] discardMarkedText];
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user