mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
graphics: hide subscreen window from task bar and alt+tab list when in full screen (#690)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change When booting in fullscreen, hide the subscreen from the alt+tab list and from the task bar. Alt-tabbing to it does nothing, so this is just to avoid confusion. No change to windowed mode. ## Testing Tested TDJ/SDVX/Popn. Didn't test Gitadora but it's probably fine..
This commit is contained in:
@@ -357,16 +357,24 @@ static HWND WINAPI CreateWindowExA_hook(DWORD dwExStyle, LPCSTR lpClassName, LPC
|
|||||||
bool is_popn_sub_window = avs::game::is_model("M39") && window_name.ends_with("Sub Screen");
|
bool is_popn_sub_window = avs::game::is_model("M39") && window_name.ends_with("Sub Screen");
|
||||||
bool is_gfdm_sub_window = games::gitadora::is_arena_model() && window_name.ends_with("SMALL");
|
bool is_gfdm_sub_window = games::gitadora::is_arena_model() && window_name.ends_with("SMALL");
|
||||||
|
|
||||||
// hide maximize button (prevent misaligned touches)
|
// update style / ex-style
|
||||||
if ((is_tdj_sub_window && GRAPHICS_IIDX_WSUB) || is_sdvx_sub_window || is_gfdm_sub_window || is_popn_sub_window) {
|
if (is_tdj_sub_window || is_sdvx_sub_window || is_gfdm_sub_window || is_popn_sub_window) {
|
||||||
|
// hide maximize button (prevent misaligned touches)
|
||||||
dwStyle &= ~(WS_MAXIMIZEBOX);
|
dwStyle &= ~(WS_MAXIMIZEBOX);
|
||||||
}
|
|
||||||
// mouse clicks become misaligned when resized
|
// mouse clicks become misaligned when resized
|
||||||
if (is_gfdm_sub_window) {
|
|
||||||
dwStyle &= ~(WS_SIZEBOX);
|
dwStyle &= ~(WS_SIZEBOX);
|
||||||
}
|
|
||||||
if ((is_tdj_sub_window || is_sdvx_sub_window || is_popn_sub_window) && GRAPHICS_WSUB_BORDERLESS) {
|
// borderless
|
||||||
dwStyle &= ~(WS_OVERLAPPEDWINDOW);
|
if (GRAPHICS_WINDOWED && GRAPHICS_WSUB_BORDERLESS) {
|
||||||
|
dwStyle &= ~(WS_OVERLAPPEDWINDOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
// don't show the sub window on task bar / alt-tab targets
|
||||||
|
if (!GRAPHICS_WINDOWED) {
|
||||||
|
dwExStyle &= ~(WS_EX_APPWINDOW);
|
||||||
|
dwExStyle |= WS_EX_TOOLWINDOW;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_sdvx_sub_window) {
|
if (is_sdvx_sub_window) {
|
||||||
|
|||||||
Reference in New Issue
Block a user