[haiku-commits] r39707 - haiku/trunk/src/servers/app

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 2 Dec 2010 21:51:39 +0100 (CET)

Author: czeidler
Date: 2010-12-02 21:51:38 +0100 (Thu, 02 Dec 2010)
New Revision: 39707
Changeset: http://dev.haiku-os.org/changeset/39707
Ticket: http://dev.haiku-os.org/ticket/6925
Ticket: http://dev.haiku-os.org/ticket/6935

Modified:
   haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp
   haiku/trunk/src/servers/app/Desktop.cpp
Log:
Fix #6925 and #6935.
- If the event window was set the window was moved also if the moveFocusWindow 
flag was not set.
- Use ProcessDirtyRegion to redraw the dirty region.



Modified: haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp
===================================================================
--- haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp      2010-12-02 
18:40:15 UTC (rev 39706)
+++ haiku/trunk/src/servers/app/DefaultWindowBehaviour.cpp      2010-12-02 
20:51:38 UTC (rev 39707)
@@ -1123,18 +1123,7 @@
                }
 
                // invalidate the affected regions
-               dirtyRegion.IntersectWith(&fWindow->VisibleRegion());
-               BRect dirtyRect(dirtyRegion.Frame());
-
-               if (dirtyRect.IsValid()) {
-                       DrawingEngine* engine = decorator->GetDrawingEngine();
-                       engine->LockParallelAccess();
-                       engine->ConstrainClippingRegion(&dirtyRegion);
-
-                       decorator->Draw(dirtyRect);
-
-                       engine->UnlockParallelAccess();
-               }
+               fWindow->ProcessDirtyRegion(dirtyRegion);
        }
 }
 

Modified: haiku/trunk/src/servers/app/Desktop.cpp
===================================================================
--- haiku/trunk/src/servers/app/Desktop.cpp     2010-12-02 18:40:15 UTC (rev 
39706)
+++ haiku/trunk/src/servers/app/Desktop.cpp     2010-12-02 20:51:38 UTC (rev 
39707)
@@ -3357,9 +3357,13 @@
        int32 previousIndex = fCurrentWorkspace;
        rgb_color previousColor = fWorkspaces[fCurrentWorkspace].Color();
        bool movedMouseEventWindow = false;
-       Window* movedWindow = fMouseEventWindow;
-       if (movedWindow == NULL && moveFocusWindow)
-               movedWindow = FocusWindow();
+       Window* movedWindow = NULL;
+       if (moveFocusWindow) {
+               if (fMouseEventWindow != NULL)
+                       movedWindow = fMouseEventWindow;
+               else
+                       movedWindow = FocusWindow();
+       }
 
        if (movedWindow != NULL) {
                if (movedWindow->IsNormal()) {


Other related posts: