I save my window state with this, and i restore it. As long as the window is not maximized (using the maximize button and using the native titlebar) i can use the restoreWindowStateFromString, but once i have the window maximised, then exit and then re-launch and do restoreWindowStateFromString the window moves to high, the native titlebar is off the screen on the top. This is the string that gets saved and is used for restoring
i don’t know if “fs” means fullscreen, but if that’s the case maximized does not mean fullscreen, theese are two different things.
this prints to the log if the last state was a maximized window
fs 418 208 844 645
in the destructor
if (filter != 0)
{
MemoryBlock data;
filter->getStateInformation (data);
SET (Config::Global, "filterState", data);
SET (Config::Windows, getName(), getWindowStateAsString());
L(getWindowStateAsString());
}
deleteFilter();
the result is a window that looks like this (this is the full screenshot from the screen nothing is cut, you will see what’s wrong) http://bayimg.com/FaDaMaadG
the weird thing is when i click on the taskbar button 3time (bring it to front bring it to back then bring it to front again), it comes back as a normal window the titlebar is visible, however it’s not maximized like so http://bayimg.com/FADaOAADG
It looks to me like the window hasn’t got a native titlebar at the time when you restore its size… Perhaps you’re calling setUsesNativeTitlebar (true) after you’ve already restored its size?
well it’s a bit my fault but not all, i was working around the issue where when you start a juce application with a native titlebar it does not go to front on start you need to click it
so i was creating the window, restoring it from the string but after that setting it visible and adding it to desktop.
Ah, right. Because until it’s actually on the screen and visible, it can’t have a native title bar, so the resizing won’t be able to take that into account when positioning it.
it’s weird (i’m at the tip) if a window is stretched over two monitors (starts at one ends at the other) once it closed and the re-opened, it’s move to the monitor that it occupies the most (if it’s mostly on the left one after the restore it’s only on the left one and the other way around).
i think it’s important to say i’m on windows7 with NVidia drivers, i know that ATI does it’s multi monitor thing in some different way on XP don’t know how it’s done on Vista/7
aaand it’s even more important to say i have 3 graphics cards, one disabled (Matrox internal onboard), and two NVidia geforce’s each monitor is connected to a different card.
That doesn’t sound particularly strange, because when it makes it full-screen, it just makes it fill the monitor that contains the centre point of the component.