mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
[TabPreviews] Only hide preview on LeaveEvent when cursor is outside tabbar.
For some reason, tabbar receives first leave event (after first preview is shown) even when cursor is inside tabbar rect, which leads to this first tab preview being shown -> hidden and then again shown.
This commit is contained in:
parent
1b3c9e38ea
commit
e78e0fe498
@ -494,7 +494,7 @@ void TabBar::showTabPreview(bool delayed)
|
||||
{
|
||||
if (delayed) {
|
||||
int index = tabAt(mapFromGlobal(QCursor::pos()));
|
||||
if (index == -1 || QApplication::mouseButtons()) {
|
||||
if (index == -1 || QApplication::mouseButtons() != Qt::NoButton) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -653,7 +653,9 @@ bool TabBar::event(QEvent* event)
|
||||
{
|
||||
switch (event->type()) {
|
||||
case QEvent::Leave:
|
||||
if (!rect().contains(mapFromGlobal(QCursor::pos()))) {
|
||||
hideTabPreview();
|
||||
}
|
||||
break;
|
||||
|
||||
case QEvent::Wheel:
|
||||
|
Loading…
Reference in New Issue
Block a user