Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.windows.x Frequently Asked Questions (FAQ) 7/7
Section - 192) How do I get a double-click in Xlib?

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Counties ]


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?
See reader questions & answers on this topic! - Help others by sharing your knowledge

	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]

User Contributions:

Comment about this article, ask questions, or add new information about this topic:




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 March 27 2014 @ 02:12 PM