When Thunar opens a dialog regarding a file operation (e.g. "target is read-only"), it also brings up a random Thunar window, often unrelated to the copy operation. It seems dialogs are always accompanied by a Thunar window, but the decision which window to use is bugged. Thanks!
So this happens for you e.g. during a copy operation into a write protected folder ? Using CTRL C + CTRL + V ? Could you please describe a concrete use-case ? What I can reproduce is : Double click a read-only folder: Will result in an error, and a new, empty thunar tab/window.
Ok, I've only managed to repro it over gvfs. On local dirs, the copy operation is not even provided via drag'n'drop. Repro: - Start Thunar, then open a bunch of random windows first, then put them in the background - Open a new window, initiate a gvfs connection via sftp to a machine with a directory that is read-only for your user (e.g. owned by root with mode 770) - Drag'n'drop a local file into the read-only directory - Thunar will now complain in a dialog box about the read-only target, while simultaneously bringing one or more of the initial random windows to the foreground
It works fine without the daemon process. Possibly similar to bug 10488.
There are two gtk_window_present() calls involved [1][2]. The first one is for the progress dialog, the second one for the error dialog. The faulty behavior is somehow caused by delaying the first call. See: https://git.xfce.org/xfce/thunar/tree/thunar/thunar-application.c#n868 --- [1] https://git.xfce.org/xfce/thunar/tree/thunar/thunar-application.c#n1061 [2] https://git.xfce.org/xfce/thunar/tree/thunar/thunar-progress-dialog.c#n235
I just had the same happen with a simple "do you want to overwrite" dialog. Easier repro: - Start Thunar, then open a bunch of random windows first, then put them in the background - Open two new windows to locations containing files with the same name - Drag'n'drop a file from one location to the other - Thunar pops a "do you want to overwrite" dialog together with a random window It might be necessary to repeate a few times, as thw window used seesm to be random, and might be one of those in the foreground already.
Not Thunar's fault.
Olivier Fourdan referenced this bugreport in commit d9af18135348afa59f1a54362367a48eef81876f stacking: Limit to direct transients when raising https://git.xfce.org/xfce/xfwm4/commit?id=d9af18135348afa59f1a54362367a48eef81876f
That should fix it.
Thanks, Olivier. I did some short tests and couldn't reproduce this bug with the patch, but that could also have been due to its random nature. Unless proven otherwise tho, I'd say it's fixed.
There is nothing random in this bug :)