kozec / syncthing-gtk

GTK3 & python based GUI for Syncthing
GNU General Public License v2.0
1.3k stars 138 forks source link

Interface opens on plugging external monitors #519

Open jackkamm opened 5 years ago

jackkamm commented 5 years ago

This is the same issue as #393 which was closed and locked. I am using archlinux and i3 window manager and start syncthing-gtk by running syncthing-gtk -m. When I plug in an external monitor, this causes the syncthing-gtk window to open.

Here is the output of syncthing-gtk -m -v on startup, and then after I plug in the external monitor. On startup:

I StatusIcon    Using backend StatusIconGTK3 (primary)
V Notifications Error notifications enabled
V Notifications File update notifications enabled
I App           
I App           Syncthing-GTK started and running in notification area
V Daemon        Set refresh interval to 5
I App           updatecheck: disabled

After plugging in the monitor:

W StatusIcon    Failed to load modules required for status icon
V Daemon        Set refresh interval to 1

(syncthing-gtk:6871): Gtk-WARNING **: 07:04:23.818: Invalid icon size 24
W StatusIcon    StatusIcon: Using backend StatusIconDummy (fallback)

I also tested whether this occurs on another minimal WM (openbox with pypanel), but the error does not appear there.

kozec commented 5 years ago

I still maintain that there is no code that would do this in ST-GTK :) It doesn't really care for monitors being added or removed, so this is definitely issue with i3.

W StatusIcon Failed to load modules required for status icon

Is there any chance that i3 is destroying and then recreating tray area, for example to display it in panel on another monitor?

jackkamm commented 5 years ago

Is there any chance that i3 is destroying and then recreating tray area, for example to display it in panel on another monitor?

This seems quite likely to me. I now notice that the Syncthing-GTK window will also pop open when I hit Alt+Shift+R which causes i3 to restart in place and redraw all the windows/tray.

However, I can't say for sure because I don't really know the i3 internals. I posted an issue over there but haven't gotten a response yet.

Would it be possible to change the syncthing-gtk behavior so it doesn't open a new window when the tray is destroyed and redrawn?

kozec commented 5 years ago

Probably, but only as worst case solution. Syncthing-GTK can't really know whether tray is destroyed only temporary and not displaying its own window when tray disappears forever would leave no way to show ST-GTK window.