diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2008-10-02 20:15:01 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-10-02 20:15:01 +0800 |
commit | 624fcc1ac58ba932ea4d3418c4c79bdf991c4a18 (patch) | |
tree | e09c0e2794ad6c8e5b611cebeb4fad67d5bcbd06 | |
parent | 4d9df1bea69f7d943565fbb4bb290fa08eeca821 (diff) | |
download | ibus-624fcc1ac58ba932ea4d3418c4c79bdf991c4a18.tar.gz ibus-624fcc1ac58ba932ea4d3418c4c79bdf991c4a18.tar.xz ibus-624fcc1ac58ba932ea4d3418c4c79bdf991c4a18.zip |
Fix problem in gtk im module.
-rw-r--r-- | client/gtk2/ibusimcontext.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c index 42d157d..a48f497 100644 --- a/client/gtk2/ibusimcontext.c +++ b/client/gtk2/ibusimcontext.c @@ -616,11 +616,17 @@ _client_update_preedit_cb (IBusIMClient *client, const gchar *ic, const gchar *s pango_attr = pango_attr_underline_new (attr->value); break; case IBUS_ATTR_TYPE_FOREGROUND: - pango_attr = pango_attr_foreground_new ((attr->value & 0xff0000) >> 8, - (attr->value & 0x00ff00), (attr->value & 0x0000ff) << 8); + pango_attr = pango_attr_foreground_new ( + ((attr->value & 0xff0000) >> 8) | 0xff, + ((attr->value & 0x00ff00)) | 0xff, + ((attr->value & 0x0000ff) << 8) | 0xff); + break; case IBUS_ATTR_TYPE_BACKGROUND: - pango_attr = pango_attr_background_new ((attr->value & 0xff0000) >> 8, - (attr->value & 0x00ff00), (attr->value & 0x0000ff) << 8); + pango_attr = pango_attr_background_new ( + ((attr->value & 0xff0000) >> 8) | 0xff, + ((attr->value & 0x00ff00)) | 0xff, + ((attr->value & 0x0000ff) << 8) | 0xff); + break; default: continue; } |