diff options
Diffstat (limited to 'src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h')
| -rw-r--r-- | src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h b/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h index 33554e44..b659a582 100644 --- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h +++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2010 Oracle Corporation + * Copyright (C) 2010-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -24,12 +24,14 @@ #include <QPoint> #include <QMap> #include <QRect> +#include <QPointer> /* GUI includes: */ -#include "UIMachineDefs.h" +#include "UIDefs.h" /* Forward declarations: */ class QWidget; +class QTouchEvent; class UISession; class UIMachineLogic; class UIMachineWindow; @@ -84,6 +86,9 @@ protected slots: /* Mouse pointer-shape-change handler: */ virtual void sltMousePointerShapeChanged(); + /** Activate hovered window if any. */ + void sltMaybeActivateHoveredWindow(); + protected: /* Mouse-handler constructor/destructor: */ @@ -104,6 +109,9 @@ protected: Qt::MouseButtons mouseButtons, int wheelDelta, Qt::Orientation wheelDirection); + /* Separate function to handle incoming multi-touch events: */ + bool multiTouchEvent(QTouchEvent *pTouchEvent, ulong uScreenId); + #ifdef Q_WS_WIN /* This method is actually required only because under win-host * we do not really grab the mouse in case of capturing it: */ @@ -121,6 +129,9 @@ protected: /* Registered machine-view-viewport(s): */ QMap<ulong, QWidget*> m_viewports; + /** Hovered window to be activated. */ + QPointer<QWidget> m_pHoveredWindow; + /* Other mouse variables: */ QPoint m_lastMousePos; QPoint m_capturedMousePos; |
