[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page

Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 191) How do I make text and bitmaps blink in X?
Next Document: 193) How do I render rotated text?


192) How do I get a double-click in Xlib?



	Users of Xt have the support of the translation manager to help 
get notification of double-clicking.
	There is no good way to get only a double-click in Xlib, because the 
protocol does not provide enough support to do double-clicks.  You have to do 
client-side timeouts, unless the single-click action is such that you can defer
actually taking it until you next see an event from the server.  Thus, you 
have to do timeouts, which means system-dependent code.  On most UNIXish 
implementations, you can use XConnectionNumber to get the file descriptor of 
the X connection and then use select() or something similar on that.
	Note that many user-interface references suggest that a double-click
be used to extend the action indicated by a single-click; if this is the case
in your interface then you can execute the first action and as a compromise
check the timestamp on the second event to determine whether it, too, should
be the single-click action or the double-click action.

[Thanks to mouse@larry.mcrcim.mcgill.edu (der Mouse), 4/93]



Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 191) How do I make text and bitmaps blink in X?
Next Document: 193) How do I render rotated text?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
faq%craft@uunet.uu.net (X FAQ maintenance address)

Last Update October 22 2009 @ 05:36 AM

Some parts © 2009 Advameg, Inc.