After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745167 - Candidate window not functioning on overview
Candidate window not functioning on overview
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-02-25 16:26 UTC by Eddy Castillo
Modified: 2015-03-04 14:33 UTC
See Also:
GNOME target: 3.16
GNOME version: ---


Attachments
Writing chinese in overview (771.54 KB, video/webm)
2015-02-25 16:26 UTC, Eddy Castillo
  Details
viewSelector: Don't reset the search entry if it has preedit text (2.97 KB, patch)
2015-02-26 18:34 UTC, Rui Matos
none Details | Review
viewSelector: Don't reset the search entry if it has preedit text (3.16 KB, patch)
2015-03-04 14:16 UTC, Rui Matos
committed Details | Review

Description Eddy Castillo 2015-02-25 16:26:23 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.
Comment 1 Rui Matos 2015-02-26 18:34:24 UTC
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.
Comment 2 Florian Müllner 2015-03-03 19:52:03 UTC
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.
Comment 3 Rui Matos 2015-03-04 14:16:07 UTC
Created attachment 298536 [details] [review]
viewSelector: Don't reset the search entry if it has preedit text

--

All good points, patch updated
Comment 4 Florian Müllner 2015-03-04 14:23:33 UTC
Review of attachment 298536 [details] [review]:

LGTM
Comment 5 Rui Matos 2015-03-04 14:33:35 UTC
Attachment 298536 [details] pushed as b58f08b - viewSelector: Don't reset the search entry if it has preedit text