forked from github_mirror/framelesshelper
parent
d94f8221d3
commit
059b8d7982
|
@ -115,7 +115,7 @@ bool FramelessHelperQt::eventFilter(QObject *object, QEvent *event)
|
|||
}
|
||||
const Options options = g_qtHelper()->options.value(window);
|
||||
g_qtHelper()->mutex.unlock();
|
||||
if (Utils::isWindowFixedSize(window) || (options & Option::DisableResizing)) {
|
||||
if (Utils::isWindowFixedSize(window)) {
|
||||
return false;
|
||||
}
|
||||
const auto mouseEvent = static_cast<QMouseEvent *>(event);
|
||||
|
|
|
@ -473,7 +473,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
|||
// another branch, if you are interested in it, you can give it a
|
||||
// try.
|
||||
|
||||
if (Utils::isWindowFixedSize(window) || (options & Option::DisableResizing)) {
|
||||
if (Utils::isWindowFixedSize(window)) {
|
||||
*result = HTCLIENT;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,10 @@ bool Utils::isWindowFixedSize(const QWindow *window)
|
|||
if (!window) {
|
||||
return false;
|
||||
}
|
||||
const auto options = qvariant_cast<Options>(window->property(kInternalOptionsFlag));
|
||||
if (options & Option::DisableResizing) {
|
||||
return true;
|
||||
}
|
||||
if (window->flags() & Qt::MSWindowsFixedSizeDialogHint) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -520,8 +520,8 @@ void Utils::showSystemMenu(const QWindow *window, const QPoint &pos)
|
|||
return true;
|
||||
};
|
||||
const bool maxOrFull = (IsMaximized(hWnd) || isFullScreen(reinterpret_cast<WId>(hWnd)));
|
||||
const bool fixedSize = isWindowFixedSize(window);
|
||||
const auto options = qvariant_cast<Options>(window->property(kInternalOptionsFlag));
|
||||
const bool fixedSize = (isWindowFixedSize(window) || (options & Option::DisableResizing));
|
||||
if (!setState(SC_RESTORE, (maxOrFull && !fixedSize), true)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue