[mutter] MetaCursorTracker: don't ask X to set the cursor visibility to the same value



commit 40163c737cae93aa6c7eac2502b6f84a76a2b6af
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Sep 4 17:44:47 2013 +0200

    MetaCursorTracker: don't ask X to set the cursor visibility to the same value
    
    Apparently, that's a Match error.
    Yay for well designed APIs...

 src/core/meta-cursor-tracker.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/core/meta-cursor-tracker.c b/src/core/meta-cursor-tracker.c
index 7042951..77a9898 100644
--- a/src/core/meta-cursor-tracker.c
+++ b/src/core/meta-cursor-tracker.c
@@ -299,6 +299,10 @@ void
 meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
                                          gboolean           visible)
 {
+  if (visible == tracker->is_showing)
+    return;
+  tracker->is_showing = visible;
+
   if (visible)
     XFixesShowCursor (tracker->screen->display->xdisplay,
                       tracker->screen->xroot);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]