diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2011-02-08 10:57:34 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2011-02-08 10:57:34 (GMT) |
commit | eb7958c65b09569c2531d2c443a6d0fe0b507d97 (patch) | |
tree | 91544e4a4cf5c65b3acec7c219ebe63176a14994 /src/gui/kernel/qplatformwindow_qpa.cpp | |
parent | ef998bca70a799806c5754edfa49ea625881bc3e (diff) | |
parent | 44298c848ac254fe1942eb32eed7651dec5bf0e3 (diff) | |
download | Qt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.zip Qt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.tar.gz Qt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.tar.bz2 |
Merge branch 'master-upstream'
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformwindow_qpa.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index 29eaa82..b6b6693 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -41,6 +41,7 @@ #include "qplatformwindow_qpa.h" +#include <QtGui/qwindowsysteminterface_qpa.h> #include <QtGui/qwidget.h> class QPlatformWindowPrivate @@ -171,6 +172,24 @@ void QPlatformWindow::setOpacity(qreal level) } /*! + Reimplement to let Qt be able to request activation/focus for a window + + Some window systems will probably not have callbacks for this functionality, + and then calling QWindowSystemInterface::handleWindowActivated(QWidget *w) + would be sufficient. + + If the window system has some event handling/callbacks then call + QWindowSystemInterface::handleWindowActivated(QWidget *w) when the window system + gives the notification. + + Default implementation calls QWindowSystem::handleWindowActivated(QWidget *w) +*/ +void QPlatformWindow::requestActivateWindow() +{ + QWindowSystemInterface::handleWindowActivated(widget()); +} + +/*! Reimplement to return the glContext associated with the window. */ QPlatformGLContext *QPlatformWindow::glContext() const |