Changeset View
Changeset View
Standalone View
Standalone View
3rdparty/ext_qt/remove-fullscreen-border-hack.patch
- This file was added.
1 | From e9b40ddf98af52f1c1866c766c9add6245e66a92 Mon Sep 17 00:00:00 2001 | ||||
---|---|---|---|---|---|
2 | From: Alvin Wong <alvin@alvinhc.com> | ||||
3 | Date: Thu, 18 Apr 2019 18:59:58 +0800 | ||||
4 | Subject: [PATCH] Hack to hide 1px border with OpenGL fullscreen hack | ||||
5 | | ||||
6 | Unfortunately can't hide all four sides because the bug returns. Now we | ||||
7 | leave the bottom border visible, which is probably the most we can do. | ||||
8 | | ||||
9 | Ref: https://bugreports.qt.io/browse/QTBUG-41309 | ||||
10 | --- | ||||
11 | src/plugins/platforms/windows/qwindowswindow.cpp | 4 ++-- | ||||
12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||||
13 | | ||||
14 | diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp | ||||
15 | index 9705eb7293..08c743aaae 100644 | ||||
16 | --- a/src/plugins/platforms/windows/qwindowswindow.cpp | ||||
17 | +++ b/src/plugins/platforms/windows/qwindowswindow.cpp | ||||
18 | @@ -1995,7 +1995,7 @@ bool QWindowsWindow::isFullScreen_sys() const | ||||
19 | return false; | ||||
20 | QRect geometry = geometry_sys(); | ||||
21 | if (testFlag(HasBorderInFullScreen)) | ||||
22 | - geometry += QMargins(1, 1, 1, 1); | ||||
23 | + geometry += QMargins(0, 0, 0, 1); | ||||
24 | QPlatformScreen *screen = screenForGeometry(geometry); | ||||
25 | return screen && geometry == screen->geometry(); | ||||
26 | } | ||||
27 | @@ -2066,7 +2066,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates newState) | ||||
28 | const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE; | ||||
29 | const bool wasSync = testFlag(SynchronousGeometryChangeEvent); | ||||
30 | setFlag(SynchronousGeometryChangeEvent); | ||||
31 | - SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf); | ||||
32 | + SetWindowPos(m_data.hwnd, HWND_TOP, r.left() - 1, r.top() - 1, r.width() + 2, r.height() + 1, swpf); | ||||
33 | if (!wasSync) | ||||
34 | clearFlag(SynchronousGeometryChangeEvent); | ||||
35 | clearFlag(MaximizeToFullScreen); | ||||
36 | -- | ||||
37 | 2.18.0.windows.1 | ||||
38 | |