Back/forward mouse buttons and GTK+
- From: Olivier Crete <tester tester ca>
- To: gtk-devel-list gnome org
- Subject: Back/forward mouse buttons and GTK+
- Date: Thu, 05 Oct 2006 17:23:40 -0400
Hi,
The current situation with mouses that have back/forward buttons is
pretty bad. GTK+ has no support for them whatsoever and Mozilla has to
hijack the horiz scroll event into them.
Currently, GTK+ routes buttons 6-7 to horiz scroll and Qt does the same.
And its hard coded for both, so I guess that it can't be changed now. We
have to use buttons 8+ for back/forward buttons. I have two differents
ideas on how to handle them and I'd like your input.
1. Let them emit GdkEventButton and have the applications handle them
the way they want. This would require modifying many Gtk+ wigdets that
assumes that if their callback handled buttons 1-2-3, they can return
TRUE so they let the higher numbered events propage upwards.
2. Create a new event type (lets call it GdkEventCommand) that would be
emited by gdk when buttons 8-9 are pressed, and do that deep inside Gdk.
3. Create a GdkEventCommand that would be be configurable from gconf
configurable on X11 (on Win32, there is already a WM_APPCOMMAND event)
and preferably provide reasonable defaults if there is no gconf. And
this new class of events could be generated either by modifying
GdkEvents or by having a early GtkWidget signal handler eat the
GdkEventKey/Button and emit a GdkEventCommand that could be handled
upwards. That would also enable people who have strange keyboards to use
them with Gnome apps.
I'm personally more favorable to the 3rd approach.
--
Olivier Crête
tester tester ca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]