~phablet-team/qtubuntu/trunk

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/input.h

  • Committer: Bileto Bot
  • Author(s): Nick Dedekind
  • Date: 2016-09-28 10:51:37 UTC
  • mfrom: (342.1.4 qtubuntu)
  • Revision ID: ci-train-bot@canonical.com-20160928105137-97rqdqh6zfb5ts56
Moved focus handling to UbuntuWindow to ensure focus optimization supports multiple windows rather than being application global. (LP: #1623861)

Approved by: Daniel d'Andrada, Unity8 CI Bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
// Qt
21
21
#include <qpa/qwindowsysteminterface.h>
22
 
#include <QAtomicInt>
23
22
#include <QLoggingCategory>
24
23
 
25
24
#include <mir_toolkit/mir_client_library.h>
40
39
 
41
40
    void postEvent(UbuntuWindow* window, const MirEvent *event);
42
41
    UbuntuClientIntegration* integration() const { return mIntegration; }
43
 
    UbuntuWindow *lastFocusedWindow() const {return mLastFocusedWindow; }
 
42
    UbuntuWindow *lastInputWindow() const {return mLastInputWindow; }
44
43
 
45
44
protected:
46
45
    void dispatchKeyEvent(UbuntuWindow *window, const MirInputEvent *event);
58
57
    const QByteArray mEventFilterType;
59
58
    const QEvent::Type mEventType;
60
59
 
61
 
    UbuntuWindow *mLastFocusedWindow;
62
 
    QAtomicInt mPendingFocusGainedEvents;
 
60
    UbuntuWindow *mLastInputWindow;
63
61
};
64
62
 
65
63
#endif // UBUNTU_INPUT_H