From 58eb385351995aa7b5d9bbecd2b0dfa1d31e0dc8 Mon Sep 17 00:00:00 2001
From: markt <markt>
Date: Sat, 17 Feb 2007 17:37:34 +0000
Subject: fixed some issues with creating and alt-tabbing to transients of
 inactive tabs

---
 ChangeLog     |  3 +++
 src/Window.cc | 14 ++++----------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 85cafb9..786178f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
  (Format: Year/Month/Day)
 Changes for 1.0rc3:
+*07/02/17:
+   * Fixed some issues with transients of inactive tabs (Mark)
+     Window.cc
 *07/02/10:
    * MaxSize and MinSize hints weren't getting updated properly -- bug #1560803
      (Mark + thanks Jim Ramsay)
diff --git a/src/Window.cc b/src/Window.cc
index c324087..0deecd2 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1887,11 +1887,11 @@ void FluxboxWindow::raise() {
     }
     // raise this window and every transient in it with this one last
     if (client->fbwindow()) {
-        raiseFluxboxWindow(*client->fbwindow());
         // doing this on startup messes up the focus order
         if (!Fluxbox::instance()->isStartup())
             // activate the client so the transient won't get pushed back down
             client->fbwindow()->setCurrentClient(*client, false);
+        raiseFluxboxWindow(*client->fbwindow());
     }
 
 }
@@ -1917,15 +1917,9 @@ void FluxboxWindow::tempRaise() {
     if (isIconic())
         deiconify();
 
-    // get root window
-    WinClient *client = getRootTransientFor(m_client);
-
-    // if we don't have any root window use this as root
-    if (client == 0)
-        client = m_client;
-
-    if (client->fbwindow())
-        tempRaiseFluxboxWindow(*client->fbwindow());
+    // the root transient will get raised when we stop cycling
+    // raising it here causes problems when it isn't the active tab
+    tempRaiseFluxboxWindow(*this);
 }
 
 
-- 
cgit v0.11.2