! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
tree view jumps (scrolls) when clicking on a directory
Status:
RESOLVED: FIXED

Comments

Description rich.trefz 2019-03-05 22:11:22 CET
This happened in v1.8.3

I click on an item and the tree view scrolls so the item is out of the viewport.

What seems to happen is: if I have a directory structure like
 
/a
  /b
    /c
      /d
        /e

the tree view seems to be trying to keep /a in the view, even tho I click on "e".  For this to happen, there needs to be enough "distance" between a and e that they don't both fit on the visible area.
Comment 1 Andre Miranda editbugs 2019-03-06 19:49:44 CET
Created attachment 8324 
thunar-tree-view.gif

I can't reproduce with 1.8.4, see the attached gif.
Am I missing something?

Commands to create the folders and open the last one:
mkdir -p a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/x/y/w/z
thunar a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/x/y/w/z
Comment 2 rich.trefz 2019-03-06 20:10:59 CET
In your example, if I selected folder "z" and made sure the tree view was scrolled so I could see "z", then I clicked on "w", it would select "w", but then scroll so "a" was visible, and "w" was out of view.

If you don't see that, I'll try to make a little video or gif.

Thanks for responding
Comment 3 rich.trefz 2019-03-07 05:36:49 CET
Created attachment 8327 
little script to make the test directories
Comment 4 rich.trefz 2019-03-07 05:40:19 CET
https://drive.google.com/open?id=1npuDNiNrnU0BoF9wYsUCeigMj9Bywyz8

video showing what I see
Comment 5 alexxcons editbugs 2019-03-08 22:54:55 CET
Ok, I see, I can reproduce the problem. Thanks for reporting !

I think the "auto scroll" should not be used at all, if any item in the tree is clicked.

IMO auto-scroll on the tree only should be used if the right-side folder changes.
Comment 6 Massimo Burcheri 2019-03-14 08:34:40 CET
*** Bug 15194 has been marked as a duplicate of this bug. ***
Comment 7 alexxcons editbugs 2019-03-16 23:10:41 CET
Created attachment 8339 
patch fixing the bug

It seems like "gtk_tree_view_set_cursor" should not be executed with high frequency.

The attached patch fixes the problem by always stroring the latest path and only execute "gtk_tree_view_set_cursor" once.

Please take a try for the patch and let me know if it fixes the problem for you / if there possibly are any side-effects.
Comment 8 Andre Miranda editbugs 2019-03-17 18:36:34 CET
(In reply to alexxcons from comment #7)
> Created attachment 8339 
> patch fixing the bug
error: corrupt patch at line 48

After copying and pasting, the patch seems to fix the issue.
Comment 9 alexxcons editbugs 2019-03-17 21:07:00 CET
Thanks for testing !

 > error: corrupt patch at line 48
Meh .. just found out that I can create patches via eclipse .. seems like I should better keep using the git format-patch in the console :)
Comment 10 Git Bot editbugs 2019-03-18 23:03:20 CET
Alexander Schwinn referenced this bugreport in commit 0735e5bb8dd3b8fbac13f1b4165e30e27cea643f

