Fix regression with the previous update. See comment 7 of bug 614867.
This commit is contained in:
parent
d4227873b1
commit
1c23ee29ef
@ -1,59 +1,8 @@
|
|||||||
diff --git a/src/engine.c b/src/engine.c
|
diff --git a/src/engine.c b/src/engine.c
|
||||||
index dcfbe48..85b4baa 100644
|
index dcfbe48..21fae67 100644
|
||||||
--- a/src/engine.c
|
--- a/src/engine.c
|
||||||
+++ b/src/engine.c
|
+++ b/src/engine.c
|
||||||
@@ -9,6 +9,13 @@
|
@@ -254,12 +254,31 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n)
|
||||||
typedef struct _IBusM17NEngine IBusM17NEngine;
|
|
||||||
typedef struct _IBusM17NEngineClass IBusM17NEngineClass;
|
|
||||||
|
|
||||||
+enum IBusM17NFocusState {
|
|
||||||
+ NO_FOCUS,
|
|
||||||
+ GOT_FOCUS,
|
|
||||||
+ HAS_FOCUS,
|
|
||||||
+ LOST_FOCUS
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
struct _IBusM17NEngine {
|
|
||||||
IBusEngine parent;
|
|
||||||
|
|
||||||
@@ -17,6 +24,8 @@ struct _IBusM17NEngine {
|
|
||||||
IBusLookupTable *table;
|
|
||||||
IBusProperty *status_prop;
|
|
||||||
IBusPropList *prop_list;
|
|
||||||
+ enum IBusM17NFocusState focus_state;
|
|
||||||
+ gint cursor_pos;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _IBusM17NEngineClass {
|
|
||||||
@@ -42,7 +51,8 @@ static void ibus_m17n_engine_focus_out (IBusEngine *engine);
|
|
||||||
static void ibus_m17n_engine_reset (IBusEngine *engine);
|
|
||||||
static void ibus_m17n_engine_enable (IBusEngine *engine);
|
|
||||||
static void ibus_m17n_engine_disable (IBusEngine *engine);
|
|
||||||
-static void ibus_engine_set_cursor_location (IBusEngine *engine,
|
|
||||||
+static void ibus_m17n_engine_set_cursor_location
|
|
||||||
+ (IBusEngine *engine,
|
|
||||||
gint x,
|
|
||||||
gint y,
|
|
||||||
gint w,
|
|
||||||
@@ -129,6 +139,8 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
|
|
||||||
engine_class->cursor_down = ibus_m17n_engine_cursor_down;
|
|
||||||
|
|
||||||
engine_class->property_activate = ibus_m17n_engine_property_activate;
|
|
||||||
+
|
|
||||||
+ engine_class->set_cursor_location = ibus_m17n_engine_set_cursor_location;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -152,6 +164,8 @@ ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
|
||||||
m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
|
|
||||||
g_object_ref_sink (m17n->table);
|
|
||||||
m17n->context = NULL;
|
|
||||||
+ m17n->focus_state = NO_FOCUS;
|
|
||||||
+ m17n->cursor_pos = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GObject*
|
|
||||||
@@ -254,12 +268,31 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -85,42 +34,7 @@ index dcfbe48..85b4baa 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
MSymbol
|
MSymbol
|
||||||
@@ -337,6 +370,10 @@ ibus_m17n_engine_process_key (IBusM17NEngine *m17n,
|
@@ -503,14 +522,15 @@ ibus_m17n_engine_update_lookup_table (IBusM17NEngine *m17n)
|
||||||
MText *produced;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
+ /* XXX: mark as the IME just got focus to prevent
|
|
||||||
+ "input-focus-move" being sent as a result of key event. */
|
|
||||||
+ m17n->focus_state = GOT_FOCUS;
|
|
||||||
+
|
|
||||||
retval = minput_filter (m17n->context, key, NULL);
|
|
||||||
|
|
||||||
if (retval) {
|
|
||||||
@@ -387,6 +424,7 @@ ibus_m17n_engine_focus_in (IBusEngine *engine)
|
|
||||||
|
|
||||||
ibus_engine_register_properties (engine, m17n->prop_list);
|
|
||||||
ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-in"));
|
|
||||||
+ m17n->focus_state = GOT_FOCUS;
|
|
||||||
|
|
||||||
parent_class->focus_in (engine);
|
|
||||||
}
|
|
||||||
@@ -397,6 +435,7 @@ ibus_m17n_engine_focus_out (IBusEngine *engine)
|
|
||||||
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
|
|
||||||
|
|
||||||
ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-out"));
|
|
||||||
+ m17n->focus_state = LOST_FOCUS;
|
|
||||||
|
|
||||||
parent_class->focus_out (engine);
|
|
||||||
}
|
|
||||||
@@ -424,6 +463,7 @@ ibus_m17n_engine_disable (IBusEngine *engine)
|
|
||||||
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
|
|
||||||
|
|
||||||
ibus_m17n_engine_focus_out (engine);
|
|
||||||
+ m17n->focus_state = NO_FOCUS;
|
|
||||||
parent_class->disable (engine);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -503,14 +543,15 @@ ibus_m17n_engine_update_lookup_table (IBusM17NEngine *m17n)
|
|
||||||
|
|
||||||
if (mplist_key (group) == Mtext) {
|
if (mplist_key (group) == Mtext) {
|
||||||
MText *mt;
|
MText *mt;
|
||||||
@ -140,44 +54,7 @@ index dcfbe48..85b4baa 100644
|
|||||||
}
|
}
|
||||||
g_free (buf);
|
g_free (buf);
|
||||||
}
|
}
|
||||||
@@ -546,6 +587,36 @@ ibus_m17n_engine_update_lookup_table (IBusM17NEngine *m17n)
|
@@ -565,19 +585,7 @@ ibus_m17n_engine_callback (MInputContext *context,
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
+ibus_m17n_engine_set_cursor_location (IBusEngine *engine,
|
|
||||||
+ gint x,
|
|
||||||
+ gint y,
|
|
||||||
+ gint w,
|
|
||||||
+ gint h)
|
|
||||||
+{
|
|
||||||
+ IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
|
|
||||||
+
|
|
||||||
+ switch (m17n->focus_state) {
|
|
||||||
+ case GOT_FOCUS:
|
|
||||||
+ m17n->focus_state = HAS_FOCUS;
|
|
||||||
+ m17n->cursor_pos = x;
|
|
||||||
+ break;
|
|
||||||
+ case HAS_FOCUS:
|
|
||||||
+ if (m17n->cursor_pos != x) {
|
|
||||||
+ ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-move"));
|
|
||||||
+ }
|
|
||||||
+ m17n->cursor_pos = x;
|
|
||||||
+ break;
|
|
||||||
+ case LOST_FOCUS:
|
|
||||||
+ m17n->focus_state = NO_FOCUS;
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ parent_class->set_cursor_location (engine, x, y, w, h);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
ibus_m17n_engine_callback (MInputContext *context,
|
|
||||||
MSymbol command)
|
|
||||||
{
|
|
||||||
@@ -565,19 +636,7 @@ ibus_m17n_engine_callback (MInputContext *context,
|
|
||||||
ibus_engine_hide_preedit_text ((IBusEngine *)m17n);
|
ibus_engine_hide_preedit_text ((IBusEngine *)m17n);
|
||||||
}
|
}
|
||||||
else if (command == Minput_preedit_draw) {
|
else if (command == Minput_preedit_draw) {
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
diff --git a/src/engine.c b/src/engine.c
|
||||||
--- ibus-m17n-1.3.0.orig/src/engine.c 2010-07-16 15:11:44.037229510 +0900
|
index e5bc115..7eac4f3 100644
|
||||||
+++ ibus-m17n-1.3.0/src/engine.c 2010-07-16 15:10:50.072167078 +0900
|
--- a/src/engine.c
|
||||||
@@ -26,6 +26,8 @@
|
+++ b/src/engine.c
|
||||||
|
@@ -17,6 +17,8 @@ struct _IBusM17NEngine {
|
||||||
|
IBusLookupTable *table;
|
||||||
|
IBusProperty *status_prop;
|
||||||
IBusPropList *prop_list;
|
IBusPropList *prop_list;
|
||||||
enum IBusM17NFocusState focus_state;
|
|
||||||
gint cursor_pos;
|
|
||||||
+ IBusProperty *show_iok_prop;
|
+ IBusProperty *show_iok_prop;
|
||||||
+ gchar *keymap_name;
|
+ gchar *keymap_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _IBusM17NEngineClass {
|
struct _IBusM17NEngineClass {
|
||||||
@@ -146,6 +148,8 @@
|
@@ -134,6 +136,8 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
|
||||||
static void
|
static void
|
||||||
ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||||
{
|
{
|
||||||
@ -19,7 +20,7 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
m17n->status_prop = ibus_property_new ("status",
|
m17n->status_prop = ibus_property_new ("status",
|
||||||
PROP_TYPE_NORMAL,
|
PROP_TYPE_NORMAL,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -157,9 +161,22 @@
|
@@ -145,9 +149,22 @@ ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||||
NULL);
|
NULL);
|
||||||
g_object_ref_sink (m17n->status_prop);
|
g_object_ref_sink (m17n->status_prop);
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
|
|
||||||
m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
|
m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
|
||||||
g_object_ref_sink (m17n->table);
|
g_object_ref_sink (m17n->table);
|
||||||
@@ -176,6 +193,7 @@
|
@@ -162,6 +179,7 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
IBusM17NEngine *m17n;
|
IBusM17NEngine *m17n;
|
||||||
MInputMethod *im;
|
MInputMethod *im;
|
||||||
const gchar *engine_name;
|
const gchar *engine_name;
|
||||||
@ -50,7 +51,7 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
|
|
||||||
m17n = (IBusM17NEngine *) G_OBJECT_CLASS (parent_class)->constructor (type,
|
m17n = (IBusM17NEngine *) G_OBJECT_CLASS (parent_class)->constructor (type,
|
||||||
n_construct_params,
|
n_construct_params,
|
||||||
@@ -183,6 +201,15 @@
|
@@ -169,6 +187,15 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
|
|
||||||
engine_name = ibus_engine_get_name ((IBusEngine *) m17n);
|
engine_name = ibus_engine_get_name ((IBusEngine *) m17n);
|
||||||
g_assert (engine_name);
|
g_assert (engine_name);
|
||||||
@ -66,7 +67,7 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
|
|
||||||
if (im_table == NULL) {
|
if (im_table == NULL) {
|
||||||
im_table = g_hash_table_new_full (g_str_hash,
|
im_table = g_hash_table_new_full (g_str_hash,
|
||||||
@@ -195,12 +222,6 @@
|
@@ -181,12 +208,6 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
if (im == NULL) {
|
if (im == NULL) {
|
||||||
gchar *lang;
|
gchar *lang;
|
||||||
gchar *name;
|
gchar *name;
|
||||||
@ -79,7 +80,7 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
|
|
||||||
lang = strv[1];
|
lang = strv[1];
|
||||||
name = strv[2];
|
name = strv[2];
|
||||||
@@ -225,9 +246,9 @@
|
@@ -211,9 +232,9 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
g_hash_table_insert (im_table, g_strdup (engine_name), im);
|
g_hash_table_insert (im_table, g_strdup (engine_name), im);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +91,7 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
if (im == NULL) {
|
if (im == NULL) {
|
||||||
g_warning ("Can not find m17n keymap %s", engine_name);
|
g_warning ("Can not find m17n keymap %s", engine_name);
|
||||||
g_object_unref (m17n);
|
g_object_unref (m17n);
|
||||||
@@ -254,6 +275,11 @@
|
@@ -240,6 +261,11 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n)
|
||||||
m17n->status_prop = NULL;
|
m17n->status_prop = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,15 +103,15 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
if (m17n->table) {
|
if (m17n->table) {
|
||||||
g_object_unref (m17n->table);
|
g_object_unref (m17n->table);
|
||||||
m17n->table = NULL;
|
m17n->table = NULL;
|
||||||
@@ -423,6 +449,7 @@
|
@@ -405,6 +431,7 @@ ibus_m17n_engine_focus_in (IBusEngine *engine)
|
||||||
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
|
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
|
||||||
|
|
||||||
ibus_engine_register_properties (engine, m17n->prop_list);
|
ibus_engine_register_properties (engine, m17n->prop_list);
|
||||||
+
|
+
|
||||||
ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-in"));
|
ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-in"));
|
||||||
m17n->focus_state = GOT_FOCUS;
|
|
||||||
|
|
||||||
@@ -511,6 +538,23 @@
|
parent_class->focus_in (engine);
|
||||||
|
@@ -490,6 +517,23 @@ ibus_m17n_engine_property_activate (IBusEngine *engine,
|
||||||
const gchar *prop_name,
|
const gchar *prop_name,
|
||||||
guint prop_state)
|
guint prop_state)
|
||||||
{
|
{
|
||||||
@ -134,5 +135,3 @@ diff -ru ibus-m17n-1.3.0.orig/src/engine.c ibus-m17n-1.3.0/src/engine.c
|
|||||||
parent_class->property_activate (engine, prop_name, prop_state);
|
parent_class->property_activate (engine, prop_name, prop_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
Only in ibus-m17n-1.3.0/src: engine.c.orig
|
|
||||||
Only in ibus-m17n-1.3.0/src: engine.c.rej
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: ibus-m17n
|
Name: ibus-m17n
|
||||||
Version: 1.3.0
|
Version: 1.3.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: The M17N engine for IBus platform
|
Summary: The M17N engine for IBus platform
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -54,6 +54,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/ibus/component/*
|
%{_datadir}/ibus/component/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 27 2010 Daiki Ueno <dueno@redhat.com> - 1.3.0-3
|
||||||
|
- Update ibus-m17n-HEAD.patch.
|
||||||
|
- Fix regression with the previous update. See comment 7 of bug 614867.
|
||||||
|
|
||||||
* Fri Jul 16 2010 Daiki Ueno <dueno@redhat.com> - 1.3.0-2
|
* Fri Jul 16 2010 Daiki Ueno <dueno@redhat.com> - 1.3.0-2
|
||||||
- Update ibus-m17n-HEAD.patch.
|
- Update ibus-m17n-HEAD.patch.
|
||||||
- Fix bug 614867 - Invisible pre-edit buffer when using m17n Wijesekera keyboard layout
|
- Fix bug 614867 - Invisible pre-edit buffer when using m17n Wijesekera keyboard layout
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
ibus-m17n-0_1_0_20080810-1_fc9:HEAD:ibus-m17n-0.1.0.20080810-1.fc9.src.rpm:1218368743
|
ibus-m17n-0_1_0_20080810-1_fc9:HEAD:ibus-m17n-0.1.0.20080810-1.fc9.src.rpm:1218368743
|
||||||
ibus-m17n-1_3_0-2_fc13:HEAD:ibus-m17n-1.3.0-2.fc13.src.rpm:1279260865
|
ibus-m17n-1_3_0-2_fc13:HEAD:ibus-m17n-1.3.0-2.fc13.src.rpm:1279260865
|
||||||
|
ibus-m17n-1_3_0-3_fc13:HEAD:ibus-m17n-1.3.0-3.fc13.src.rpm:1280215110
|
||||||
|
Loading…
Reference in New Issue
Block a user