[commit] r2428 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Feb 13 12:53:05 CST 2014
Author: ksmyth
Date: Thu Feb 13 12:53:05 2014
New Revision: 2428
Log:
Check for offscreen floating panes at startup. (META-2855)
Modified:
trunk/GME/Gme/GMEApp.cpp
trunk/GME/Gme/MainFrm.cpp
trunk/GME/Gme/MainFrm.h
Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp Thu Feb 13 12:52:55 2014 (r2427)
+++ trunk/GME/Gme/GMEApp.cpp Thu Feb 13 12:53:05 2014 (r2428)
@@ -378,6 +378,7 @@
return FALSE;
}
m_pMainWnd = pMainFrame;
+ pMainFrame->CheckForOffscreenPanes();
#if !defined(ADDCRASHTESTMENU) && defined(_DEBUG)
bNoProtect = true;
Modified: trunk/GME/Gme/MainFrm.cpp
==============================================================================
--- trunk/GME/Gme/MainFrm.cpp Thu Feb 13 12:52:55 2014 (r2427)
+++ trunk/GME/Gme/MainFrm.cpp Thu Feb 13 12:53:05 2014 (r2428)
@@ -1594,3 +1594,25 @@
{
pCmdUI->Enable(FALSE);
}
+
+void CMainFrame::CheckForOffscreenPanes()
+{
+ // it seems Windows does this for us when resolution is changed, so no need to handle WM_DISPLAYCHANGE
+ // but it is possible to float a pane, then close GME, then change the screen resolution
+
+ // TODO: these can float offscreen too...
+ //m_wndComponentBar; m_wndStatusBar; m_wndToolBarMain; m_wndToolBarModeling; m_wndToolBarWins; m_wndMenuBar; m_wndModeBar; m_wndNaviBar;
+ CDockablePane* panes[] = { &m_panningWindow, &m_console, &m_partBrowser, &m_browser, &m_objectInspector, &m_search, nullptr };
+ CDockablePane** pane = panes;
+ while (*pane)
+ {
+ HMONITOR mon = MonitorFromWindow((*pane)->GetSafeHwnd(), MONITOR_DEFAULTTONULL);
+ bool flt = (*pane)->IsFloating();
+ if (mon == nullptr && flt)
+ {
+ DockPane(*pane, AFX_IDW_DOCKBAR_BOTTOM);
+ }
+ pane++;
+ }
+ return;
+}
Modified: trunk/GME/Gme/MainFrm.h
==============================================================================
--- trunk/GME/Gme/MainFrm.h Thu Feb 13 12:52:55 2014 (r2427)
+++ trunk/GME/Gme/MainFrm.h Thu Feb 13 12:53:05 2014 (r2428)
@@ -194,6 +194,8 @@
{
m_wndClientArea.GetMDITabs().EnableActivateLastActive(enable);
}
+
+ void CheckForOffscreenPanes();
};
/////////////////////////////////////////////////////////////////////////////
More information about the gme-commit
mailing list