newm icon indicating copy to clipboard operation
newm copied to clipboard

Syncthingtray window is immediately closed

Open AlexD97 opened this issue 1 year ago • 15 comments

When clicking on the tray button of syncthingtray the window is opened and closed immediately. I also tried to add a rule with 'float': True but this does not help.

AlexD97 avatar Sep 21 '22 19:09 AlexD97

Can you add a log when this happens?

jbuchermn avatar Oct 15 '22 07:10 jbuchermn

Here it is:

newm_log.txt

AlexD97 avatar Oct 15 '22 08:10 AlexD97

I can't reproduce this as I'm not using syncthingtray and it appears to want some configuration to start up.

How did you configure the 'float': True rule? Can you paste the config? Does this only happen when starting this app fro, I presume, waybar? Or also when starting it from the terminal?

jbuchermn avatar Oct 15 '22 11:10 jbuchermn

Sorry, I could have looked into the GitHub Issues of syncthingtray: https://github.com/Martchus/syncthingtray/issues/157

The problem is that if the window/popup loses focus (which is immediately true if focus_follows_mouse is true) the window closes. It would be easy to make a workaround if it was possible to place (floating) windows relative to the cursor position.

AlexD97 avatar Oct 15 '22 12:10 AlexD97

Can you confirm, that this is actually the issue? I.e. does it work when you disable focus_follows_mouse?

jbuchermn avatar Oct 15 '22 13:10 jbuchermn

It kinda works then. I need to double click on the icon (when clicking just once the window is still immediately closed).

AlexD97 avatar Oct 15 '22 13:10 AlexD97

Interesting, maybe there's something else going wrong..

Double-clicking with focus_follows_mouse doesn't work at all?

jbuchermn avatar Oct 17 '22 18:10 jbuchermn

Double-clicking with focus_follows_mouse is working, too. In both cases however, this is a bit unreliable, sometimes I need triple-clicking. One can see that on the first click the window is opened and immediately closed, then on the second click it stays open (normally).

AlexD97 avatar Oct 17 '22 19:10 AlexD97

I hope you've seen the workaround mentioned in the README: https://github.com/Martchus/syncthingtray#workaround-positioning-issues-under-wayland

Note that implementing this to work correctly under Wayland is unlikely to happen anytime soon. I must say my experience with Wayland as developer and user is a rather sad story so far (see https://github.com/Martchus/syncthingtray/issues/157#issuecomment-1328359307 and https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/54#note_1664168). If anybody has ideas for improvement you're welcome.

Martchus avatar Nov 29 '22 15:11 Martchus

Thanks for the answer, @Martchus . Unfortunately I can't find the option to open in window mode in the appearance tab.

AlexD97 avatar Dec 09 '22 13:12 AlexD97

Unfortunately I can't find the option to open in window mode in the appearance tab.

Settings -> Tray -> Appearance -> Window type -> Normal window

Martchus avatar Dec 09 '22 15:12 Martchus

Unfortunately I can't find the option to open in window mode in the appearance tab.

Settings -> Tray -> Appearance -> Window type -> Normal window

I don't have that option, see also the image: 20221209_17h31m36s_grim

AlexD97 avatar Dec 09 '22 16:12 AlexD97

Looks like you're not using the latest release yet.

Martchus avatar Dec 09 '22 16:12 Martchus

I use version 1.3.0. Did you add this in 1.3.1?

AlexD97 avatar Dec 10 '22 15:12 AlexD97

Yes, I added it in 1.3.1. I've also recently fixed drawing the background to be drawn like on a normal window. That fix has not been released yet.

By the way, it also looks like themed icons are not configured correctly in your Qt installation as only fallback icons are shown.

Martchus avatar Dec 10 '22 15:12 Martchus

Yes, I added it in 1.3.1. I've also recently fixed drawing the background to be drawn like on a normal window. That fix has not been released yet.

By the way, it also looks like themed icons are not configured correctly in your Qt installation as only fallback icons are shown.

Thanks. So for me the issue is gone with the window mode.

AlexD97 avatar Dec 17 '22 12:12 AlexD97

Good that this is sufficient for you because due to the mentioned limitations you won't get a "tray window" (a small window spawning close to the tray icon) anyways. I'd just like to end with that note so nobody thinks that the normal behavior is actually fixed on Wayland.

Martchus avatar Dec 17 '22 12:12 Martchus