From 688c4a90d994aa23e7b0af3ffcbb8707886db780 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 18 Nov 2018 23:10:30 -0800 Subject: [PATCH] Use the raw display bounds not the usable display bounds for full-screen calculations --- app/streaming/session.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 466b8575..e65ce58a 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -587,10 +587,12 @@ void Session::getWindowDimensions(int& x, int& y, int& width, int& height) { int displayIndex = 0; + bool fullScreen; if (m_Window != nullptr) { displayIndex = SDL_GetWindowDisplayIndex(m_Window); SDL_assert(displayIndex >= 0); + fullScreen = (SDL_GetWindowFlags(m_Window) & SDL_WINDOW_FULLSCREEN); } // Create our window on the same display that Qt's UI // was being displayed on. @@ -617,10 +619,16 @@ void Session::getWindowDimensions(int& x, int& y, i, SDL_GetError()); } } + + fullScreen = (m_Preferences->windowMode != StreamingPreferences::WM_WINDOWED); } SDL_Rect usableBounds; - if (SDL_GetDisplayUsableBounds(displayIndex, &usableBounds) == 0) { + if (fullScreen && SDL_GetDisplayBounds(displayIndex, &usableBounds) == 0) { + width = usableBounds.w; + height = usableBounds.h; + } + else if (SDL_GetDisplayUsableBounds(displayIndex, &usableBounds) == 0) { width = usableBounds.w; height = usableBounds.h;