Remove wxGLCanvas "size-allocate" signal handler
There is already a handler in wxWindow which will do the same thing.
This commit is contained in:
@@ -18,22 +18,6 @@
|
|||||||
#include "wx/gtk/private/wrapgtk.h"
|
#include "wx/gtk/private/wrapgtk.h"
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// "size_allocate" of m_wxwindow
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
static void
|
|
||||||
gtk_glcanvas_size_callback(GtkWidget *WXUNUSED(widget),
|
|
||||||
GtkAllocation * WXUNUSED(alloc),
|
|
||||||
wxGLCanvas *win)
|
|
||||||
{
|
|
||||||
wxSizeEvent event( wxSize(win->m_width,win->m_height), win->GetId() );
|
|
||||||
event.SetEventObject( win );
|
|
||||||
win->HandleWindowEvent( event );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// emission hook for "parent-set"
|
// emission hook for "parent-set"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -222,8 +206,6 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
|||||||
|
|
||||||
gtk_widget_set_double_buffered(m_wxwindow, false);
|
gtk_widget_set_double_buffered(m_wxwindow, false);
|
||||||
|
|
||||||
g_signal_connect(m_widget, "size_allocate", G_CALLBACK(gtk_glcanvas_size_callback), this);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2271,7 +2271,6 @@ size_allocate(GtkWidget* WXUNUSED_IN_GTK2(widget), GtkAllocation* alloc, wxWindo
|
|||||||
// so always get size from m_widget->allocation
|
// so always get size from m_widget->allocation
|
||||||
win->m_width = a.width;
|
win->m_width = a.width;
|
||||||
win->m_height = a.height;
|
win->m_height = a.height;
|
||||||
if (!win->m_nativeSizeEvent)
|
|
||||||
{
|
{
|
||||||
wxSizeEvent event(win->GetSize(), win->GetId());
|
wxSizeEvent event(win->GetSize(), win->GetId());
|
||||||
event.SetEventObject(win);
|
event.SetEventObject(win);
|
||||||
|
Reference in New Issue
Block a user