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 646019 - best-match app has its selection highlight redrawn on every keypress
best-match app has its selection highlight redrawn on every keypress
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: GnomeShell301
 
 
Reported: 2011-03-28 22:32 UTC by Gabriel Burt
Modified: 2011-04-15 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Select the item before its rendered to avoid the flicker/redraw (2.83 KB, patch)
2011-04-08 01:00 UTC, Gabriel Burt
needs-work Details | Review
Updated patch which doesn't regress Enter-activates behavior (2.91 KB, patch)
2011-04-08 01:23 UTC, Gabriel Burt
none Details | Review
search-results: Fix flickering of the selection (1.74 KB, patch)
2011-04-08 14:58 UTC, Florian Müllner
reviewed Details | Review
search-results: Fix flickering of the selection (1.73 KB, patch)
2011-04-13 22:45 UTC, Florian Müllner
committed Details | Review

Description Gabriel Burt 2011-03-28 22:32:07 UTC
If the best-match app doesn't change because of the new keypress, its selection highlight shouldn't be redrawn, to avoid it flickering.
Comment 1 Gabriel Burt 2011-04-08 01:00:39 UTC
Created attachment 185489 [details] [review]
Select the item before its rendered to avoid the flicker/redraw
Comment 2 Gabriel Burt 2011-04-08 01:10:35 UTC
Comment on attachment 185489 [details] [review]
Select the item before its rendered to avoid the flicker/redraw

Ok, realizing this isn't a good patch - doesn't set the _selectedProvider or selectedIndex properly.
Comment 3 Gabriel Burt 2011-04-08 01:23:58 UTC
Created attachment 185491 [details] [review]
Updated patch which doesn't regress Enter-activates behavior
Comment 4 Florian Müllner 2011-04-08 14:58:22 UTC
(In reply to comment #3)
> Created an attachment (id=185491) [details] [review]
> Updated patch which doesn't regress Enter-activates behavior

The patch works, but the approach of propagating the initial selection is a bit ugly ...
I'll propose an alternative approach which should work equally well, while being simpler and less intrusive.
Comment 5 Florian Müllner 2011-04-08 14:58:45 UTC
Created attachment 185531 [details] [review]
search-results: Fix flickering of the selection

When updating search results, the current result set is
recreated from scratch before setting the selection
highlight. This results in two style changes of the selected
item (the first one when mapped, the second one when setting
the selection), which causes flickering if the selected item
remains the same as with the previous search term.
Fix by hiding the result set until the selection is set, so
that the style of each item changes only once when mapped.
Comment 6 Owen Taylor 2011-04-13 22:16:53 UTC
I basically don't understand why there is a return to the main loop that would allow painting in the unselected state - it doesn't matter what order we do things as long as we don't do some stuff, return to the main loop, then do some more stuff.
Comment 7 Owen Taylor 2011-04-13 22:32:42 UTC
Review of attachment 185531 [details] [review]:

I think the code here is fine, but the comment and commit message are pretty unclear - the fact that hiding unmapping actors prevents triggering a CSS transition is completely unobvious.
Comment 8 Florian Müllner 2011-04-13 22:33:22 UTC
(In reply to comment #6)
> I basically don't understand why there is a return to the main loop that would
> allow painting in the unselected state - it doesn't matter what order we do
> things as long as we don't do some stuff, return to the main loop, then do some
> more stuff.

As mentioned on IRC, the problem here is that we do a transition from unselected->selected, and we are not smart enough to determine that the unselected style hasn't been actually painted.

(So presumably the remaining patch in bug 627083 would fix the problem as well).
Comment 9 Florian Müllner 2011-04-13 22:35:00 UTC
(In reply to comment #7)
> Review of attachment 185531 [details] [review]:
> 
> I think the code here is fine, but the comment and commit message are pretty
> unclear - the fact that hiding unmapping actors prevents triggering a CSS
> transition is completely unobvious.

Yeah, my bad - I only investigated the actual reason today :(
Comment 10 Florian Müllner 2011-04-13 22:45:37 UTC
Created attachment 185915 [details] [review]
search-results: Fix flickering of the selection

Updated comment and commit message.
Comment 11 Owen Taylor 2011-04-15 17:33:14 UTC
Review of attachment 185915 [details] [review]:

Looks good
Comment 12 Florian Müllner 2011-04-15 17:35:04 UTC
Attachment 185915 [details] pushed as f0622c1 - search-results: Fix flickering of the selection