1. Remove window handle from WINDOW, it's useless now.
2. Rename variables in WINDOWDATA to match their real usage.
3. Do not enable layered window by default, it's causing problems.
4. Add a progress bar to the QQPlayer example.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
If a window is in fullscreen mode, it should not have a title bar.
Maybe a rare use case, but better than nothing.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
Restoring window styles to default will break Qt Quick applications.
The QWindow will disappear once we do it.
Qt Widgets applications are not affected.
Don't know why currently.
Disable it by default because it's not something we must do.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Use const more.
2. Add some missing ResolveWin32APIs() call
3. Move updateQtFrame to WinNativeEventFilter
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
The ignore and draggable areas/objects are limited in the title bar area only.
There's no need to judge them outside the title bar area.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Use Qt functions instead of STL functions.
2. Add a comment explain the XXPtr functions.
3. Remove D2D usage. Using GetDeviceCaps is fine.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Add more comments.
2. Add a function to change window geometry through Win32 API/
3. Add a function to move the window to the center of the desktop.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
The window will flash when maximizing and restoring (the whole will become totally transparent at that moment, and after it has been maximized or restored, it will become not transparent again).
Caused by passing negative values to DwmExtendFrameIntoClientArea.
Fixes: #4
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
We will use the original solution in this branch.
The new Windows Terminal solution will be in another branch.
Partially reverts commit 01707907cd
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
Don't remove the window frame totally, only remove the title bar instead
(including the top border).
We can resize outside our window just like any other normal window in
this way. And many strange problems caused by the removal of window
frame are gone such as background flicker.
However, we will need to paint the top frame border ourself. Otherwise
the window doesn't look very good.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>