-rw-r--r-- | library/qpeapplication.cpp | 11 | ||||
-rw-r--r-- | library/qpeapplication.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 852671a..b26933b 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -98,16 +98,17 @@ public: { qcopq.setAutoDelete( TRUE ); } int presstimer; QWidget* presswidget; int kbgrabber; + QString kbgrabber_appname; QPoint presspos; bool rightpressed : 1; bool kbregrab : 1; bool notbusysent : 1; bool preloaded : 1; bool forceshow : 1; bool nomaximize : 1; @@ -1059,16 +1060,18 @@ void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data QString who; stream >> who; if ( who.isEmpty() ) d->kbgrabber = 0; else if ( who != d->appName ) d->kbgrabber = 1; else d->kbgrabber = 2; + + d-> kbgrabber_appname = who; } else if ( msg == "language(QString)" ) { if ( type() == GuiServer ) { QString l; stream >> l; QString cl = getenv( "LANG" ); if ( cl != l ) { if ( l.isNull() ) @@ -1619,16 +1622,24 @@ void QPEApplication::removeSenderFromStylusDict() /*! \internal */ bool QPEApplication::keyboardGrabbed() const { return d->kbgrabber; } +/*! + \internal +*/ +QString QPEApplication::keyboardGrabbedBy() const +{ + return d->kbgrabber_appname; +} + /*! Reverses the effect of grabKeyboard(). This is called automatically on program exit. */ void QPEApplication::ungrabKeyboard() { QPEApplicationData * d = ( ( QPEApplication* ) qApp ) ->d; diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 86affa6..f712077 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -29,16 +29,17 @@ #include "qpedecoration_qws.h" #include "timestring.h" class QCopChannel; class QPEApplicationData; class QWSEvent; class QWSKeyEvent; + class QPEApplication : public QApplication { Q_OBJECT public: QPEApplication( int& argc, char **argv, Type=GuiClient ); ~QPEApplication(); static QString qpeDir(); @@ -77,16 +78,17 @@ public: void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); static void showDialog( QDialog*, bool nomax=FALSE ); static int execDialog( QDialog*, bool nomax=FALSE ); static void setKeepRunning(); bool keepRunning() const; bool keyboardGrabbed() const; + QString keyboardGrabbedBy ( ) const; int exec(); signals: void clientMoused(); void timeChanged(); void clockChanged( bool pm ); void micChanged( bool muted ); |