[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]ChecBox & DrawCheckBox

From: Rhys Weatherley
Subject: Re: [DotGNU]ChecBox & DrawCheckBox
Date: Fri, 20 Jun 2003 21:09:26 +1000
User-agent: KMail/1.4.3

On Friday 20 June 2003 08:54 pm, address@hidden wrote:
> > With fluxbox is very strange. Right and third button(and wheel) give
> >
> > correct behaviour while the left button when pushed raise also
> >
> > MouseEnter and MouseLeave.
> Same here ... in fluxbox , I was getting mouse leave on clicks ...

Hmmm ... I need to do some further experimentation, but it may be just X's 
general weirdness coming into play here.

Some windows managers trap mouse clicks with a mechanism called a "passive 
button grab" to implement "click to raise" functionality.  This gives the 
window manager first crack at a mouse message before it is replayed to the 
application.  What we may be seeing is this:

- a mouse click occurs
- the passive grab in the window manager gets it, causing a "Leave" on
  the application's window and an "Enter" on the window manager's
  grab window.
- the window manager decides that the click isn't for it and replays it to
  the application, causing a "Leave" on the grab window and an "Enter"
  on the application's window.
- the mouse click is delivered to the application normally.

This may explain the odd Leave/Enter/Down behaviour, especially in the case 
where it was odd for the left button, but not the right or middle buttons 
(the passive grab was probably only on the left button).

If this is what is happening, then it is probably possible to subtract out the 
effect of the passive grab using some trickery with the "mode" and "detail" 
members in the LeaveNotify and EnterNotify events.  I'll do some research 
into other X toolkits and see how they handle this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]