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