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 id16985
push userdgottwald@mozilla.com
push dateTue, 16 Nov 2010 09:22:31 +0000
treeherdermozilla-central@a42e9b001bc8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs608984
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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();