! 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 !
Thunar dialogs bring up random window
Status:
RESOLVED: FIXED

Comments

Description haarp 2019-06-08 13:47:32 CEST
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!
Comment 1 alexxcons editbugs 2019-06-09 21:38:10 CEST
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.
Comment 2 haarp 2019-06-09 22:19:00 CEST
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
Comment 3 Theo Linkspfeifer editbugs 2019-06-11 20:34:34 CEST
It works fine without the daemon process. Possibly similar to bug 10488.
Comment 4 Theo Linkspfeifer editbugs 2019-06-12 16:56:16 CEST
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
Comment 5 haarp 2019-07-09 11:08:21 CEST
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.
Comment 6 Olivier Fourdan editbugs 2019-07-09 11:19:20 CEST
Not Thunar's fault.
Comment 7 Git Bot editbugs 2019-07-09 21:46:28 CEST
Olivier Fourdan referenced this bugreport in commit d9af18135348afa59f1a54362367a48eef81876f

stacking: Limit to direct transients when raising

https://git.xfce.org/xfce/xfwm4/commit?id=d9af18135348afa59f1a54362367a48eef81876f
Comment 8 Olivier Fourdan editbugs 2019-07-09 21:47:53 CEST
That should fix it.
Comment 9 haarp 2019-07-10 16:18:11 CEST
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.
Comment 10 Olivier Fourdan editbugs 2019-07-10 16:39:03 CEST
There is nothing random in this bug :)

Bug #15580

Reported by:
haarp
Reported on: 2019-06-08
Last modified on: 2019-07-10

People

Assignee:
Olivier Fourdan
CC List:
3 users

Version

Version:
4.13.1

Attachments

Additional information