… CAB position.
…ek callback with SEEK_END. SEEK_END is not supported by some callback implementations.
…subsequent Wine- or program-driven changes. Among other things, this fixes Syberia 2. That game shows, hides, and then shows its window. Hiding it caused a WINDOW_LOST_FOCUS event to be queued. By the time it was processed, the window was the foreground window again. In response to being told it had lost focus, the game minimized its window. Hiding the window should have prevented or discarded the WINDOW_LOST_FOCUS event since the change was driven from Wine and the Win32 foreground/active window state would already be correct. In addition, when the program re-showed its window and made it foreground, that should have discarded the event as being out of date. Now they do.
…indows which aren't minimized and visible. The Win32 window state might have changed while the event was in the queue, making it obsolete. Sending WM_SYSCOMMAND/SC_RESTORE might re-show a hidden window, for example.
Cocoa would implictly unhide it when we order a window, anyway. Doing it early avoids problems from querying -[NSWindow isVisible] while the app is hidden. That method returns FALSE even for windows which would be visible if the app weren't hidden.
…ren't hidden. The -[NSWindow isVisible] method returns FALSE when the process is hidden, but that's not what we need to know in some cases. This fixes full-screen games which minimize their window when they lose focus. Command-Tabbing away hides the process. Because the window was not visible, the code didn't actually minimize it. When switching back to the process, no event was sent to the Wine back-end telling it the window had been restored, so it never resumed drawing to it.
While the process is hidden, it can't get a list of its windows which would be visible were it not hidden.