GNOME Bugzilla – Bug 687791
detect changes in input device class
Last modified: 2013-01-16 21:27:52 UTC
When I am using my computer with a mouse I expect there to be a mouse pointer visible. When I am not interacting with my computer with a mouse I don't expect there to be a pointer visible. When using a mouse I expect scrolling controls to be designed for that input type. When I'm scrolling using direct manipulation I don't expect there to be scrolling controls designed for mouse input. We probably need a way to tell applications/gtk that the last input event was from a new class of device.
Only showing the pointer when the mouse has been used is something we've been wanting to do for a long time during system startup as well.
*** Bug 666121 has been marked as a duplicate of this bug. ***
Created attachment 228597 [details] [review] slave: don't set busy cursor Let other parts of the stack do cursor handling, since "when to show the cursor?" is no longer a cut and dry question.
Comment on attachment 228597 [details] [review] slave: don't set busy cursor Attachment 228597 [details] pushed as b3bb705 - slave: don't set busy cursor
Current plan is - Make gdm hide the cursor (using XFixes) instead of starting a spinning one until gnome-settings-daemon is up: http://git.gnome.org/browse/gdm/tree/daemon/gdm-slave.c#n527 - g-s-d's cursor plugin is adapted to look at which device has the smallest idle time (using code from bug 682224)
Created attachment 228784 [details] [review] screen: Don't force show a cursor on startup Instead we let gnome-settings-daemon's cursor plugin handle the initial visibility of the cursor.
Comment on attachment 228784 [details] [review] screen: Don't force show a cursor on startup Moved to bug 688228
Created attachment 228864 [details] [review] cursor: Show the cursor only when a mouse gets used - On startup, we're responsible for showing the cursor when the mouse gets moved the first time. - During run-time, when switching to a touchscreen, hide the cursor, and show it again when switching back to the mouse. (Note: in the above text, mouse is a shortcut to "pointer device that isn't a touchscreen, it works just as well for touchpads)
Review of attachment 228864 [details] [review]: ::: plugins/cursor/gsd-cursor-manager.c @@ +77,3 @@ +foreach_screen (GsdCursorManager *manager, + ForeachScreenFunc func, + gpointer user_data) diff would be a little easier to read if this function was introduced in a preliminary refactoring commit (along with changing set_cursor_visibility to use it.) @@ +123,3 @@ + if (gdk_error_trap_pop ()) { + g_warning ("An error occurred trying to %s the cursor", + visible ? "show" : "hide"); You could XGetErrorText here to say what the error is (though doesn't seem that important) @@ +173,3 @@ + monitor); + g_signal_connect (monitor, "became-active", + G_CALLBACK (monitor_became_active), manager); i personally think it would be good to hide the cursor again on triggered-idle. (see bug 666121 comment 4) @@ +213,3 @@ +static void +initialise_root_cursor_foreach (GdkDisplay *display, initialize would be the LANG=C word, not initialise.
Attachment 228864 [details] pushed as 285b0e4 - cursor: Show the cursor only when a mouse gets used