Bug 621931 - Widget Qt scrolling is slow because of non optimized SetCursor. r=dougt a=approval2.0
authorOleg Romashin <romaxa@gmail.com>
Wed, 29 Dec 2010 18:22:26 +0200
changeset 59841 a7d7ed0cda707393db783d2733c8ae0ccfa41643
parent 59840 f09c19a9fff99610398a29229406e1440bd8e830
child 59842 6e9e376c146bb6c7e0d837595f7297a37f592fbd
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdougt, approval2
bugs621931
milestone2.0b9pre
Bug 621931 - Widget Qt scrolling is slow because of non optimized SetCursor. r=dougt a=approval2.0
widget/src/qt/nsWindow.cpp
--- a/widget/src/qt/nsWindow.cpp
+++ b/widget/src/qt/nsWindow.cpp
@@ -680,16 +680,19 @@ NS_IMETHODIMP
 nsWindow::SetBackgroundColor(const nscolor &aColor)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsWindow::SetCursor(nsCursor aCursor)
 {
+    if (mCursor == aCursor)
+        return NS_OK;
+
     mCursor = aCursor;
     if (mWidget)
         mWidget->SetCursor(mCursor);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindow::SetCursor(imgIContainer* aCursor,