gpodder / gpodder

The gPodder podcast client.
http://gpodder.org/
GNU General Public License v3.0
1.28k stars 204 forks source link

start gPodder on windows 10, window starts in spurious positions. #1489

Open jimlad68 opened 1 year ago

jimlad68 commented 1 year ago

I run gPodder on Windows 10 and having trouble with screen positions. Nothing major, just a bit annoying.

[1] I start gPodder via a shortcut to call a *.bat file e.g. start /max "" "E:\zPortAps\PortableApps\PortableApps\gPodderPortable\App\gPodder\data\bin\gpodder.exe" "E:\zPortAps\PortableApps\PortableApps\gPodderPortable\App\gPodder\data\bin"

In a single or multiscreen environment it never opens as it did before, and usually across 2 screens, sometimes with the title bar "off screen". In the case of single screen it can be "part off the screen"

The popout windows behave much better, they either open up as last time, or if monitor setup has changed they follow the main window.

I have mostly used the portableapps version, but also downloaded and tested the gPodder portable version from https://gpodder.github.io/.

Is there a way to make it open in the same position or better still open maximised?

auouymous commented 1 year ago

3.11.0 has a window positioning bug, are you using 3.11.1? If so, there is a menu item to open logs, check if they contain any warnings about reseting position.

Gpodder should restore the maximised state. Try searching for main_window in Settings.json (https://gpodder.github.io/docs/user-manual.html#default-gpodder-home-folder) and look at the x, y, and maximised values. Open the file again after restarting and closing gpodder to see if they changed.

I don't use Windows and don't know what that start /max command does, but have you tried without it?

jimlad68 commented 1 year ago

Thanks for getting back.

As I say, not the end of the world and simply a couple of double clicks, but a pity to give a bad first impression of otherwise mature descendant of Juice.

jimlad68 commented 1 year ago

This might sound crazy, but I am having a similar problem with the standard Windows simple editor Notepad, but no other programs I have used including Notepad++, and the issue continued when I disconnected (without restart) all extra monitors just leaving the laptop monitor.

I then restarted the laptop with no extra monitors and all programs including gPodder worked fine.

I suppose this suggests something with windows 10 and my multi monitor setup (1 with HDMI socket, 2 via USBC HDMI sockets), but why some programs (gPodder + notepad), but not most.

Curiouser and Curiouser.

auouymous commented 1 year ago

The problem is that your mutli-head setup puts gpodder at a position that is off-screen when the other monitors are disconnected. In an hour or so when it finishes building, can you test https://ci.appveyor.com/project/elelay/gpodder/builds/46473354/artifacts and let me know if gpodder works if maximized or not maximized when connecting/disconnecting monitors?

jimlad68 commented 1 year ago

auouymous have tested it (still show 3.11.1, but results different) = if window is NOT maximised (restore), restarts in correct place (I think that was the case before). = if window is maximised, restarts maximised BUT on the main laptop screen, not the monitor where it was before. = That result is probably better in a practical sense, but still needs dragging to old monitor if different window organisation is required. Another simple option is to have it nearly maximised, and that keeps the position OK.

auouymous commented 1 year ago

https://ci.appveyor.com/project/elelay/gpodder/builds/46476527/artifacts is current git which fixed the issue where maximized windows are placed at the unmaximized position, and will become 3.11.2 if nothing else gets changed.

if window is maximised, restarts maximised BUT on the main laptop screen, not the monitor where it was before.

Does the above artifact fix that? Excluding the case where you launch gpodder with only the laptop screen, and then launch it again after connecting external screen.

https://ci.appveyor.com/project/elelay/gpodder/builds/46480821/artifacts is the same but removes the position reset code. Does this work properly when unplugging monitors or does it place the window off-screen? Other Windows users have reported that 3.11.0 (no reset code) hides windows off-screen, so I doubt this will work for you.

If that does work, I could add a config to disable position reset, but it might allow windows to be placed off-screen and make gpodder appear frozen if the window is modal. There is also no way to always make it restore to the other monitor, even if reset is disabled. Various actions notify gpodder of the window's size and position, and receiving an event while gpodder is on the laptop screen will overwrite its position, forcing you to drag it back when connecting the external screen.

I could add a setting to disable saving changes to size and position. You can place the windows on the external monitor and then lock the setting. When using the laptop screen, each window would reset to default position but wouldn't save its new position.

jimlad68 commented 1 year ago

I am using the portable downloads:

Re gpodder/builds/46476527/artifacts 1- Have tested in many restart situations and seems to be fine, especially for maximised window. 2- Slight "misvehaviour" is when it has been restarted with maximise window, then window restore, the restore does not go back to a previous "restore" window size, but looks like the top left has the restore position, but it is the size of a full monitor hanging off to the right and below, and needs the window edges dragging to fit on the screen. 3- If unplug extra monitors = OK 4- If then replug monitors, gPodder then starts in spurious position with top bar off screen. However, if brought back in view, it then behaves OK on further gPodder restarts.

Re gpodder/builds/46480821/artifacts 5- Keeps maximise screen, but always returns to laptop monitor. 6- similar to 2 above 7- unplug other monitors works well on laptop monitor 8- same as 4 above

So all in all builds/46476527 seems best.

Slight aside for future enhancement, gPodder sometimes takes a while to load (suspect it is getting lots of file info), so an initial splash screen might help to know it is doing something. Juice has one, but even that is a bit late in popping up.

Thanks for your efforts from someone who has been in IT since 1970, but never got my head around programming, at best bodging other peoples scripts!