From 70090722d240bed8c390281e072c9bcfc5ba7782 Mon Sep 17 00:00:00 2001 From: sandman Date: Tue, 17 Dec 2002 00:20:01 +0000 Subject: small additions to support grabbing the buttons back from a crashed application --- diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 852671a..b26933b 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -103,6 +103,7 @@ public: int presstimer; QWidget* presswidget; int kbgrabber; + QString kbgrabber_appname; QPoint presspos; bool rightpressed : 1; @@ -1064,6 +1065,8 @@ void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data d->kbgrabber = 1; else d->kbgrabber = 2; + + d-> kbgrabber_appname = who; } else if ( msg == "language(QString)" ) { if ( type() == GuiServer ) { @@ -1624,6 +1627,14 @@ 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 diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 86affa6..f712077 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -34,6 +34,7 @@ class QPEApplicationData; class QWSEvent; class QWSKeyEvent; + class QPEApplication : public QApplication { Q_OBJECT @@ -82,6 +83,7 @@ public: bool keepRunning() const; bool keyboardGrabbed() const; + QString keyboardGrabbedBy ( ) const; int exec(); -- cgit v0.9.0.2