[mutter] frames: Only skip updating prelight when both control and state match



commit a7f083897fb2b5ff2f83e4823ec4bde3b3d9414c
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat May 31 03:30:58 2014 +0200

    frames: Only skip updating prelight when both control and state match
    
    prelit_control is used for both prelight and pressed states, so the early
    return in update_prelit_control() misses the case where prelit_control
    already matches the control we are updating, but its state is PRESSED
    rather than PRELIGHT. Fix the condition to not have pressed controls
    linger around erroneously.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731058

 src/ui/frames.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index e2e160e..e88c704 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1512,7 +1512,8 @@ meta_frames_update_prelit_control (MetaFrames      *frames,
       break;
     }
 
-  if (control == frame->prelit_control)
+  if (control == frame->prelit_control &&
+      frame->button_state == META_BUTTON_STATE_PRELIGHT)
     return;
 
   /* Save the old control so we can unprelight it */


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