GNOME Bugzilla – Bug 745167
Candidate window not functioning on overview
Last modified: 2015-03-04 14:33:40 UTC
Created attachment 297896 [details] Writing chinese in overview When writing in overview with ibus, the candidate window does not react to any click on any element inside, it only closes the window. To reproduce: 1. Setup an input source that requires the candidate window, e.g. Chinese pinyin. 2. Open overview. 3. Start writing, e.g. zhong. 4. Click on any element of the candidate window. Actual results: The window closes. Expected results: Trigger an action according to the button/word or other element that is clicked.
Created attachment 298019 [details] [review] viewSelector: Don't reset the search entry if it has preedit text If users click outside the search entry while it's empty we reset and thus give up key focus. This means that when using an input method with candidate popups, interacting with the popup with a mouse click cancels the current input method context if there's no other text in the entry besides the preedit string. To avoid this we can check if the entry has preedit in addition to checking if it has normal text.
Review of attachment 298019 [details] [review]: ::: src/st/st-im-text.c @@ +638,3 @@ + g_return_val_if_fail (ST_IS_IM_TEXT (imtext), FALSE); + + gtk_im_context_get_preedit_string (imtext->priv->im_context, We are already connected to GtkIMContext::preedit-changed, is it worth keeping track of preedit there so we don't have to alloc+free here? @@ +641,3 @@ + &preedit_str, + NULL, NULL); + has_preedit = preedit_str ? preedit_str[0] != '\0' : FALSE; Personally I like the has_preedit = preedit_str && *preedit_str; idiom, though I guess it's harder to read if you're not familiar with it.
Created attachment 298536 [details] [review] viewSelector: Don't reset the search entry if it has preedit text -- All good points, patch updated
Review of attachment 298536 [details] [review]: LGTM
Attachment 298536 [details] pushed as b58f08b - viewSelector: Don't reset the search entry if it has preedit text