mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
271 stars 145 forks source link

A "ghost" icon shows up when deleting a file #1256

Open gabrielfin opened 5 years ago

gabrielfin commented 5 years ago

Expected behaviour

Deleting a file in "Icon view" should remove it without any visual glitches and then focus on the icon that took its place (ie. the one that was to the right)

Actual behaviour

Sometimes when deleting a file, a "ghost" icon shows up for a fraction of a second at the top of the grid, shifting all icons one position and then immediately shifting them back. And after that, the first icon is focused, instead of the one that was to the right of the deleted one.

Here is a video showing the issue. I slowed it down so the glitch is more noticeable: https://i.imgur.com/UPlQqUY.mp4

Steps to reproduce the behaviour

  1. In "Icon view", sort a folder by "Modificaction date" (newest files at the bottom)
  2. Click on a file that is not the last file nor it is in the first row (see image)
  3. Press "Delete" key
  4. You should briefly see the "ghost" icon at the top (if not, repeat step 2) (see image)
  5. The first icon is now focused instead of the one that replaced the deleted one (see image)

The issue might not occur all the time, so you may have to try a few times. On my computer (Ubuntu 18.04 + caja 1.20) I can reproduce it every time but on a VM (Ubuntu 19.10 + 1.22) I can only reproduce it sometimes.

MATE general version

1.22.1 (and also 1.20.1)

Package version

1.22.1-0ubuntu1

Linux Distribution

Ubuntu MATE 19.10 (and also 18.04)

Link to downstream report of your Distribution

There isn't one

lukefromdc commented 5 years ago

Is this in marco with cpu composting, marco with GPU compositing(compton), marco with no composting, compiz, or in all window managers? Don't worry about trying to test them all, just say what you were using at the time as it might save some trouble duplicating this. I was not able to duplicate this in multiple attempts, using compiz-reloaded in Debian Unstable

gabrielfin commented 5 years ago

I just tried all window managers from Mate Tweak and I can reproduce the issue with all of them.

You may have to try several times. In my VM with MATE 1.22.1 it seems to be harder to reproduce, maybe once out of 15 or 20 times. In my PC with MATE 1.20.1 it happens more often, around once every 2 or 3 times.

Edit: It seems that by deleting the file with Shift+Delete (ie. permanently delete) I can reproduce the issue every time, on both versions of MATE. So maybe try to reproduce it with that.

sc0w commented 5 years ago

confirmed here (caja 1.20.3), video:

out-75.ogv.zip

  1. the file is removed
  2. the name dissappears
  3. it goes to the top without name, only icon
  4. the icon dissapears

The expected: the icon must dissapear immediately after removed

2019-07-08_01-43

lukefromdc commented 5 years ago

This happens so fast in the video it takes a quick eye to notice it at all. I either could not duplicate it or my eyes are not fast enough to catch it, in either case that means someone with a faster eye than mine will have to work on it. This however strikes me as a very minor cosmetic issue, unless of course it is a symptom of something else, or becomes obvious in some theme or perhaps at some monitor refresh rate. Speaking of that, I'm currently using a 4K/30hz monitor: the monitor can do 4K/60HZ but not on any output my graphics card has. Good enough for video or 0ad, and not used with first person shooter games.

gabrielfin commented 5 years ago

It does indeed happen very fast, I've measured it at around 125ms, so it should still be seen on a 30Hz monitor.

To me, it's more than a cosmetic issue. The fact that all icons shift one position to the right and then back makes it more noticeable on folders with many files and different row heights (because of thumbnail sizes). It's a bit confusing. The first couple of times, for a second, I thought I had deleted the wrong file because one does not expect files from the previous rows to shift position.

The other annoying thing is that after the file is deleted, the keyboard focus is set on the first file of the folder. After deleting this file: 1xb This one is the one that gets the focus: 3xb Instead of "new file".

Some more info:

I'm just guessing here, but maybe the icon list is prematurely sorted, somewhere between the file not existing anymore and the entry not yet being removed from the list. Maybe a race condition, which makes it harder to reproduce on a faster computer.

sc0w commented 5 years ago

@gabrielfin

The other annoying thing is that after the file is deleted, the keyboard focus is set on the first file of the folder.

it was already reported with https://github.com/mate-desktop/caja/issues/347

gabrielfin commented 5 years ago

Oh, ok. Actually, that bug is a side effect of this bug. The first file gets focused because the deleted icon is first moved to the top and then removed.