[gtk+/gtk-2-24] Bug 701332 - Patch for minor glitch in NSTextInput
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Bug 701332 - Patch for minor glitch in NSTextInput
- Date: Sat, 27 Jul 2013 21:06:08 +0000 (UTC)
commit 43ed68aa33b8e5efde01f7ef10d081b979cd451f
Author: Ek Kato <ek kato gmail com>
Date: Sat Jul 27 13:55:39 2013 -0700
Bug 701332 - Patch for minor glitch in NSTextInput
gdk/quartz/GdkQuartzView.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index f9ad706..7f0ec40 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -125,14 +125,20 @@
-(void)unmarkText
{
GDK_NOTE (EVENTS, g_print ("unmarkText\n"));
+ gchar *prev_str;
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
+
+ prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT);
+ if (prev_str)
+ g_free (prev_str);
+ g_object_set_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL);
}
-(void)setMarkedText: (id)aString selectedRange: (NSRange)newSelection replacementRange:
(NSRange)replacementRange
{
GDK_NOTE (EVENTS, g_print ("setMarkedText\n"));
const char *str;
- char *prev_str;
+ gchar *prev_str;
if (replacementRange.location == NSNotFound)
{
@@ -176,7 +182,7 @@
{
GDK_NOTE (EVENTS, g_print ("insertText\n"));
const char *str;
- char *prev_str;
+ gchar *prev_str;
if ([self hasMarkedText])
[self unmarkText];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]