Re: [Tk] Double, Triple, Quadruple, <i><d><d><q><d>



Sektor van Skijlen <ethouris@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:


During reading about events in Tk, I found an interresting thing.

The "double mouse click" is implemented with a generic mechanism, that is, not
only double and not only mouse click. I can even bind an event to an
immportal's password in DOOM by using <i><d><d><q><d> as the event specifier.
Great. :) However, in order to be treated as one event, the time interval
between sub-events must not exceed some specified value.

But window system managers have their own settings about the time between two
mouse clicks to be still treated as a double-click.

So, my question is: where is the time interval for these events taken from on
particular systems? Is that taken from, for example, double-mouse-click
interval settings on Windows? What about other window-systems, like KDE? If
not, where is it taken from?

The Tk bind facility is largely modeled on a similar facility in X,
namely the Xt Translation Manager. But not exactly :)

Your example of bind . <i><d><d><q><d> { whatever } does not involve
any timers: it works pretty much as in DOOM.

For mouse clicks, you do have timers, but only for the Double- etc
events.

In X, the time interval between multi-clicks is a property of the
application. Different apps can use different values, although that
is almost surely a bad idea. A default value to use can be
distributed through the X resource system using the "multiClickTime"
resource.

Tk processes X resources, but does not act on multiClickTime.
Instead, for all platforms it uses 500 ms. You can't change this
value.

.



Relevant Pages

  • Re: kern/149306: commit references a PR
    ... Reimplement how PCI-PCI bridges manage their I/O windows. ... but the driver relied on the firmware to initialize ... This is implemented by allocating a bus resource for each I/O window from ...
    (freebsd-net)
  • Changing how PCI-PCI bridges do resource allocation
    ... I/O resource windows. ... I/O window when growing is required. ... some machines' BIOS clearing the I/O windows on some PCI-PCI bridges when ACPI ...
    (freebsd-arch)
  • Re: Multithreaded IntPtr Hdc problem - Common or obscure error?
    ... Hello James, ... is probably due to two threads trying to use the same resource. ... If the window grabbing is fast enough that a dropped "frame" is not ... > int usedHeight = rect.Height; ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Multiple source on single task
    ... Good morning Julie, ... Ok, I'm on that window. ... I have the "Clear leveling values before leveling" checked ... I hit the "Level Now" button for the selected resource and it fixed it. ...
    (microsoft.public.project)
  • Re: [patch 2/5] Staging: vme: add VME userspace driver
    ... The core, or a layer above it, can control how those resources are used. ... So it's foolish to have a generic USB layer, or a generic PCI layer or generic "name you bus here" layer? ... What about a driver only needed to access CR/CSR space, then utilized a DMA controller to transfer data over the VME bus (thereby not requiring a master or slave window). ... we just share the 'resource management' code among those, ...
    (Linux-Kernel)