forked from github_mirror/framelesshelper
Revert "fix multiple issues found by user"
This reverts commit c0ce7b0f48
.
Reason for revert: the fix is totally wrong, as it's trying
to fix a bug which never exists, what's worse, the wrong fix
itself is also causing critical regressions. so revert it immediately.
But the QMake modifications are correct and necessary, so don't
revert that part.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
c0ce7b0f48
commit
e77a2db663
|
@ -38,7 +38,6 @@
|
||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
#include <QtGui/qpalette.h>
|
#include <QtGui/qpalette.h>
|
||||||
#include <QtWidgets/qwidget.h>
|
#include <QtWidgets/qwidget.h>
|
||||||
#include <QtWidgets/qapplication.h>
|
|
||||||
#include <framelessmanager.h>
|
#include <framelessmanager.h>
|
||||||
#include <framelessconfig_p.h>
|
#include <framelessconfig_p.h>
|
||||||
#include <utils.h>
|
#include <utils.h>
|
||||||
|
@ -553,7 +552,7 @@ bool FramelessWidgetsHelperPrivate::isInSystemButtons(const QPoint &pos, SystemB
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FramelessWidgetsHelperPrivate::isInTitleBarDraggableArea(const QPoint &localPos) const
|
bool FramelessWidgetsHelperPrivate::isInTitleBarDraggableArea(const QPoint &pos) const
|
||||||
{
|
{
|
||||||
const WidgetsHelperData data = getWindowData();
|
const WidgetsHelperData data = getWindowData();
|
||||||
if (!data.titleBarWidget) {
|
if (!data.titleBarWidget) {
|
||||||
|
@ -598,14 +597,7 @@ bool FramelessWidgetsHelperPrivate::isInTitleBarDraggableArea(const QPoint &loca
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!region.contains(localPos)) {
|
return region.contains(pos);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const QPoint globalPos = m_window->mapToGlobal(localPos);
|
|
||||||
// Don't move the window if the user is dragging something above the title bar widget,
|
|
||||||
// according to the Qt documentation, QApplication::widgetAt() can be slow, but we really
|
|
||||||
// can't avoid calling it here.
|
|
||||||
return (QApplication::widgetAt(globalPos) == data.titleBarWidget);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FramelessWidgetsHelperPrivate::shouldIgnoreMouseEvents(const QPoint &pos) const
|
bool FramelessWidgetsHelperPrivate::shouldIgnoreMouseEvents(const QPoint &pos) const
|
||||||
|
|
Loading…
Reference in New Issue