Warning, /graphics/krita/3rdparty/ext_qt/0061-Hack-to-hide-1px-border-with-OpenGL-fullscreen-hack.patch is written in an unsupported language. File is not indexed.
0001 From f2d24987c99b0123440cc343a5319714efe900e4 Mon Sep 17 00:00:00 2001 0002 From: Alvin Wong <alvin@alvinhc.com> 0003 Date: Thu, 18 Apr 2019 18:59:58 +0800 0004 Subject: [PATCH 21/47] Hack to hide 1px border with OpenGL fullscreen hack 0005 0006 Unfortunately can't hide all four sides because the bug returns. Now we 0007 leave the bottom border visible, which is probably the most we can do. 0008 0009 Ref: https://bugreports.qt.io/browse/QTBUG-41309 0010 --- 0011 src/plugins/platforms/windows/qwindowswindow.cpp | 10 +++++++--- 0012 1 file changed, 7 insertions(+), 3 deletions(-) 0013 0014 diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp 0015 index 4e3c7309a1..77e418e10f 100644 0016 --- a/src/plugins/platforms/windows/qwindowswindow.cpp 0017 +++ b/src/plugins/platforms/windows/qwindowswindow.cpp 0018 @@ -1636,7 +1636,7 @@ void QWindowsWindow::show_sys() const 0019 restoreMaximize = true; 0020 } else { 0021 updateTransientParent(); 0022 - if (state & Qt::WindowMaximized) { 0023 + if (state & Qt::WindowMaximized && !(state & Qt::WindowFullScreen)) { 0024 sm = SW_SHOWMAXIMIZED; 0025 // Windows will not behave correctly when we try to maximize a window which does not 0026 // have minimize nor maximize buttons in the window frame. Windows would then ignore 0027 @@ -2128,7 +2128,7 @@ bool QWindowsWindow::isFullScreen_sys() const 0028 return false; 0029 QRect geometry = geometry_sys(); 0030 if (testFlag(HasBorderInFullScreen)) 0031 - geometry += QMargins(1, 1, 1, 1); 0032 + geometry += QMargins(0, 0, 0, 1); 0033 QPlatformScreen *screen = screenForGeometry(geometry); 0034 return screen && geometry == screen->geometry(); 0035 } 0036 @@ -2199,7 +2199,11 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates newState) 0037 const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE; 0038 const bool wasSync = testFlag(SynchronousGeometryChangeEvent); 0039 setFlag(SynchronousGeometryChangeEvent); 0040 - SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf); 0041 + if (testFlag(HasBorderInFullScreen)) { 0042 + SetWindowPos(m_data.hwnd, HWND_TOP, r.left() - 1, r.top() - 1, r.width() + 2, r.height() + 1, swpf); 0043 + } else { 0044 + SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf); 0045 + } 0046 if (!wasSync) 0047 clearFlag(SynchronousGeometryChangeEvent); 0048 clearFlag(MaximizeToFullScreen); 0049 -- 0050 2.20.1.windows.1 0051