After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687791 - detect changes in input device class
detect changes in input device class
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
touch
: 666121 (view as bug list)
Depends on: 682224 688227 688228 688757
Blocks:
 
 
Reported: 2012-11-06 18:03 UTC by William Jon McCann
Modified: 2013-01-16 21:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
slave: don't set busy cursor (3.51 KB, patch)
2012-11-09 17:36 UTC, Ray Strode [halfline]
committed Details | Review
screen: Don't force show a cursor on startup (867 bytes, patch)
2012-11-12 15:59 UTC, Bastien Nocera
none Details | Review
cursor: Show the cursor only when a mouse gets used (16.88 KB, patch)
2012-11-13 10:02 UTC, Bastien Nocera
committed Details | Review

Description William Jon McCann 2012-11-06 18:03:14 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.
Comment 1 William Jon McCann 2012-11-06 18:11:49 UTC
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.
Comment 2 Ray Strode [halfline] 2012-11-06 19:17:32 UTC
*** Bug 666121 has been marked as a duplicate of this bug. ***
Comment 3 Ray Strode [halfline] 2012-11-09 17:36:44 UTC
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 4 Ray Strode [halfline] 2012-11-09 17:37:39 UTC
Comment on attachment 228597 [details] [review]
slave: don't set busy cursor

Attachment 228597 [details] pushed as b3bb705 - slave: don't set busy cursor
Comment 5 Bastien Nocera 2012-11-09 17:39:33 UTC
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)
Comment 6 Bastien Nocera 2012-11-12 15:59:14 UTC
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 7 Bastien Nocera 2012-11-13 10:02:33 UTC
Comment on attachment 228784 [details] [review]
screen: Don't force show a cursor on startup

Moved to bug 688228
Comment 8 Bastien Nocera 2012-11-13 10:02:47 UTC
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)
Comment 9 Ray Strode [halfline] 2012-11-13 20:30:14 UTC
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.
Comment 10 Bastien Nocera 2012-12-14 16:26:13 UTC
Attachment 228864 [details] pushed as 285b0e4 - cursor: Show the cursor only when a mouse gets used