return FALSE;
}
-gboolean TextureBrowser_expose( ui::Widget widget, GdkEventExpose* event, TextureBrowser* textureBrowser ){
+void TextureBrowser_redraw( TextureBrowser* textureBrowser ){
if ( glwidget_make_current( textureBrowser->m_gl_widget ) != FALSE ) {
GlobalOpenGL_debugAssertNoErrors();
TextureBrowser_evaluateHeight( *textureBrowser );
GlobalOpenGL_debugAssertNoErrors();
glwidget_swap_buffers( textureBrowser->m_gl_widget );
}
+}
+
+gboolean TextureBrowser_expose( ui::Widget widget, GdkEventExpose* event, TextureBrowser* textureBrowser ){
+ TextureBrowser_redraw( textureBrowser );
return FALSE;
}
textureBrowser.m_vframe.set_child_packing( textureBrowser.m_hframe, FALSE, FALSE, 0, ui::Packing::END );
textureBrowser.m_vframe.set_child_packing( textureBrowser.m_hfiller, TRUE, TRUE, 0, ui::Packing::START);
textureBrowser.m_vframe.set_child_packing( textureBrowser.m_gl_widget, FALSE, FALSE, 0, ui::Packing::END );
- GdkEventExpose event = {};
- TextureBrowser_expose( GlobalTextureBrowser().m_gl_widget, &event, &GlobalTextureBrowser() );
+ TextureBrowser_redraw( &GlobalTextureBrowser() );
// The hack needs the GL widget to not be hidden to work,
// so resizing it triggers the redraw of it with the new size.
// GlobalTextureBrowser().m_gl_widget.hide();