Say I have two columns of files on my desktop. Say coordinates are (row, column). Issue I: 1. Select (via mouse's rectangle) file at (1, 2). 2. Press <Down>. 3. Expected: selected file at (2, 2). Actual: selected file at (1, 1). Issue 2: 1. Select (via mouse's rectangle) a file. 2. Press <Down> multiple to get right bottom file. 3. Press <Down>. 4. Expected: selected the same file or file at (1, 1). Actual: selected file at (1, 2). Thanks.
Thanks for reporting, I can reproduce the bug. Further observations: - The bug only shows when the selection is done via mouse rectangle (aka rubberband). When the selection is done via "click", everything is fine. - Only the first up/down/left/right key behaves wrong ... all later up/down/left/right are correct - It looks like after a rubberband selection, the file used for keyboard navigation is still the old one, which was selected before, niot the actually selected one.
presumption: "exo-icon-view.c:exo_icon_view_set_cursor_item" only is called when a file is clicked, it's not called when rubberband is used for selection.
I assume exo_icon_view_set_cursor or exo_icon_view_set_cursor_item should be called either in "exo_icon_view_update_rubberband_selection" or in "exo_icon_view_stop_rubberbanding". So far I failed to figure out where to find the correct cell to pass .. please feel free to continue the debugging, I will not have much time for it in the next days.
*** Bug 16306 has been marked as a duplicate of this bug. ***
Created attachment 9626 quick diff How about this?
(In reply to Theo Linkspfeifer from comment #5) > Created attachment 9626 > quick diff > > How about this? Looks very good to me, thanks Theo! I tried to move it up, inside the other if(..), to save some CPU cycles, but than some border-cases are not correct (e.g. when first opening a bigger rubberband, but than make it smaller) If ok for you, I would ask Sean for his ok & push the patch as it is.
I tried to look for an optimized variant, but then just went with this simple code instead.
Sorry. row == 0 and col == 0 ever?
(In reply to Alexander Kurakin from comment #8) > Sorry. row == 0 and col == 0 ever? Haha, cant belive I did not see that one. Yes, looks like "row" and "col" are always 0. Thanks Alex ! @Theo Possibly some optimizsation is missing? It works nicely .. should we just check against 0, and drop the variables?
My bad. That check can be removed.
Created attachment 9632 patch Ok like this ?
Yes.
Theo Linkspfeifer referenced this bugreport in commit dba8f1478251119974b5849e3f93730fded5d090 Wrong keyboard navigation after using rubberband in exo-icon-view (Bug #16286) https://git.xfce.org/xfce/exo/commit?id=dba8f1478251119974b5849e3f93730fded5d090
pushed to master. Thanks alot for the patch Theo !