tree view jumps (scrolls) when clicking on a directory (Bug #15174)

https://git.xfce.org/xfce/thunar/commit?id=0735e5bb8dd3b8fbac13f1b4165e30e27cea643f
Comment 11 Git Bot editbugs 2019-03-18 23:09:21 CET
Alexander Schwinn referenced this bugreport in commit c0d13b6a806cd25c43fe75aadf7936417a0109b8

tree view jumps (scrolls) when clicking on a directory (Bug #15174)

https://git.xfce.org/xfce/thunar/commit?id=c0d13b6a806cd25c43fe75aadf7936417a0109b8
Comment 12 Git Bot editbugs 2019-03-18 23:17:14 CET
Alexander Schwinn referenced this bugreport in commit 99c08e8ba9216d9f7e330d68168b0d8f047ac426

tree view jumps (scrolls) when clicking on a directory (Bug #15174)

https://git.xfce.org/xfce/thunar/commit?id=99c08e8ba9216d9f7e330d68168b0d8f047ac426
Comment 13 alexxcons editbugs 2019-03-18 23:19:58 CET
Fixed for master , 4.14 and 4.12 branch. To be released in 1.8.5 and 1.6.17
Comment 14 rich.trefz 2019-03-19 02:49:06 CET
https://drive.google.com/open?id=1jsmOdu7tok0igUuX3vDdxiba7SsKwm1E

Still seeing some weirdness
I click down the tree as shown, when I get to zzzzzz it jumped back to xxxxxx - always
Comment 15 alexxcons editbugs 2019-03-19 09:48:16 CET
meh ... should have used your example for testing instead of my own.   Will have another look at it when I have time
Comment 16 alexxcons editbugs 2019-03-19 21:36:58 CET
Sorry, I cannot reproduce this extra-weirdness .. you are sure you are using thunar compiled from master / 4.14 branch ?   You need to quit the system-thunar daemon .. best use ./thunar -q;./thunar  to do so.
Comment 17 rich.trefz 2019-03-20 02:07:31 CET
I grabbed the master from https://github.com/xfce-mirror/thunar
I saw the 0735e5b commit and the change seemed to be in there
So I should use https://github.com/xfce-mirror/thunar/tree/xfce-4.14 ?
Comment 18 alexxcons editbugs 2019-03-20 21:46:01 CET
Both, master and 4.14 branch are fine, I patched both.

I just wanted to make sure that you quit the currently running thunar daemon for testing. Because if an old thunar daemon is running in the background, you cannot start the newly build thunar. ( Instead the old daemon will spawn a window)
Comment 19 rich.trefz 2019-03-20 22:13:04 CET
Created attachment 8346 
build error message

Yes, I've been doing thunar --quit.

I do have a little trouble with build, but at the examples and plugins stage.  Do you know how to fix this.  I think the plugins problem is the same.
Comment 20 alexxcons editbugs 2019-03-20 22:28:36 CET
Not sure which build commands you used, and why you have " thunar-1.8.2" stuff there.. looks suspicious. Here what should work:
git clone https://git.xfce.org/xfce/thunar
cd thunar
./autogen.sh
<at this stage you will need to install missing development packages, until autogen.sh runs fine>
make

to run it from source:
cd thuner
./thunar -q;./thunar

... and if you want to install it:
sudo make install
Comment 21 rich.trefz 2019-03-21 02:43:15 CET
1.8.2 is there simply because I was rebuilding 1.8.2 as it doesn't have this scroll issue
Comment 22 alexxcons editbugs 2019-03-22 11:28:45 CET
So can you please take a try with master (or the 4.14 branch), using the steps above ?
Comment 23 rich.trefz 2019-03-25 13:48:00 CET
That is what I did to make the video in https://bugzilla.xfce.org/show_bug.cgi?id=15174#c14
As mentioned, I do have trouble with the build when I get to examples/plugins, that I can't figure out.  But I don't think that affects the thunar behaviour in question.

The autogen seems OK

Build Configuration:

* GIO UNIX features:                  yes
* GUDev (required for thunar-volman): yes
* Mount notification support:         yes
* Debug Support:                      yes
* GObject Instrospection support:     yes

Additional Plugins:

* Advanced Properties:                yes
* Simple Builtin Renamers:            yes
* Trash Panel Applet:                 yes
* User Customizable Actions:          yes
* Wallpaper support:                  yes


I don't know how to go any further at this point.
Comment 24 alexxcons editbugs 2019-04-22 23:19:20 CEST
*** Bug 15313 has been marked as a duplicate of this bug. ***
Comment 25 Theo Linkspfeifer editbugs 2019-04-23 13:50:39 CEST
The fix introduced a new bug. Selecting the "Desktop" or "Trash" entries in the tree view will prevent further selections with the mouse cursor.
Comment 26 John 2019-04-23 14:07:26 CEST
Mukundan has posted some builds for f29 and f30 which fix this awful bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1701829

for F29 - https://koji.fedoraproject.org/koji/taskinfo?taskID=34349581
for F30 - https://koji.fedoraproject.org/koji/taskinfo?taskID=34349616

For anyone who has a little trouble finding where the packages are, like i did, if you click on the descendants/build link for your arch, you'll be taken to the goodies.

And for anyone else trying to reproduce this bug, eg on the buggy 1.8.4-1.f29, just:
  1) make sure you expand a bunch of folders so they don't fit in the tree/folder pane, and a scrollbar appears
  2) scroll down in the tree view. you wont see te bug if yo u let excess folders go off the bottom of the pane while the top is still viewing the parent of the subfolders you're clicking on
  3) to see it at its worst, make sure you have a folder with many subfolders in it, and scroll down so the parent folder is not visible in the tree.
  4) select a folder, and watch i  horror as the whole tree view scrolls up to bring the parent closer into view, whilst the folder you selected goes down, and maybe off the bottom of the screen even.

