Commit graph

106 commits

Author SHA1 Message Date
John Preston
6b5524b63c Allow clearing system buttons state on Windows. 2023-12-04 14:18:49 +04:00
John Preston
4f2a33ea70 Allow disabling window title shadow on Windows. 2023-12-04 14:18:35 +04:00
John Preston
cd4e9d378c Allow to use ForceFullRepaintSync on Linux. 2023-11-22 12:17:32 +04:00
John Preston
fee301f941 Use plain windows.h now it doesn't define small. 2023-11-13 18:59:56 +04:00
John Preston
f9b24c7551 Fix build on Windows. 2023-11-13 11:26:07 +04:00
John Preston
d28afffcb9 Workaround menu click-through on macOS 14.1. 2023-11-07 12:39:17 +04:00
Ilya Fedin
ea4c67408e Revert "Workaround Wayland popup menu bug."
This reverts commit 8db6dcf125.
2023-09-26 12:11:33 +04:00
Ilya Fedin
bcf88b9065 Fix window extents terminology
Extents is a synonym of size but we're setting not window size.
2023-08-29 07:47:50 +02:00
Ilya Fedin
fd55e9b71b Adapt WindowHelper::updateMargins for Windows 11 native resize 2023-08-14 12:20:27 +04:00
Ilya Fedin
cbb9e0bbde Make WindowHelper::updateMargins multi-screen DPI aware 2023-08-14 12:20:27 +04:00
Ilya Fedin
e66ad9c80c Avoid additional calculations in WindowHelper::updateMargins 2023-08-14 12:20:27 +04:00
Ilya Fedin
92cb6f6809 Remove unused variables from WindowHelper::fixMaximizedWindow 2023-08-14 12:20:27 +04:00
Ilya Fedin
eeb2cbc69c Use QWindow's devicePixelRatio for top resize area 2023-08-11 11:49:00 +04:00
John Preston
2631d64a5f Use smaller top resize area. 2023-08-10 22:14:48 +02:00
Ilya Fedin
4a41346a64 Use native window resize on Windows 11 2023-08-10 20:01:11 +04:00
Ilya Fedin
8e31adc0af Remove unused variable 2023-08-10 20:01:11 +04:00
John Preston
91d43ea4b5 Provide (almost) correct modifiers in DirectManipulation. 2023-07-26 12:00:10 +04:00
Ilya Fedin
19d044a212 Move TitleControlsLayout from ui_platform_utility to ui_platform_window_title 2023-07-19 14:42:06 +04:00
John Preston
8db6dcf125 Workaround Wayland popup menu bug.
When hiding a child popup first the app receives ApplicationDeactivate
event and in a short time (a couple of ms) ApplicationActivate.

But the first event hides all popups, so the parent popup gets closed too.

Delay handling of ApplicationDeactivate event in this specific case.
2023-07-12 22:05:12 +04:00
Ilya Fedin
6abad69ca6 Cache title controls layout value
So it's not requested on every window width change and etc...
2023-07-04 15:44:46 +04:00
John Preston
08f8054866 Use QWindowSystemInterface::handleWheelEvent. 2023-06-29 20:48:38 +04:00
John Preston
855f8f7b75 Implement custom scrolling using DirectManipulation.
Use it in Ui::RpWindow. This is an experiment.

Thanks Chromium and Firefox.
2023-06-28 18:55:08 +04:00
John Preston
328b75a311 Some indentation fixes. 2023-03-17 14:21:51 +04:00
John Preston
5173dfa1ca Workaround for emoji selector in popup menu on Windows. 2023-03-17 14:21:42 +04:00
Ilya Fedin
3043ec69ea Make maximized geometry handling less bugged on Windows 2023-03-01 10:45:11 +04:00
John Preston
74ab66cfa9 Ignore native state updates for fullscreen. 2023-02-17 20:12:09 +04:00
John Preston
c4838f5899 Fix native pointers staleness in macOS RpWindow. 2023-02-14 19:39:24 +04:00
John Preston
a3bcd2fac4 Fix rounding for maximized translucent windows. 2023-02-10 20:32:06 +04:00
John Preston
30dba7a215 Fix system buttons padding on Windows. 2023-02-10 16:42:55 +04:00
John Preston
e053e04607 Always round down point coords inside the window.
Or 3839 rounds to 1920 and the point falls outside of Qt window.
2023-02-06 12:42:57 +04:00
John Preston
2404225e09 Allow window to receive WM_DPICHANGED in Qt. 2023-01-13 12:43:50 +04:00
Ilya Fedin
95dd2c8465 Fix various spaces on end of lines 2022-09-02 19:26:53 +04:00
John Preston
a76cdf7edf Allow arbitrary paddings around PopupMenu. 2022-08-17 21:03:06 +03:00
Ilya Fedin
ba7e3667d6 Adapt for Qt 6.4 device pixel ratio changes
QWidget::devicePixelRatioF represents backing store ratio and it's no more equal to native surface ratio
2022-07-19 19:44:06 +04:00
Ilya Fedin
3dbf58c45f Make window resize less lagged on Windows 2022-06-24 20:40:52 +04:00
John Preston
f40dc661b3 Revert "Simplify Windows native event filter."
With that commit the window frame on Windows 7 is still bugged :(
2022-06-24 20:40:23 +04:00
John Preston
7aedf7703f Revert "Make window resize less lagged on Windows"
This reverts commit b5da6e709d.
2022-06-22 20:23:24 +04:00
John Preston
1254ee00db Revert "Remove WS_CAPTION manually on Windows 7"
This reverts commit adf267a3a2.
2022-06-22 20:19:16 +04:00
Ilya Fedin
adf267a3a2 Remove WS_CAPTION manually on Windows 7 2022-06-21 20:38:09 +04:00
John Preston
dbc0e87c80 Fix possible crash in native event filter. 2022-06-20 18:08:42 +04:00
Ilya Fedin
6f856ce495 Use ScreenToClient for point convertion in WM_NCHITTEST 2022-06-18 11:01:00 +04:00
Ilya Fedin
30810032dc Revert "Make maximized geometry handling less bugged on Windows"
This reverts commit b05b7bd502.
2022-06-18 11:01:00 +04:00
Ilya Fedin
74cd53e1d1 Revert "Use native window resize on Windows 11"
This reverts commit 2e9aec239d.
2022-06-18 11:01:00 +04:00
Ilya Fedin
2246d16daf Revert "Use native window titlebar on Windows 11"
This reverts commit de5aa43f15.
2022-06-18 11:01:00 +04:00
Ilya Fedin
1679da738b ui_window_win: use value_or for _frameMargins 2022-06-14 07:00:45 +04:00
Ilya Fedin
ce35425670 Simplify Windows native event filter
There's no need for a global event filter as it checks for the window hwnd anyway. And, moreover, that creates problems as Qt filters some events to global event filters.
2022-06-13 14:04:17 +04:00
Ilya Fedin
a714fb0070 Refactor all ui_platform_utility functions to accept QWidget
Also let ShowWindowMenu accept the point and remove unused return data
2022-06-13 14:04:17 +04:00
Ilya Fedin
de5aa43f15 Use native window titlebar on Windows 11 2022-06-13 14:04:17 +04:00
Ilya Fedin
3255de2e5a Use native system window menu with custom titlebar on Windows 2022-06-13 14:04:17 +04:00
Ilya Fedin
2e9aec239d Use native window resize on Windows 11 2022-06-13 14:04:17 +04:00