Re: Ad-on hook idea (fwd)
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: Ad-on hook idea (fwd)
- Date: 21 Nov 1999 11:23:34 -0500
redhog@mini.dhs.org writes:
> When it comes to the wheel-scrolling thing, I have a little problem - I
> want _every_ button press/move/release that vis not used for something
> else for a the widget inside the scrolledwindow widget, to scroll the
> scrolledwindow widget. But I don't know how to get the knowledge of if
> some event has been used allready. If someone could help me with this, I
> would be ready with such a module in a few days!
FWIW, to deal with this problem, the existing mouse-wheel support
catches the scroll button events _before_ they are handled by anything
else. Search for 'scrollwheel' in gtkmain.c.
It isn't possible to add such a possibility in any sane way right now
from a module, though perhaps we should add generic "event snoopers"
like the key snoopers we have now.
So, two points:
 - I considered the left-over-mouse even approach before implementing
   the current mechanism and decided it wasn't useful.
 - A module that redirects left-over scrollwheel events to
   the relevant scrolled window would be rather useless, since
   GTK+ already will have sucked out all scrollwheel events
   that have a relevant scrolledwindow and sent them there
   before any other event processing happens.
I haven't tested the scrollwheel code recently, but when I
wrote it, I rebound my mouse to simulate the events and it
seemed to work.
Regards,
                                        Owen
[ Also, some people have suggested converting the button
  4-5 presses to a separate scrollwheel event at the GDK
  level for GTK+-1.4, which makes some sense to me,
  assuming that scrollwheel mice are here to stay. ] 
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]