Changed time of sending the wxSizeEvent and assorted things,
this made wxGLCanvas work, wxMiniFrame looks correct again, Corrected makefile for HTML help git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -313,6 +313,39 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU
|
||||
|
||||
#endif // GTK_MINOR_VERSION > 0
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "size_allocate"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void gtk_window_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!win->m_hasVMT)
|
||||
return;
|
||||
|
||||
if (win->m_sizeSet)
|
||||
return;
|
||||
|
||||
win->m_sizeSet = TRUE;
|
||||
|
||||
/*
|
||||
wxPrintf( "OnSize from " );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
wxPrintf( win->GetClassInfo()->GetClassName() );
|
||||
wxPrintf( " %d %d %d %d\n", (int)alloc->x,
|
||||
(int)alloc->y,
|
||||
(int)alloc->width,
|
||||
(int)alloc->height );
|
||||
*/
|
||||
|
||||
wxSizeEvent event( win->GetSize(), win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// key event conversion routines
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -694,6 +727,10 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
||||
(int)gdk_event->area.height );
|
||||
*/
|
||||
|
||||
wxEraseEvent eevent( win->GetId() );
|
||||
eevent.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent(eevent);
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
@@ -726,6 +763,10 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
||||
(int)rect->height );
|
||||
*/
|
||||
|
||||
wxEraseEvent eevent( win->GetId() );
|
||||
eevent.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent(eevent);
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
@@ -1784,6 +1825,7 @@ void wxWindow::Init()
|
||||
|
||||
m_isStaticBox = FALSE;
|
||||
m_isRadioButton = FALSE;
|
||||
m_isFrame = FALSE;
|
||||
m_acceptsFocus = FALSE;
|
||||
|
||||
m_cursor = *wxSTANDARD_CURSOR;
|
||||
@@ -2027,6 +2069,13 @@ void wxWindow::PostCreation()
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
|
||||
|
||||
if (!m_isFrame)
|
||||
{
|
||||
/* frames have their own callback */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
|
||||
GTK_SIGNAL_FUNC(gtk_window_size_callback), (gpointer)this );
|
||||
}
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
if (!m_noExpose)
|
||||
@@ -2115,9 +2164,14 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
m_y = y;
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
m_sizeSet = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
int old_width = m_width;
|
||||
int old_height = m_height;
|
||||
|
||||
GtkMyFixed *myfixed = GTK_MYFIXED(m_parent->m_wxwindow);
|
||||
|
||||
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0)
|
||||
@@ -2166,14 +2220,19 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
m_y-border,
|
||||
m_width+2*border,
|
||||
m_height+border+bottom_border );
|
||||
|
||||
if ((old_width != m_width) ||
|
||||
(old_height != m_height))
|
||||
{
|
||||
m_sizeSet = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
m_sizeSet = TRUE;
|
||||
|
||||
/*
|
||||
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
*/
|
||||
m_resizing = FALSE;
|
||||
}
|
||||
|
||||
@@ -2929,7 +2988,7 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
(GtkMenuPositionFunc) pop_pos_callback,
|
||||
(gpointer) this, // client data
|
||||
0, // button used to activate it
|
||||
0 //gs_timeLastClick // the time of activation
|
||||
gs_timeLastClick // the time of activation
|
||||
);
|
||||
|
||||
while (is_waiting)
|
||||
|
Reference in New Issue
Block a user