[fxruby-users] SEL_LEFTBUTTONPRESS cause 'autograb' ???

Lyle Johnson lyle at knology.net
Thu Oct 27 20:20:52 EDT 2005


On Oct 27, 2005, at 6:39 PM, Piet Hadermann wrote:

> However, there's something weird bugging me at the moment. I'll use the
> 'fx_button.rb' example to explain things.
>
> I added the following in ButtonWindow.initialize:
>
>     @button.connect(SEL_LEFTBUTTONPRESS) {
>       puts 'lmb pressed'
>     }
>
>     @button.connect(SEL_LEFTBUTTONRELEASE) {
>       puts 'lmb release'
>     }
>
> If I run this, the SEL_LEFTBUTTONPRESS gets handled, but
> SEL_LEFTBUTTONRELEASE doesn't. Also, it seems this causes all events to
> be automatically 'grabbed' to 'button' and I am not able to click any
> other button.

OK, I'm seeing this too and as far as I can tell it's a bug. The button 
is supposed to grab the mouse cursor when the button goes down, and 
then send the SEL_LEFTBUTTONPRESS message to the target (and this is 
happening). But when the button goes up, it's supposed to ungrab and 
then send you SEL_LEFTBUTTONRELEASE (and this is *not* happening).

I'll try to figure out what's wrong and get this fixed ASAP.



More information about the fxruby-users mailing list