aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Fedchin <anightik@gmail.com>2019-01-30 21:10:32 +0300
committerAnton Fedchin <afedchin@ruswizards.com>2019-02-07 21:41:44 +0300
commitd6d1518dc30ef79eed95492a601c87322822375b (patch)
tree695a7e525724a2cd9dc984670c088a85b1f28612
parent33518fcb32b874c9f204fd12c8c4dacef08525b9 (diff)
[xbmc] application: handle resize event even in full screen state on windows.
-rw-r--r--xbmc/Application.cpp12
-rw-r--r--xbmc/windowing/windows/WinEventsWin32.cpp2
2 files changed, 13 insertions, 1 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 2dc0989ded..a8ff2ceb10 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -278,6 +278,18 @@ void CApplication::HandlePortEvents()
settings->SetInt(CSettings::SETTING_WINDOW_HEIGHT, newEvent.resize.h);
settings->Save();
}
+#ifdef TARGET_WINDOWS
+ else
+ {
+ // this may occurs when OS tries to resize application window
+ //CDisplaySettings::GetInstance().SetCurrentResolution(RES_DESKTOP, true);
+ //auto& gfxContext = CServiceBroker::GetWinSystem()->GetGfxContext();
+ //gfxContext.SetVideoResolution(gfxContext.GetVideoResolution(), true);
+ // try to resize window back to it's full screen size
+ auto& res_info = CDisplaySettings::GetInstance().GetResolutionInfo(RES_DESKTOP);
+ CServiceBroker::GetWinSystem()->ResizeWindow(res_info.iScreenWidth, res_info.iScreenHeight, 0, 0);
+ }
+#endif
}
break;
case XBMC_VIDEOMOVE:
diff --git a/xbmc/windowing/windows/WinEventsWin32.cpp b/xbmc/windowing/windows/WinEventsWin32.cpp
index 4f03e3d62e..27262ab423 100644
--- a/xbmc/windowing/windows/WinEventsWin32.cpp
+++ b/xbmc/windowing/windows/WinEventsWin32.cpp
@@ -556,7 +556,7 @@ LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
return(0);
}
case WM_DISPLAYCHANGE:
- CLog::LogF(LOGDEBUG, "display change event");
+ CLog::LogFC(LOGDEBUG, LOGWINDOWING, "display change event");
if (g_application.GetRenderGUI() && !DX::Windowing()->IsAlteringWindow() && GET_X_LPARAM(lParam) > 0 && GET_Y_LPARAM(lParam) > 0)
{
DX::Windowing()->UpdateResolutions();