Bug 608984 - Minimize, maximize/restore, close buttons shouldn't have a hover effect. r=jimm
authorDão Gottwald <dao@mozilla.com>
Tue, 16 Nov 2010 10:15:24 +0100
changeset 57568 ecd854d4b939686100e7d86e86fa4ceddaf29e59
parent 57567 db24505d74e9fcedb413c2bf0f674b00ab8513c5
child 57569 b0ef3f1aabb2a7340ee845d8b6411430674da73f
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersjimm
bugs608984
milestone2.0b8pre
Bug 608984 - Minimize, maximize/restore, close buttons shouldn't have a hover effect. r=jimm
widget/src/windows/nsNativeThemeWin.cpp
--- a/widget/src/windows/nsNativeThemeWin.cpp
+++ b/widget/src/windows/nsNativeThemeWin.cpp
@@ -151,21 +151,19 @@ static PRInt32 GetWindowFrameButtonState
       return mozilla::widget::themeconst::BS_PUSHED;
     return mozilla::widget::themeconst::BS_HOT;
   }
   return mozilla::widget::themeconst::BS_NORMAL;
 }
 
 static PRInt32 GetClassicWindowFrameButtonState(nsEventStates eventState)
 {
-  if (eventState.HasState(NS_EVENT_STATE_HOVER)) {
-    if (eventState.HasState(NS_EVENT_STATE_ACTIVE))
-      return DFCS_BUTTONPUSH|DFCS_PUSHED; 
-    return DFCS_BUTTONPUSH|DFCS_HOT;
-  }
+  if (eventState.HasState(NS_EVENT_STATE_ACTIVE) &&
+      eventState.HasState(NS_EVENT_STATE_HOVER))
+    return DFCS_BUTTONPUSH|DFCS_PUSHED;
   return DFCS_BUTTONPUSH;
 }
 
 static void QueryForButtonData(nsIFrame *aFrame)
 {
   if (nsUXThemeData::sTitlebarInfoPopulatedThemed && nsUXThemeData::sTitlebarInfoPopulatedAero)
     return;
   nsIWidget* widget = aFrame->GetNearestWidget();