It??™s also possible for a client to grab
5.7
5.7 Keyboard and Mouse Grabs 91
the mouse. This is used far more often than may first be apparent; for example, dropdown
menus involve a mouse grab, making everything except the menu insensitive
to mouse clicks. If you click outside of the menu, the menu code will release the grab
and remove the menu. Mouse grabs are also used for modal dialogs that grab the
entire screen (but not for modal dialogs that do not interfere with other applications);
for example, when logging out of KDE or GNOME, a confirmation dialog is
presented to the user, which takes precedence over all other activity??”all keystrokes
and mouse activity is processed by the confirmation dialog. This forces the user to
deal with the confirmation dialog before performing any other task.
Keyboard grabbing presents a security risk, because an application could use a grab
to receive keystrokes it otherwise wouldn??™t. This is potentially a concern when entering
passwords or PIN numbers into applications.
The xterm terminal program (Section 7.4) provides a Secure Keyboard feature that
can be used to defend against this type of attack. It ensures that you are typing into
the xterm window and that no other application can access your keystrokes.
Pages:
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167