GNOME Bugzilla – Bug 771724
Incorrect placement of the input source candidate popup
Last modified: 2021-07-05 14:11:43 UTC
Created attachment 335933 [details] Showing the issue I've been able to reproduce this issue with ibus-cangjie, but it probably happens with other ibus engines. See the screenshot. All I did was move the input cursor close to the bottom edge of the screen (I did that by moving the window, but the same happens if you're just typing a long enough text). The candidate popup should be placed above the input cursor, instead of being below it, so that it is entirely visible.
Note that this is with Xorg. I have no idea whether this works well in Wayland. Also: gnome-shell-3.20.4-1.fc24.x86_64
Created attachment 336072 [details] [review] refreshing display each time the list of candidate is built. I think updating visibility of the box when the list of candidate is found fix the problem.
Created attachment 336077 [details] [review] bug 771724: updating visibility of the box when the list of candidate is found
Review of attachment 336077 [details] [review]: Thanks, you are definitively on the right track here. Please provide a proper commit message though, see https://wiki.gnome.org/Newcomers/CodeContributionWorkflow#Commit_guidelines (or http://chris.beams.io/posts/git-commit/ for a more detailed read) ::: js/ui/ibusCandidatePopup.js @@ +242,3 @@ this._candidateArea.setOrientation(lookupTable.get_orientation()); this._candidateArea.updateButtons(lookupTable.is_round(), page, nPages); + this._updateVisibility(); Calling this twice in the same function is icky, and an innocent looking micro-optimization like if (isVisible == this._boxPointer.actor.visible) return; // nothing to do in _updateVisibility() would bring back this issue again. Better move the first two lines to the end - setting up the popup before showing it makes more sense anyway, and addresses the issue that the popup only checks whether it needs to flip when positioned, but not on size changes.
Created attachment 336156 [details] [review] Update candidate popup visibility later This fix bug 771724 where the candidate popup window could end up ill placed if the cursor was located near the bottom end of the screen. The pop up is now set to visible only after the candidate table has been populated. This way it is possible to know the height of the pop up and display it above the cursor, instead of below when there s no room enough to display all the list the default way.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.