VirtualBox

Changeset 28148 in vbox


Ignore:
Timestamp:
Apr 9, 2010 3:41:14 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59879
Message:

FE/Qt4: xtracker 4812: disable focus in/out hack for recent Qt versions

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

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

    r27839 r28148  
    22842284        /* We have to handle XFocusOut right here as this event is not passed
    22852285         * to VBoxConsoleView::event(). Handling this event is important for
    2286          * releasing the keyboard before the screen saver gets active. */
     2286         * releasing the keyboard before the screen saver gets active.
     2287         *
     2288         * See public ticket #3894: Apparently this makes problems with newer
     2289         * versions of Qt and this hack is probably not necessary anymore.
     2290         * So disable it for Qt >= 4.5.0. */
    22872291        case XFocusOut:
    22882292        case XFocusIn:
    22892293            if (isRunning())
    2290                 focusEvent (event->type == XFocusIn);
     2294            {
     2295                if (VBoxGlobal::qtRTVersion() < ((4 << 16) | (5 << 8) | 0))
     2296                    focusEvent (event->type == XFocusIn);
     2297            }
    22912298            return false;
    22922299        case XKeyPress:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r27993 r28148  
    21962196        /* We have to handle XFocusOut right here as this event is not passed
    21972197         * to UIMachineView::event(). Handling this event is important for
    2198          * releasing the keyboard before the screen saver gets active. */
     2198         * releasing the keyboard before the screen saver gets active.
     2199         *
     2200         * See public ticket #3894: Apparently this makes problems with newer
     2201         * versions of Qt and this hack is probably not necessary anymore.
     2202         * So disable it for Qt >= 4.5.0. */
    21992203        case XFocusOut:
    22002204        case XFocusIn:
    22012205            if (uisession()->isRunning())
    2202                 focusEvent(pEvent->type == XFocusIn);
     2206            {
     2207                if (VBoxGlobal::qtRTVersion() < ((4 << 16) | (5 << 8) | 0))
     2208                    focusEvent (pEvent->type == XFocusIn);
     2209            }
    22032210            return false;
    22042211        case XKeyPress:
Note: See TracChangeset for help on using the changeset viewer.

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