Pls ensure the fix gets upstreamed ASAP!!

If i never see this bug again, i will be extremely grateful.

I am often a bastard in these bugzillas, because many devs don't seem to give a crap. 
They want to produce shiny garbage and don't care if noone can actually use it.
I've seen first hand in many bugzillas that xfce devs are different, they know they're working on a product people actually use, and they strive to produce a product that lets people get the job done.

So, thank you to all xfce devs, you are effing awsm, pls keep up the good works!
Comment 27 John 2019-04-23 14:13:22 CEST
(In reply to Theo Linkspfeifer from comment #25)
> The fix introduced a new bug. Selecting the "Desktop" or "Trash" entries in
> the tree view will prevent further selections with the mouse cursor.

Theo is right. Damn.

With the packages built by Mukundan, Desktop is ok. I can click on that, and it seems ok.
But if i click on Trash, it's game over, i can't select anything else :-(

Nevertheless, you guys must be very close to fixing this, so, I salute you, and will eagerly await a solid fix.
Comment 28 alexxcons editbugs 2019-04-23 14:41:47 CEST
> The fix introduced a new bug. Selecting the "Desktop" or "Trash" entries in
> the tree view will prevent further selections with the mouse cursor.
This one I can reproduce. For Johns reproducer I have to try later ... will see what I can do about it.

@John Well, sometime it is like that, fix one thing, something else breaks :[
Comment 29 alexxcons editbugs 2019-04-24 22:11:39 CEST
Created attachment 8454 
patch II

Ok, I completly reworked & further simplified this goddam complex method.

Now it looks like the bug is fixed:

- I tried to make it fail with both reproducers mentioned here .. seems to be fine now.
- Trash & Desktop can be accessed.
- It is still possible to open a folde when it's parent has no read permission (Bug #14900)

Please all of you, take a try for this patch (apply it on master!) and let me know if you can still see any wired behaviour !
Comment 30 Theo Linkspfeifer editbugs 2019-04-24 23:36:16 CEST
With that patch everything seems to work properly now. Good job!
Comment 31 John 2019-04-27 07:57:23 CEST
I just tried the new package built by Mukundan over on:
  https://bugzilla.redhat.com/show_bug.cgi?id=1701829

I have not tried Alex's new patch as I am not buildign from source but if Mukundan is using Alex's new patch, i think there is still one problem.

The new package does fix the original scrolling issue, and also the Trash bug.
But now, when i click on a folder in the tree view, it gets expanded in the tree view, if it has subfolders.

That never used to happen before.
Before, when you select a folder in the tree view, it opens in the details pane on the right, but the subfolders do NOT get expanded in the tree view.

To expand a folder in the tree view, you had to click the arrow to the left of folder, which is how it should stay!

If we can stop the tree view expanding when you click on a folder (which has subfolders) then things will be perfect.

Many thanks!
Comment 32 alexxcons editbugs 2019-04-27 10:16:32 CEST
Thanks alot , for testing !
> But now, when i click on a folder in the tree view, it gets expanded in the tree view, if it has subfolders.
> That never used to happen before.
I just took a try with thunar from the 4.12 branch .. this behavior actually worked in the old 4.12 thunar .. it just stoppen to worked after some of my tree-view fixes ;)

IMO the auto-expand is nice. Removing it may not please other users. Please open a separate bug where we can discuss on that. ( Possibly we could add a xfconf setting to enable/disable it).
Comment 33 Git Bot editbugs 2019-04-29 00:12:00 CEST
Alexander Schwinn referenced this bugreport in commit 25276cb404ce8a9961f00f5110f24b1e378908fc

tree view jumps (scrolls) when clicking on a directory II (Bug #15174)

https://git.xfce.org/xfce/thunar/commit?id=25276cb404ce8a9961f00f5110f24b1e378908fc
Comment 34 Git Bot editbugs 2019-04-29 00:18:54 CEST
Alexander Schwinn referenced this bugreport in commit d8befdca1d8f4f148c33c8ed8b11a49804c79344

tree view jumps (scrolls) when clicking on a directory II (Bug #15174)

https://git.xfce.org/xfce/thunar/commit?id=d8befdca1d8f4f148c33c8ed8b11a49804c79344
Comment 35 Git Bot editbugs 2019-04-29 00:21:10 CEST
Alexander Schwinn referenced this bugreport in commit 5fdeb52e20f8cf7c493754ae09557fe3bc0377de

tree view jumps (scrolls) when clicking on a directory II (Bug #15174)

https://git.xfce.org/xfce/thunar/commit?id=5fdeb52e20f8cf7c493754ae09557fe3bc0377de
Comment 36 alexxcons editbugs 2019-04-29 00:22:49 CEST
Ok, think the patch got sufficient testing.

Patched master, 4.14 and 4.12 branch. To be released in 1.8.5 and 1.6.17
Comment 37 John 2019-05-02 16:20:56 CEST
(In reply to alexxcons from comment #32)
> IMO the auto-expand is nice. Removing it may not please other users. Please
> open a separate bug where we can discuss on that. ( Possibly we could add a
> xfconf setting to enable/disable it).

I really disagree that the auto-expand is nice. It may seem like a good idea, but it really is not.

When users click on a folder in the tree view, their intent is for the contents to appear in the right pane.
Having the folder auto-expand in the tree view gets very tiring very quickly. It violates the principle of least surprise, and, again, makes using the tree view disorienting. 

I do not want to hold up Windows explorer as the standard Thunar should be aiming for... but, Windows Explorer does not auto-expand in tree view, and... neither should Thunar.

But I'm happy for it to be discussed in a separate bug.

Ta so much for fixing the scroll bug, that one was really painful :-)
Comment 38 John 2019-05-02 16:22:54 CEST
(In reply to John from comment #37)
> (In reply to alexxcons from comment #32)
> > IMO the auto-expand is nice. Removing it may not please other users. Please
> > open a separate bug where we can discuss on that. ( Possibly we could add a
> > xfconf setting to enable/disable it).

Oh, and if there can be an xconf setting for it, then that would be awesome, and keep everybody happy :-)
Comment 39 Massimo Burcheri 2019-05-10 08:26:43 CEST
When and where will this patch be released? I'd like to push my distro to integrate that in order to get a usable file browser back finally.
Comment 40 alexxcons editbugs 2019-05-10 21:47:54 CEST
> Patched master, 4.14 and 4.12 branch. To be released in 1.8.5 and 1.6.17

Latest on 19th of May, which is feature freeze for xfce4.14.
Meanwhile, you have many options:
1) Compile from source
2) Ask your distro to patch the existing package
3) Just use  bookmark view instead of tree-view till your distro ships the fix  ;)

Subscribe to xfce-announce, so you wont miss the release: https://mail.xfce.org/mailman/listinfo/

Bug #15174

Reported by:
rich.trefz
Reported on: 2019-03-05
Last modified on: 2019-05-10
Duplicates (2):
  • 15194 Tree side pane jumping on selection
  • 15313 Thunar tree / folder view moves when selecting folders, making Thunar completely disorienting and unusable.

People

Assignee:
alexxcons
CC List:
8 users

Version

Attachments

thunar-tree-view.gif (639.66 KB, image/gif)
2019-03-06 19:49 CET , Andre Miranda
no flags
little script to make the test directories (341 bytes, text/plain)
2019-03-07 05:36 CET , rich.trefz
no flags
patch fixing the bug (1.90 KB, patch)
2019-03-16 23:10 CET , alexxcons
no flags
build error message (2.82 KB, text/plain)
2019-03-20 22:13 CET , rich.trefz
no flags
patch II (6.29 KB, patch)
2019-04-24 22:11 CEST , alexxcons
no flags

Additional information