Commit Graph

431 Commits

Author SHA1 Message Date
Yuhang Zhao ecd1a2312c Remove useless code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-16 09:22:19 +08:00
Yuhang Zhao 9cb0ff7073 Remove unneeded include
Amends commit ae603926fc

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-15 20:03:12 +08:00
Yuhang Zhao a8228cf422
Merge pull request #49 from JulienMaille/patch-1
simple fix without the 500ms lag
2021-03-15 19:58:22 +08:00
Julien ae603926fc
Update framelesswindowsmanager.cpp
simple fix without the 500ms lag
2021-03-15 12:04:48 +01:00
Yuhang Zhao 0d7f3dba7e Win32: fix the multi-monitor issue again
This solution have no run-time overhead.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-13 11:07:49 +08:00
Yuhang Zhao d4550b63bd Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-12 09:07:48 +08:00
Yuhang Zhao be2a2a48a2 Do not leak connections
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-12 09:01:49 +08:00
Yuhang Zhao c19a4f7f74 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 21:07:06 +08:00
Yuhang Zhao bd05c66e23 Switch to traditional blur if the user disabled extra processing
Amends commit 070e8edc52

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 10:22:20 +08:00
Yuhang Zhao 070e8edc52 Add the ability to disable extra processing
If the user want to get full control of the Acrylic color.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 10:08:13 +08:00
Yuhang Zhao 76fd19211d Win32: Utilities: Add more enums learned from other repos
We may not need it, but we record it here in case it become usable in the future.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 09:43:19 +08:00
Yuhang Zhao b9ad74b81c Win32: Code tidies
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 09:38:50 +08:00
Yuhang Zhao 21774f9fbc Disable dynamic switching of Acrylic blur and wallpaper blur
After some testing, it's found that it's not reliable.
Maybe we should use another windows message to do this?
To be investigated.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 09:20:09 +08:00
Yuhang Zhao c9be4858ec Use the official Acrylic blur whenever possible
And switch back to the wallpaper blur when the window is being moved or resized.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 17:28:48 +08:00
Yuhang Zhao 54798e2f73 Update README
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 14:32:45 +08:00
Yuhang Zhao a183a6d4a1 Make the wallpaper blur dynamic update
The window background will update dynamically once
it's being moved.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 14:18:08 +08:00
Yuhang Zhao 0931b73671 Some refactor
Rename some functions to make it more clear.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 10:05:23 +08:00
Yuhang Zhao bc9edaf78a Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 20:24:51 +08:00
Yuhang Zhao b51c6ce564 Use new screenshot
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 14:06:36 +08:00
Yuhang Zhao 8b3da2d31a Add CMake project files for the examples
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 13:43:46 +08:00
Yuhang Zhao 44ed5fcf3d Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 11:32:30 +08:00
Yuhang Zhao 21f1f69684 Use wallpaper blur by default
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-08 21:10:11 +08:00
Yuhang Zhao 07290f9aeb Fix coordinate bug for FramelessHelper too
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-08 15:17:01 +08:00
Yuhang Zhao 70b257adb6 Add the ability to set the frame thickness
And some other minor tweaks.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-08 14:41:42 +08:00
Yuhang Zhao f70158a276 Add cross-platform Acrylic Effect
Currently still lacking Linux and macOS support,
but will be added sooner.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-08 14:10:55 +08:00
Yuhang Zhao ac30e108a3
Merge pull request #46 from midnightprioriem/master
Add Qt Quick classes to CMake Configuration, Add fix for addIgnoreObject in child windows
2021-03-05 13:02:31 +08:00
Zach Hannum 6c52fb0919 Added qquickframehelper to CMake config, mapping origin point for ignore objects should stop after first window 2021-03-04 23:23:40 -05:00
Yuhang Zhao 8a20747ba8 Minor tweaks
Mainly cleanup the WinNativeEventFilter

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-05 10:40:52 +08:00
Yuhang Zhao eeba7d854f Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-04 15:45:10 +08:00
Yuhang Zhao 310b44b8c4 Skip invisible objects
Fixes: #40

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-24 10:30:46 +08:00
Yuhang Zhao 7522273331 Get rid of latin-1 strings
Use UTF-8 strings everywhere.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-22 20:46:39 +08:00
Yuhang Zhao 996160256e
Merge pull request #39 from gersure/master
fix compile
2020-12-08 15:25:49 +08:00
zhengchangfa 7d844ab95f fix compile 2020-12-08 15:21:18 +08:00
Yuhang Zhao ca2a3be39d Minor tweaks.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-05 21:55:26 +08:00
Yuhang Zhao 6c76dda4f0 Update README.md
Adapt to the latest changes in code.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-04 11:52:59 +08:00
Yuhang Zhao ff9dddef76 Update README_win32.md
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-04 11:48:39 +08:00
Yuhang Zhao 684b05ccad Simplify FramelessHelper code
Remove unused code.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-04 11:41:54 +08:00
Yuhang Zhao ba4095251d Fix Qt 5.12 build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-02 16:40:21 +08:00
Yuhang Zhao a610c84a3c QWidget2: Fix Qt 5.12 build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-12-01 17:56:56 +08:00
Yuhang Zhao 27be916e11 Simplify the code a bit
Introduce a small helper function to simplify the code a bit.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-28 12:10:22 +08:00
Yuhang Zhao 68bc4c31ed Cleanup
WinNativeEventFilter:
1. Removed all unused functions and macros.
Win32 API prototypes are not touched because
we may still need them in the future.
2. Don't store data through SetWindowLongPtrW,
using dynamic properties of QWindow instead.
People may rely on GetWindowLongPtrW(hwnd, GWLP_USERDATA)
to do their own work.
3. Some helper functions are removed, such as
moveWindowToDesktopCenter(). You can implement them
yourself. Keep them in the source code will keep
pulling in new dependencies so I have to get rid
of them.
4. Some blocks are removed, such as WM_GETMINMAXIINFO.
It's not needed. You can call Qt's standard API now,
such as setMaximumSize() and setMinimumSize().

FramelessQuickHelper:
1. Removed all functions that can be replaced by Qt's
own API, such as setMaximumSize() and setMinimumSize().
2. Removed helper functions, such as moveWindowToDesktopCenter().
You can implement them yourself. Just few lines of code.

FramelessWindowsManager:
Adapt to the above changes.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-28 11:54:56 +08:00
Yuhang Zhao b601d083bf Fix crash in many cases
Check whether the QWindow is null

Fixes: #37

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-27 18:55:45 +08:00
Yuhang Zhao 84ce2eb418 Simplify the code a bit
There is a type called QObjectList already.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-20 20:52:12 +08:00
Yuhang Zhao 095731d741 Minor improvement.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-20 13:43:02 +08:00
Yuhang Zhao 8e78e275e4 Add a cross-platform frameless window example
Written in pure Qt. Cross-platform.
Lacking the system features on Windows of course.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-19 12:20:11 +08:00
Yuhang Zhao e5cd434500 Simplify style sheet
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-18 16:46:40 +08:00
Yuhang Zhao bd60d9d1d2 Remove the widget and quick dependency for UNIX as well
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-18 12:07:29 +08:00
Yuhang Zhao f258cf3ae4 Fix Qt 5 build
We need the platformwindow.h for Qt5 as well.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-17 15:18:35 +08:00
Yuhang Zhao 137019f7e6 Refactor
Use QWindow pointer on all platforms.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-17 15:08:39 +08:00
Yuhang Zhao 4c65cba578 Update CMakeList file
Adapt to the previous commit.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-11-17 10:58:16 +08:00