1. Use native frame color in the MainWindow example, just like the Widget example. Fixes#87
2. Rename setHitTestVisibleInChrome() to setHitTestVisible(): This name was taken from Microsoft's WindowChrome class in WPF. Now they removed the legacy "Chrome" suffix in their new products, so we removed it as well.
3. Fix build with Qt older than 5.15: Q_NAMESPACE_EXPORT was introduced in Qt 5.14
4. Removed code that supports native frame: they are just leftovers of the previous refactoring.
4. Correctly detect SetWindowLongPtrW() and GetWindowLongPtrW() 's operation result: they won't modify the Last Error state on success, so we have to set Last Error state to ERROR_SUCCESS before calling them to make sure we get the correct error code.
5. Remove implicitly conversions, use explicit casts where possible
6. Fixed FormatMessage() usage, correctly retrieve the error message: According to MSDN, we should pass the address of a LPWSTR, not the LPWSTR itself.
7. Removed the special handing of WM_SIZE: It turns out that this handling is not needed at all and it's causing new issues, so just remove it.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Remove compiler specific flags
2. Build shared library by default
3. Remove unused functions
4. Minor tweaks of some internal logic, the final behavior is not affected
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Also rename some leftovers to more appropriate names
2. Be more verbose to help debugging
TODO: improve widget example, make use of the these functions
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Fix that bug
2. Some adjustments of the variable names to make them more clear
3. Some tweaks to the title bar height value
TODO: Add a button to switch between fullscreen and windowed mode for the widget example
TODO: Add a title text to the widget example
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. Fix compilation error for QMake.
2. Fix some warning messages are in the wrong place.
3. Fix the IActiveDesktop can't get wallpaper.
4. Other minor tweaks.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
1. QScopedPointer's get() function was introduced in Qt 5.11, too new, don't use it, use data() instead. They are the same.
2. Fixed a typo.
3. Use QGuiApplication::isRightToLeft() to simplify the code.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>