-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: | |||
98 | 98 | ||
99 | { | 99 | { |
100 | qcopq.setAutoDelete( TRUE ); | 100 | qcopq.setAutoDelete( TRUE ); |
101 | } | 101 | } |
102 | 102 | ||
103 | int presstimer; | 103 | int presstimer; |
104 | QWidget* presswidget; | 104 | QWidget* presswidget; |
105 | int kbgrabber; | 105 | int kbgrabber; |
106 | QString kbgrabber_appname; | ||
106 | QPoint presspos; | 107 | QPoint presspos; |
107 | 108 | ||
108 | bool rightpressed : 1; | 109 | bool rightpressed : 1; |
109 | bool kbregrab : 1; | 110 | bool kbregrab : 1; |
110 | bool notbusysent : 1; | 111 | bool notbusysent : 1; |
111 | bool preloaded : 1; | 112 | bool preloaded : 1; |
112 | bool forceshow : 1; | 113 | bool forceshow : 1; |
113 | bool nomaximize : 1; | 114 | bool nomaximize : 1; |
@@ -1059,16 +1060,18 @@ void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data | |||
1059 | QString who; | 1060 | QString who; |
1060 | stream >> who; | 1061 | stream >> who; |
1061 | if ( who.isEmpty() ) | 1062 | if ( who.isEmpty() ) |
1062 | d->kbgrabber = 0; | 1063 | d->kbgrabber = 0; |
1063 | else if ( who != d->appName ) | 1064 | else if ( who != d->appName ) |
1064 | d->kbgrabber = 1; | 1065 | d->kbgrabber = 1; |
1065 | else | 1066 | else |
1066 | d->kbgrabber = 2; | 1067 | d->kbgrabber = 2; |
1068 | |||
1069 | d-> kbgrabber_appname = who; | ||
1067 | } | 1070 | } |
1068 | else if ( msg == "language(QString)" ) { | 1071 | else if ( msg == "language(QString)" ) { |
1069 | if ( type() == GuiServer ) { | 1072 | if ( type() == GuiServer ) { |
1070 | QString l; | 1073 | QString l; |
1071 | stream >> l; | 1074 | stream >> l; |
1072 | QString cl = getenv( "LANG" ); | 1075 | QString cl = getenv( "LANG" ); |
1073 | if ( cl != l ) { | 1076 | if ( cl != l ) { |
1074 | if ( l.isNull() ) | 1077 | if ( l.isNull() ) |
@@ -1619,16 +1622,24 @@ void QPEApplication::removeSenderFromStylusDict() | |||
1619 | /*! | 1622 | /*! |
1620 | \internal | 1623 | \internal |
1621 | */ | 1624 | */ |
1622 | bool QPEApplication::keyboardGrabbed() const | 1625 | bool QPEApplication::keyboardGrabbed() const |
1623 | { | 1626 | { |
1624 | return d->kbgrabber; | 1627 | return d->kbgrabber; |
1625 | } | 1628 | } |
1626 | 1629 | ||
1630 | /*! | ||
1631 | \internal | ||
1632 | */ | ||
1633 | QString QPEApplication::keyboardGrabbedBy() const | ||
1634 | { | ||
1635 | return d->kbgrabber_appname; | ||
1636 | } | ||
1637 | |||
1627 | 1638 | ||
1628 | /*! | 1639 | /*! |
1629 | Reverses the effect of grabKeyboard(). This is called automatically | 1640 | Reverses the effect of grabKeyboard(). This is called automatically |
1630 | on program exit. | 1641 | on program exit. |
1631 | */ | 1642 | */ |
1632 | void QPEApplication::ungrabKeyboard() | 1643 | void QPEApplication::ungrabKeyboard() |
1633 | { | 1644 | { |
1634 | QPEApplicationData * d = ( ( QPEApplication* ) qApp ) ->d; | 1645 | 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 @@ | |||
29 | #include "qpedecoration_qws.h" | 29 | #include "qpedecoration_qws.h" |
30 | #include "timestring.h" | 30 | #include "timestring.h" |
31 | 31 | ||
32 | class QCopChannel; | 32 | class QCopChannel; |
33 | class QPEApplicationData; | 33 | class QPEApplicationData; |
34 | class QWSEvent; | 34 | class QWSEvent; |
35 | class QWSKeyEvent; | 35 | class QWSKeyEvent; |
36 | 36 | ||
37 | |||
37 | class QPEApplication : public QApplication | 38 | class QPEApplication : public QApplication |
38 | { | 39 | { |
39 | Q_OBJECT | 40 | Q_OBJECT |
40 | public: | 41 | public: |
41 | QPEApplication( int& argc, char **argv, Type=GuiClient ); | 42 | QPEApplication( int& argc, char **argv, Type=GuiClient ); |
42 | ~QPEApplication(); | 43 | ~QPEApplication(); |
43 | 44 | ||
44 | static QString qpeDir(); | 45 | static QString qpeDir(); |
@@ -77,16 +78,17 @@ public: | |||
77 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); | 78 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); |
78 | static void showDialog( QDialog*, bool nomax=FALSE ); | 79 | static void showDialog( QDialog*, bool nomax=FALSE ); |
79 | static int execDialog( QDialog*, bool nomax=FALSE ); | 80 | static int execDialog( QDialog*, bool nomax=FALSE ); |
80 | 81 | ||
81 | static void setKeepRunning(); | 82 | static void setKeepRunning(); |
82 | bool keepRunning() const; | 83 | bool keepRunning() const; |
83 | 84 | ||
84 | bool keyboardGrabbed() const; | 85 | bool keyboardGrabbed() const; |
86 | QString keyboardGrabbedBy ( ) const; | ||
85 | 87 | ||
86 | int exec(); | 88 | int exec(); |
87 | 89 | ||
88 | signals: | 90 | signals: |
89 | void clientMoused(); | 91 | void clientMoused(); |
90 | void timeChanged(); | 92 | void timeChanged(); |
91 | void clockChanged( bool pm ); | 93 | void clockChanged( bool pm ); |
92 | void micChanged( bool muted ); | 94 | void micChanged( bool muted ); |