GNOME Bugzilla – Bug 760891
GtkTreeView Cannot expand/collapse rows by mouse
Last modified: 2016-01-27 16:52:46 UTC
Created attachment 319442 [details] [review] Patch to fix Sometimes it is unable to expand/collapse rows by mouse until some mouse movement. To reproduce: 1) Open gtk3-demo, expand a row (for example CSS Theming) and select it 2) Move mouse over the "arrow" on the next collapsed row (Entry). DON'T MOVE MOUSE SINCE THEN 3) Press keyboard shortcuts "-" then "+" to collapse "CSS Theming" 4) Now mouse click (without any move) won't expand "Entry" row. If there is some movement of mouse - TreeView expands a row pointed by cursor. I attach a patch to fix this. The idea is to update arrow_prelit flag on each mouse click before considering status of the flag.
Review of attachment 319442 [details] [review]: looks good
Review of attachment 319442 [details] [review]: Carlos has a different fix for this
Yeah, seems better to do this after revalidating rows so the prelight row is updated ASAP, instead of late on motion/button press. I'm attaching/pushing the patch I did.
Created attachment 319568 [details] [review] GtkTreeView: Update prelight row after revalidating rows It might have changed (eg. after a row being expanded, and the child rows revalidated), so just update it here based on the last pointer position. Based on a patch by Maxim Reznik <reznikmm@gmail.com>
Attachment 319568 [details] pushed as f32a54f - GtkTreeView: Update prelight row after revalidating rows
Thanks! I confirm that it works fine for me.