VirtualBox

Changeset 64636 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 10, 2016 3:19:51 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:5978: Workaround for UIMiniToolBar which allows to avoid unwanted hiding because of Qt 5.6.1 for X11 bug about automatic mouse-leave event on screen borders; Besides that, this is a good way to keep the tool-bar visible while the mouse is moving through the desktop strut till the real screen border.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r64635 r64636  
    813813void UIMiniToolBar::leaveEvent(QEvent*)
    814814{
     815    // WORKAROUND:
     816    // No idea why, but GUI receives mouse leave event
     817    // when the mouse cursor is on the border of screen
     818    // even if underlying widget is on the border of
     819    // screen as well, we should detect and ignore that.
     820    // Besides that, this is a good way to keep the
     821    // tool-bar visible when the mouse moving through
     822    // the desktop strut till the real screen border.
     823    const QPoint cursorPosition = QCursor::pos();
     824    if (   cursorPosition.y() <= y() + 1
     825        || cursorPosition.y() >= y() + height() - 1)
     826        return;
     827
    815828    /* Stop the hover-enter timer if necessary: */
    816829    if (m_pHoverEnterTimer && m_pHoverEnterTimer->isActive())
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette