The only real difference is that when
the data is advertised through the X server, selected data??”used for
middle mouse paste??”is tagged as being the PRIMARY selection,
while data that has been cut or copied to the clipboard is tagged as
being the CLIPBOARD selection. (Yes, there is also a SECONDARY
selection, but it??™s almost never used.)
5.6 Keyboard Focus
Most modern GUIs (whether X-based or not) use a click-to-focus policy: to connect
the keyboard to a window, click on it. The window that currently has focus is indicated
by a different titlebar or window border.
But as with everything else, X provides mechanism but not policy. In this case, the
policy is enforced by the window manager.
The alternative to click-to-focus is focus-follows-pointer: whichever window is under
the pointer receives focus. This policy is the default for twm and is a configurable
option under many window managers. It??™s also the default when no window manager
is active, so if you??™re experimenting with running clients directly on a raw X
server (Section 2.3), you??™ll need to keep one eye on the mouse cursor when typing.
5.7 Keyboard and Mouse Grabs
Instead of using focus to get data from the keyboard, an application can grab the
keyboard, receiving all keystrokes that are typed.
Pages:
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166