summaryrefslogtreecommitdiff
authorsandman <sandman>2002-12-17 00:20:01 (UTC)
committer sandman <sandman>2002-12-17 00:20:01 (UTC)
commit70090722d240bed8c390281e072c9bcfc5ba7782 (patch) (side-by-side diff)
tree453b4715acff74889655877a491c6cc3791d5de0
parent79b94019014efe998b126219827f3050395beea7 (diff)
downloadopie-70090722d240bed8c390281e072c9bcfc5ba7782.zip
opie-70090722d240bed8c390281e072c9bcfc5ba7782.tar.gz
opie-70090722d240bed8c390281e072c9bcfc5ba7782.tar.bz2
small additions to support grabbing the buttons back from a crashed
application
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp11
-rw-r--r--library/qpeapplication.h2
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
@@ -102,8 +102,9 @@ public:
int presstimer;
QWidget* presswidget;
int kbgrabber;
+ QString kbgrabber_appname;
QPoint presspos;
bool rightpressed : 1;
bool kbregrab : 1;
@@ -1063,8 +1064,10 @@ void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data
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;
@@ -1623,8 +1626,16 @@ 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.
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 86affa6..f712077 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -33,8 +33,9 @@ class QCopChannel;
class QPEApplicationData;
class QWSEvent;
class QWSKeyEvent;
+
class QPEApplication : public QApplication
{
Q_OBJECT
public:
@@ -81,8 +82,9 @@ public:
static void setKeepRunning();
bool keepRunning() const;
bool keyboardGrabbed() const;
+ QString keyboardGrabbedBy ( ) const;
int exec();
signals: