Re: GDK_2BUTTON_PRESS and GDK_BUTTON_PRESS
- From: Micah Carrick <email micahcarrick com>
- To: gtk-list <gtk-list gnome org>
- Subject: Re: GDK_2BUTTON_PRESS and GDK_BUTTON_PRESS
- Date: Thu, 28 Dec 2006 09:49:52 -0800
In many situations, you wouldn't need to. For example, if the user
double-clicks and icon on the desktop, the first clicks may trigger the
GDK_BUTTON_PRESS events and thus the icon is selected, however, only the
second click triggers GDK_2_BUTTON_PRESS which launches whatever
application handle's that icon. So I wouldn't think you have to worry
about the fact that both handlers are being run.
But if you want the code in the handler for GDK_BUTTON_PRESS to run ONLY
if it's a single click, and to be ignored if it's a double-click, the
only thing I can think of is to set a timeout in the GDK_BUTTON_PRESS
event for some short period of time and then check a flag that is set by
GDK_2BUTTON_PRESS to see if you want to abort the GDK_BUTTON_PRESS.
Doesn't seem like the most elegant solution-- and I'm sure it's not.
Just an idea.
- Micah Carrick
www.micahcarrick.com | www.gtkforums.com
Enrico Sardi wrote:
Hi all!
How can I distinguish between |||GDK_BUTTON_PRESS and a |
<cid:part1.05080504.08050205@tiscali.it>|GDK_2BUTTON_PRESS event?|
<cid:part2.02010409.02050407@tiscali.it>
Many thanks!
Enrico
|| <cid:part2.02010409.02050407@tiscali.it>
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]