Adapt for building with MinGW and 64-bit
This commit is contained in:
parent
b1d00d0b28
commit
e5a527b5ef
3 changed files with 22 additions and 6 deletions
|
|
@ -36,7 +36,7 @@ void IgnoreAllActivation(not_null<QWidget*> widget) {
|
|||
Assert(handle != nullptr);
|
||||
|
||||
ShowWindow(handle, SW_HIDE);
|
||||
const auto style = GetWindowLong(handle, GWL_EXSTYLE);
|
||||
const auto style = GetWindowLongPtr(handle, GWL_EXSTYLE);
|
||||
SetWindowLong(
|
||||
handle,
|
||||
GWL_EXSTYLE,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,22 @@
|
|||
|
||||
#include <windowsx.h>
|
||||
|
||||
// WM_POINTER support from Windows 8 onwards (WINVER >= 0x0602)
|
||||
#ifndef WM_POINTERUPDATE
|
||||
# define WM_NCPOINTERUPDATE 0x0241
|
||||
# define WM_NCPOINTERDOWN 0x0242
|
||||
# define WM_NCPOINTERUP 0x0243
|
||||
# define WM_POINTERUPDATE 0x0245
|
||||
# define WM_POINTERDOWN 0x0246
|
||||
# define WM_POINTERUP 0x0247
|
||||
# define WM_POINTERENTER 0x0249
|
||||
# define WM_POINTERLEAVE 0x024A
|
||||
# define WM_POINTERACTIVATE 0x024B
|
||||
# define WM_POINTERCAPTURECHANGED 0x024C
|
||||
# define WM_POINTERWHEEL 0x024E
|
||||
# define WM_POINTERHWHEEL 0x024F
|
||||
#endif // WM_POINTERUPDATE
|
||||
|
||||
namespace Ui {
|
||||
namespace Platform {
|
||||
namespace {
|
||||
|
|
@ -197,7 +213,7 @@ void WindowShadow::init(QColor color) {
|
|||
return;
|
||||
}
|
||||
ShadowByHandle.emplace(_handles[i], this);
|
||||
SetWindowLong(_handles[i], GWL_HWNDPARENT, (LONG)_handle);
|
||||
SetWindowLongPtr(_handles[i], GWLP_HWNDPARENT, (LONG)_handle);
|
||||
|
||||
_contexts[i] = CreateCompatibleDC(_screenContext);
|
||||
if (!_contexts[i]) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ bool WindowHelper::NativeFilter::nativeEventFilter(
|
|||
msg->message,
|
||||
msg->wParam,
|
||||
msg->lParam,
|
||||
static_cast<LRESULT*>(result))
|
||||
reinterpret_cast<LRESULT*>(result))
|
||||
: false;
|
||||
}
|
||||
|
||||
|
|
@ -269,7 +269,7 @@ bool WindowHelper::handleNativeEvent(
|
|||
} return false;
|
||||
|
||||
case WM_SHOWWINDOW: {
|
||||
const auto style = GetWindowLong(_handle, GWL_STYLE);
|
||||
const auto style = GetWindowLongPtr(_handle, GWL_STYLE);
|
||||
const auto changes = WindowShadow::Change::Resized
|
||||
| ((wParam && !(style & (WS_MAXIMIZE | WS_MINIMIZE)))
|
||||
? WindowShadow::Change::Shown
|
||||
|
|
@ -375,8 +375,8 @@ void WindowHelper::updateMargins() {
|
|||
GetClientRect(_handle, &r);
|
||||
a = r;
|
||||
|
||||
const auto style = GetWindowLong(_handle, GWL_STYLE);
|
||||
const auto styleEx = GetWindowLong(_handle, GWL_EXSTYLE);
|
||||
const auto style = GetWindowLongPtr(_handle, GWL_STYLE);
|
||||
const auto styleEx = GetWindowLongPtr(_handle, GWL_EXSTYLE);
|
||||
AdjustWindowRectEx(&a, style, false, styleEx);
|
||||
auto margins = QMargins(
|
||||
a.left - r.left,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue