Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is GrabModeAsync in X11 Applications

Status
Not open for further replies.

javabeanx

Programmer
Apr 29, 2002
10
IN
Whenever we perform XGrabKeyboard or XGrabPointer
we can specify it using GrabModeAsync or GrabModeSync
I did not not understand what the man pages were trying to say .
Can you please explain it in a better way
 
This comes out off XLIB programming manual volume one.
p316. isbn 1-56592-002-3
Without a doubt the best book when it comes to
X-programming.
----------------------------------------------------------

If the value GrabModeAsync is used,then event processing for the grabbed device is asynchronous,as usual. That is, the Server processes and sends all grabbed events to the grabbing client as soon as they occur. Note that all ungrabbed events (e.g. Expose) are processed and sent normally.
If GrabModeAsync is used then,when the grab occurs,the Server records raw device events in an internal queue,but temporarily stops processing and sending them to the grabbing client. The Server resumes raw event processing when the grabbing client sends either an XAllowEvents() request or an ungrab request.

Using GrabModeSync is often referred to as freezing the keyboard or pointer. This term is the source of some confusion since GrabModeSync does not freeze (lockup) the pointer or keyboard themselves in any intuitive sense. One would guess that if the pointer or keyboard were "frozen", then using them would have no effect. In fact,use of the pointer and keyboard during a freeze continues to generate raw events which are recorded (but not processed or send) by the Server....

----------------------------------------------------------

Hope this helps.

Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top