Exit on frame delete is now initialized and handled in AppBase.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1067,7 +1067,6 @@ wxApp::wxApp()
|
|||||||
argv = NULL;
|
argv = NULL;
|
||||||
|
|
||||||
m_printMode = wxPRINT_WINDOWS;
|
m_printMode = wxPRINT_WINDOWS;
|
||||||
SetExitOnFrameDelete(TRUE);
|
|
||||||
m_auto3D = TRUE;
|
m_auto3D = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1067,7 +1067,6 @@ wxApp::wxApp()
|
|||||||
argv = NULL;
|
argv = NULL;
|
||||||
|
|
||||||
m_printMode = wxPRINT_WINDOWS;
|
m_printMode = wxPRINT_WINDOWS;
|
||||||
SetExitOnFrameDelete(TRUE);
|
|
||||||
m_auto3D = TRUE;
|
m_auto3D = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -395,14 +395,13 @@ wxApp::wxApp()
|
|||||||
m_appName = "";
|
m_appName = "";
|
||||||
argc = 0;
|
argc = 0;
|
||||||
argv = NULL;
|
argv = NULL;
|
||||||
m_exitOnFrameDelete = TRUE;
|
|
||||||
m_mainColormap = (WXColormap) NULL;
|
m_mainColormap = (WXColormap) NULL;
|
||||||
m_topLevelWidget = (WXWindow) NULL;
|
m_topLevelWidget = (WXWindow) NULL;
|
||||||
m_maxRequestSize = 0;
|
m_maxRequestSize = 0;
|
||||||
m_mainLoop = NULL;
|
m_mainLoop = NULL;
|
||||||
m_showIconic = FALSE;
|
m_showIconic = FALSE;
|
||||||
m_initialSize = wxDefaultSize;
|
m_initialSize = wxDefaultSize;
|
||||||
|
|
||||||
#if !wxUSE_NANOX
|
#if !wxUSE_NANOX
|
||||||
m_visualColormap = NULL;
|
m_visualColormap = NULL;
|
||||||
m_colorCube = NULL;
|
m_colorCube = NULL;
|
||||||
@@ -414,7 +413,7 @@ wxApp::~wxApp()
|
|||||||
#if !wxUSE_NANOX
|
#if !wxUSE_NANOX
|
||||||
if (m_colorCube)
|
if (m_colorCube)
|
||||||
free( m_colorCube );
|
free( m_colorCube );
|
||||||
|
|
||||||
if (m_visualColormap)
|
if (m_visualColormap)
|
||||||
delete [] (XColor*)m_visualColormap;
|
delete [] (XColor*)m_visualColormap;
|
||||||
#endif
|
#endif
|
||||||
@@ -744,7 +743,7 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
{
|
{
|
||||||
if (!win->IsEnabled())
|
if (!win->IsEnabled())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// Here we check if the top level window is
|
// Here we check if the top level window is
|
||||||
// disabled, which is one aspect of modality.
|
// disabled, which is one aspect of modality.
|
||||||
wxWindow *tlw = win;
|
wxWindow *tlw = win;
|
||||||
@@ -795,7 +794,7 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
wxLogTrace( _T("focus"), _T("FocusIn from %s of type %s"), win->GetName().c_str(), win->GetClassInfo()->GetClassName() );
|
wxLogTrace( _T("focus"), _T("FocusIn from %s of type %s"), win->GetName().c_str(), win->GetClassInfo()->GetClassName() );
|
||||||
|
|
||||||
extern wxWindow* g_GettingFocus;
|
extern wxWindow* g_GettingFocus;
|
||||||
if (g_GettingFocus && g_GettingFocus->GetParent() == win)
|
if (g_GettingFocus && g_GettingFocus->GetParent() == win)
|
||||||
{
|
{
|
||||||
@@ -1033,44 +1032,44 @@ bool wxApp::OnInitGui()
|
|||||||
vinfo_template.visual = xvisual;
|
vinfo_template.visual = xvisual;
|
||||||
vinfo_template.visualid = XVisualIDFromVisual( xvisual );
|
vinfo_template.visualid = XVisualIDFromVisual( xvisual );
|
||||||
vinfo_template.depth = xdepth;
|
vinfo_template.depth = xdepth;
|
||||||
|
|
||||||
int nitem = 0;
|
int nitem = 0;
|
||||||
XVisualInfo *vi = XGetVisualInfo( xdisplay, VisualIDMask|VisualDepthMask, &vinfo_template, &nitem );
|
XVisualInfo *vi = XGetVisualInfo( xdisplay, VisualIDMask|VisualDepthMask, &vinfo_template, &nitem );
|
||||||
wxASSERT_MSG( vi, wxT("No visual info") );
|
wxASSERT_MSG( vi, wxT("No visual info") );
|
||||||
|
|
||||||
m_visualType = vi->visual->c_class;
|
m_visualType = vi->visual->c_class;
|
||||||
m_visualScreen = vi->screen;
|
m_visualScreen = vi->screen;
|
||||||
|
|
||||||
m_visualRedMask = vi->red_mask;
|
m_visualRedMask = vi->red_mask;
|
||||||
m_visualGreenMask = vi->green_mask;
|
m_visualGreenMask = vi->green_mask;
|
||||||
m_visualBlueMask = vi->blue_mask;
|
m_visualBlueMask = vi->blue_mask;
|
||||||
|
|
||||||
if (m_visualType != GrayScale && m_visualType != PseudoColor)
|
if (m_visualType != GrayScale && m_visualType != PseudoColor)
|
||||||
{
|
{
|
||||||
wxCalcPrecAndShift( m_visualRedMask, &m_visualRedShift, &m_visualRedPrec );
|
wxCalcPrecAndShift( m_visualRedMask, &m_visualRedShift, &m_visualRedPrec );
|
||||||
wxCalcPrecAndShift( m_visualGreenMask, &m_visualGreenShift, &m_visualGreenPrec );
|
wxCalcPrecAndShift( m_visualGreenMask, &m_visualGreenShift, &m_visualGreenPrec );
|
||||||
wxCalcPrecAndShift( m_visualBlueMask, &m_visualBlueShift, &m_visualBluePrec );
|
wxCalcPrecAndShift( m_visualBlueMask, &m_visualBlueShift, &m_visualBluePrec );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_visualDepth = xdepth;
|
m_visualDepth = xdepth;
|
||||||
if (xdepth == 16)
|
if (xdepth == 16)
|
||||||
xdepth = m_visualRedPrec + m_visualGreenPrec + m_visualBluePrec;
|
xdepth = m_visualRedPrec + m_visualGreenPrec + m_visualBluePrec;
|
||||||
|
|
||||||
m_visualColormapSize = vi->colormap_size;
|
m_visualColormapSize = vi->colormap_size;
|
||||||
|
|
||||||
XFree( vi );
|
XFree( vi );
|
||||||
|
|
||||||
if (m_visualDepth > 8)
|
if (m_visualDepth > 8)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
m_visualColormap = new XColor[m_visualColormapSize];
|
m_visualColormap = new XColor[m_visualColormapSize];
|
||||||
XColor* colors = (XColor*) m_visualColormap;
|
XColor* colors = (XColor*) m_visualColormap;
|
||||||
|
|
||||||
for (int i = 0; i < m_visualColormapSize; i++)
|
for (int i = 0; i < m_visualColormapSize; i++)
|
||||||
colors[i].pixel = i;
|
colors[i].pixel = i;
|
||||||
|
|
||||||
XQueryColors( xdisplay, DefaultColormap(xdisplay,xscreen), colors, m_visualColormapSize );
|
XQueryColors( xdisplay, DefaultColormap(xdisplay,xscreen), colors, m_visualColormapSize );
|
||||||
|
|
||||||
m_colorCube = (unsigned char*)malloc(32 * 32 * 32);
|
m_colorCube = (unsigned char*)malloc(32 * 32 * 32);
|
||||||
|
|
||||||
for (int r = 0; r < 32; r++)
|
for (int r = 0; r < 32; r++)
|
||||||
@@ -1113,7 +1112,7 @@ bool wxApp::OnInitGui()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user