All pastes #1394587 Raw Edit

Unnamed

public text v1 · immutable
#1394587 ·published 2009-04-17 02:41 UTC
rendered paste body
Index: libs/libmythui/mythmainwindow.cpp
===================================================================
--- libs/libmythui/mythmainwindow.cpp	(revision 20403)
+++ libs/libmythui/mythmainwindow.cpp	(working copy)
@@ -818,6 +818,9 @@
     d->drawTimer->start(1000 / 70);
 }
 
+#include <iostream>
+using namespace std;
+
 void MythMainWindow::Show(void)
 {
     show();
@@ -828,8 +831,29 @@
         ShowMenuBar();
 #endif
 
+    QTimer::singleShot(100, this, SLOT(RaiseOnShow()));
+}
+
+void MythMainWindow::RaiseOnShow()
+{
+    cerr<<endl;
+    cerr<<"MythMainWindow::Show(void) HERE BEGIN "<<endl;
+
+    raise();
     activateWindow();
-    raise();
+    if (window())
+    {
+        cerr<<"  MythMainWindow::Show(void) HERE begin "<<endl;
+        window()->show();
+        window()->raise();
+        window()->activateWindow();
+        cerr<<"  MythMainWindow::Show(void) HERE end "
+            <<"window()->isActiveWindow() -> "
+            <<(window()->isActiveWindow()?"true":"false")<<endl;
+    }
+    cerr<<" MythMainWindow::Show(void) HERE END isActiveWindow() -> "
+        <<(isActiveWindow()?"true":"false")<<endl;
+    cerr<<endl;
 }
 
 /* FIXME compatability only */
Index: libs/libmythui/mythmainwindow.h
===================================================================
--- libs/libmythui/mythmainwindow.h	(revision 20403)
+++ libs/libmythui/mythmainwindow.h	(working copy)
@@ -127,6 +127,9 @@
     QObject *getTarget(QKeyEvent &key);
 
     MythMainWindowPrivate *d;
+
+  protected slots:
+    void RaiseOnShow();
 };
 
 MPUBLIC MythMainWindow *GetMythMainWindow();