![]() ![]() Starting in windowed mode, and switching to fullscreen works fine. Note that unlike with the SDL1 version, Alt-TAB will show the DOSBox-X SDL2 process. It is possible to use Alt-TAB to switch to another process and use SIGKILL ( killall -9 dosbox-x) on dosbox-x (a normal SIGTERM does nothing, so the process is not responding). Starting DOSBox-X in either windowed mode and switching to fullscreen, or directly starting in fullscreen results in a momentary flash with some white and then a black screen. Seems to work fine, either starting directly in fullscreen, or starting in windowed mode and switching to fullscreen afterwards. To close DOSBox-X you need to use Alt-TAB to highlight the originating process (hopefully a terminal) and send it a SIGTERM with CTRL-C. Also the processes shown by Alt-TAB will not include DOSBox-X. It is possible to press Alt-TAB in this state and switch input focus to another window, but the selected window will not appear (z-order issue?). Pressing CTRL-C will terminate dosbox-x gracefully. Any characters typed end up at the terminal. So if you start it from a terminal, the terminal gets (or keeps?) the input focus, even though you have a full screen DOSBox-X in front of you. set fullscreen=true) causes the keyboard focus to go to the originating process. But starting directly in fullscreen (e.g. Starting DOSBox-X in windowed mode and switching to fullscreen works fine. None of this seems to be dependant on the output= setting, or any other settings for that matter. There are several behaviours that you can encounter. IDXGISwapChain::SetFullscreenState with TRUE.Īll together, this gives a clean, smooth experience with no freezes, hangs, stuck foreground windows that you can't get rid of, or any other nastiness like that.Fullscreen on Linux is problematic.Pump my message loop to let everything bring itself up to date.The final consideration is that this will generate a WM_SIZE message with size so when you're responding to WM_SIZE for mode changing you need to be aware of this, and do whatever is needed for your program to stop it exploding in your face.įor Alt-Tabbing back, I do the following: The next thing I do is use ShowWindow with SW_MINIMIZE - this nicely tucks the window away, minimized to the taskbar. This will give you better behaviour, and you won't end up with any "frozen" topmost exclusive fullscreen modes. My recollection is that none of this was clearly called-out in the documentation.ĭeal with Alt-Tab by responding to WM_ACTIVATE messages.įor Alt-Tabbing away, the first thing I do is call IDXGISwapChain::SetFullscreenState with FALSE. PFactory->MakeWindowAssociation (hWnd, DXGI_MWA_NO_WINDOW_CHANGES | DXGI_MWA_NO_ALT_ENTER) The correct way to use MakeWindowAssociation is to call it from the parent DXGIFactory for your swapchain, like so: if (SUCCEEDED (SwapChain->GetParent (&IID_IDXGIFactory, (void **) &pFactory))) ![]() If you're using MakeWindowAssociation, you may have found that it doesn't honour the flags you give it, and DXGI tries to handle Alt-Enter (yes, I know you asked about Alt-Tab, bear with me) anyway. Never touch them afterwards SetFullscreenState will remove the window decorations for exclusive fullscreen modes automatically for you, so just let it do it's work and everything else will go easier on you. All of this information is probably scattered around the DXGI documentation on various disconnected pages it's been a while since I've reviewed it.įor windowed modes (including borderless) Alt-Tab just works and you don't need to do anything special.įor fullscreen exclusive modes, first of all, always create your window (using CreateWindow(Ex)) with the normal title bar and borders as if it were for a windowed mode. ![]()
0 Comments
Leave a Reply. |