GNOME Bugzilla – Bug 690087
shell: Allow using the back button on a mouse to go to the home page
Last modified: 2013-03-26 14:49:06 UTC
See patch. This is a small hidden feature that I find useful.
Created attachment 231332 [details] [review] shell: Allow using the back button on a mouse to go to the home page Just a tiny hidden feature that I've wanted for a while.
Review of attachment 231332 [details] [review]: ::: shell/gnome-control-center.c @@ +1234,3 @@ + /* back button */ + if (event->button == 8) + shell_show_overview_page (self); Your compiler should have shown you a warning here.
Created attachment 231540 [details] [review] shell: Allow using the back button on a mouse to go to the home page Just a tiny hidden feature that I've wanted for a while. Gah. I have no idea how that slipped by.
Review of attachment 231540 [details] [review]: ::: shell/gnome-control-center.c @@ +1234,3 @@ +{ + /* back button */ + if (event->button == 8) Use a #define for the mouse button, eg. MOUSE_BUTTON_BACK @@ +1236,3 @@ + if (event->button == 8) + shell_show_overview_page (self); + return TRUE; I don't think you really tested this. You're eating *all* the mouse release events. @@ +1437,3 @@ g_signal_connect_after (priv->window, "key_press_event", G_CALLBACK (window_key_press_event), self); + g_signal_connect (priv->window, "button-release-event", Any reason for the release button being used instead of the press button? Otherwise you need to trace the origin of the mouse button with things such as enter/leave pairs, etc. Not as simple as key handling.
If we're going to recognize the "back" button on a mouse as a shortcut to show the Settings overview, shouldn't we also accept Alt+Left and XF86Back for this?
(In reply to comment #5) > If we're going to recognize the "back" button on a mouse as a shortcut to show > the Settings overview, shouldn't we also accept Alt+Left and XF86Back for this? Like in bug 691601 you mean? :)
(In reply to comment #6) > > If we're going to recognize the "back" button on a mouse as a shortcut to show > > the Settings overview, shouldn't we also accept Alt+Left and XF86Back for this? > > Like in bug 691601 you mean? :) OK, can we get Alt+Left too? Thanks!
(In reply to comment #7) > (In reply to comment #6) > > > If we're going to recognize the "back" button on a mouse as a shortcut to show > > > the Settings overview, shouldn't we also accept Alt+Left and XF86Back for this? > > > > Like in bug 691601 you mean? :) > > OK, can we get Alt+Left too? Thanks! In bug 681653 comment 7 I explained why we should use it. At least not until we get navigation in the control-center shell (bug 643322)
Committed a fixed version of this to master. Note that some widget are eating the mouse events when they shouldn't, see bug 696640.