[gtk-osx] Add the patch fixing dissappearing input.



commit a355e8351f3e5cf322f02fda7c5a5644561d91e9
Author: John Ralls <jralls ceridwen us>
Date:   Fri Aug 11 10:55:00 2017 +0300

    Add the patch fixing dissappearing input.
    
    Plus a comment about when the patch expires.

 modulesets-stable/gtk-osx.modules                 |    1 +
 patches/gtk+-3-imquartz-dissappearing-input.patch |   39 +++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/modulesets-stable/gtk-osx.modules b/modulesets-stable/gtk-osx.modules
index 4681dd8..1c7fc50 100644
--- a/modulesets-stable/gtk-osx.modules
+++ b/modulesets-stable/gtk-osx.modules
@@ -193,6 +193,7 @@
     <branch module="gtk+/3.22/gtk+-3.22.12.tar.xz" version="3.22.12"
             hash="sha256:84fae0cefb6a11ee2b4e86b8ac42fe46a3d30b4ad16661d5fc51e8ae03e2a98c">
       <patch 
file="https://git.gnome.org/browse/gtk-osx/plain/patches/0001-Bug-781118-gtk-3.22.12-quartz-backend-s.patch"; 
strip="1"/>
+      <!-- The following patch was committed to gtk-3-22 after 3.22.18 and can be removed when 3.22.19 or 
later is used in the moduleset. -->
       <patch 
file="https://git.gnome.org/browse/gtk-osx/plain/patches/gtk+-3-imquartz-dissapearing-input.patch"; strip="1"/>
     </branch>
     <dependencies>
diff --git a/patches/gtk+-3-imquartz-dissappearing-input.patch 
b/patches/gtk+-3-imquartz-dissappearing-input.patch
new file mode 100644
index 0000000..fe52648
--- /dev/null
+++ b/patches/gtk+-3-imquartz-dissappearing-input.patch
@@ -0,0 +1,39 @@
+From d09bd2e2d3610a82d2c07c1de242a713afc2f67e Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls ceridwen us>
+Date: Tue, 8 Aug 2017 23:15:46 +0300
+Subject: [PATCH] Duplicate the TIC strings before NULLing the GObject data.
+
+NULLing the data strings in GObject frees and invalidates the pointers
+returned by g_object_get_data so we need our own copy of the values.
+---
+ modules/input/imquartz.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/modules/input/imquartz.c b/modules/input/imquartz.c
+index 508ecf895f..46ceafe194 100644
+--- a/modules/input/imquartz.c
++++ b/modules/input/imquartz.c
+@@ -131,8 +131,8 @@ output_result (GtkIMContext *context,
+   gboolean retval = FALSE;
+   gchar *fixed_str, *marked_str;
+ 
+-  fixed_str = g_object_get_data (G_OBJECT (win), TIC_INSERT_TEXT);
+-  marked_str = g_object_get_data (G_OBJECT (win), TIC_MARKED_TEXT);
++  fixed_str = g_strdup (g_object_get_data (G_OBJECT (win), TIC_INSERT_TEXT));
++  marked_str = g_strdup (g_object_get_data (G_OBJECT (win), TIC_MARKED_TEXT));
+   if (fixed_str)
+     {
+       GTK_NOTE (MISC, g_print ("tic-insert-text: %s\n", fixed_str));
+@@ -171,7 +171,8 @@ output_result (GtkIMContext *context,
+       if (qc->preedit_str && strlen (qc->preedit_str) > 0)
+         retval = TRUE;
+     }
+-
++  g_free (fixed_str);
++  g_free (marked_str);
+   return retval;
+ }
+ 
+-- 
+2.11.0 (Apple Git-81)
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]