Location of monitor window is not saved and restored between runs
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
Same issue as with the other window size/placement requests: it won't work right, or at all, in many cases.
Last edit: compyx 2021-12-11
opening this again - at least a "best effort" scheme should be implemented for this type of thing
Okay, I will see what I can do. I don't have a Mac and my Linux boxes run Wayland, which doesn't allow repositioning windows, but if I can get something to work in a Windows VM then perhaps it'll work on Mac as well.
I've implement storing/restoring the monitor window geometry, now I need people to test this on various OSes and window managers.
So please move/resize the monitor window, close it, reopen it. Save settings and see if the monitor windows appears at (roughly) the same size and position when closing and reopening an emu.
Also test the command line options:
-monitorxpos,-monitorypos-monitorwidthand-monitorheight. Note that for position both xpos and ypos need to be specified, and for size both width and height need to be specified.No response in over a year and a half, so I'll assume lots of people tested this as I requested and found it to be working.
I don't know if it has to do with this:
When I try to save the window size to Settings for C64NTSC
First I do "Restore Display State" (the window adjusts to c64 screen size)
I save it to a new .ini
But after loading these settings the program window has default/previous width and height again.
However, when I manually set the height and width of the window (by left-clicking on the edge of the window), this setting is saved to the .ini correctly.
It seems that the problem is only on NTSC, the window size for PAL is always saved.
EDIT
However, no.
Window height and width are not taken into account when loading settings from .INI for both PAL and NTSC
The window size remains as it was before the .INI was loaded
Window size only loaded from vice.ini at program startup.
It is not loaded with custom.ini by "load settings from" option, and -config from .bat file.
Last edit: radius75 2023-08-28
That sounds "correct", the window size and position are only read from the settings and applied when creating the window, I never considered loading settings from a file (or resetting settings to default), to be honest.
I'll look into making that work, though I'd personally prefer to not save the size/position at all and let the window manager handle placement and size. But for some reason we decided to provide this, so we'll have to keep supporting it.
But as mentioned, I don't have systems that allow moving windows after they've been presented, so this might be hard to test for me.
It seemed to me that these parameters are saved in custom.ini so that, depending on what I run, the window is the way the user wants it. E.g. matched to NTSC or PAL, etc.
At the moment it only loads from vice.ini. And if we delete vice.ini it is loaded by default.
Yes, that's the way we want it to work, but as said, there's no code in place to actually do that.
The issue in the title of this ticket should be fixed in trunk. For some reason Gdk decides to move a window back to its position before the call to
gtk_window_move()which then triggers the "configure-event" of the window, resulting in our updated coordinates getting wiped. Oddly enough Gdk restores the "moved" coordinates when we show the window again.The issue with the window geometry not being properly set when loading custom settings, be it the emulated machine window(s) or the monitor window, is a related but separate issue requiring a new ticket.
Done in #1937
Seen it, thanks!