[Gambas-user] no MouseMove() event on GTK

Benoît Minisini g4mba5 at gmail.com
Tue Dec 21 21:01:37 CET 2021


Le 20/12/2021 à 17:34, Bruce Steers a écrit :
> Hi folks.
> 
> Can't figure this one out...
> 
> I've been working on a filemanager with a redesigned IconView like control.
> Hit a roadblock though where my control will not fire the 
> View_MouseMove() event with GTK.
> it's firing View_Draw() as the background image shows from there.
> 
> on qt i can hold left mouse and drag-select multiple icons (the current 
> bit i've been working on) tried on gtk and discovered MouseMove event 
> not happening :(
> 
> on QT it's working as expected but not on either GTKs :(
> 
> Any clues why this might be?
> Many thanks
> BruceS
> 

The GTK+ component bug should have been fixed in the last commits.

The bug was in the Proxy property, that didn't behave the same way in 
GTK+ components.

There are still visible differences in your program: with QT5, the icons 
refresh one by one, with GTK+3 in one shot. Something to study more...

It's useless to set the Proxy property after having set the _Container 
property with the same control. The _Container property already does the 
job (as logically, the real container of your UserContainer should be 
its proxy).

I suggest two things for your program:

- Do not use Picture, use Image everywhere for drawing your icons and 
your backgrounds.

- Paint.TrimText() and Paint.RichTrimText() are very slow. Check that 
with the profiler, and embed these functions into a cache to avoir heavy 
computations at each icon refresh.

Regards,

-- 
Benoît Minisini


More information about the User mailing list