diff options
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 |