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

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 2 May 2010 19:12:33 +0200 (CEST)

Author: axeld
Date: 2010-05-02 19:12:33 +0200 (Sun, 02 May 2010)
New Revision: 36584
Changeset: http://dev.haiku-os.org/changeset/36584/haiku
Ticket: http://dev.haiku-os.org/ticket/5675

Modified:
   haiku/trunk/src/servers/app/Desktop.cpp
Log:
* Always set the focus to the moved window on workspace switch.
* This fixes a part of ticket #5675.


Modified: haiku/trunk/src/servers/app/Desktop.cpp
===================================================================
--- haiku/trunk/src/servers/app/Desktop.cpp     2010-05-02 15:30:52 UTC (rev 
36583)
+++ haiku/trunk/src/servers/app/Desktop.cpp     2010-05-02 17:12:33 UTC (rev 
36584)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2009, Haiku.
+ * Copyright 2001-2010, Haiku.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -3251,8 +3251,10 @@
        }
 
        // Set new focus, but keep focus to a floating window if still visible
-       if (!_Windows(index).HasWindow(FocusWindow())
-               || !FocusWindow()->IsFloating())
+       if (movedWindow != NULL)
+               SetFocusWindow(movedWindow);
+       else if (!_Windows(index).HasWindow(FocusWindow())
+               || (FocusWindow() != NULL && !FocusWindow()->IsFloating()))
                SetFocusWindow(fLastWorkspaceFocus[index]);
 
        _WindowChanged(NULL);


Other related posts:

  • » [haiku-commits] r36584 - haiku/trunk/src/servers/app - axeld