wxLogTrace(TRACE_FOCUS,
_T("%s: focus in"), win->GetName().c_str());
-
+
#ifdef HAVE_XIM
if (win->m_ic)
gdk_im_begin(win->m_ic, win->m_wxwindow->window);
return (wxWindow *)g_focusWindow;
}
-//-----------------------------------------------------------------------------
-// "destroy" event
-//-----------------------------------------------------------------------------
-
-// VZ: Robert commented the code using out so it generates warnings: should
-// be either fixed or removed completely
-#if 0
-
-static void gtk_window_destroy_callback( GtkWidget* widget, wxWindow *win )
-{
- wxWindowDestroyEvent event(win);
- win->GetEventHandler()->ProcessEvent(event);
-}
-
-#endif // 0
//-----------------------------------------------------------------------------
// "realize" from m_widget
wxWindowGTK::~wxWindowGTK()
{
+ SendDestroyEvent();
+
if (g_focusWindow == this)
g_focusWindow = NULL;
gtk_signal_connect( GTK_OBJECT(widget), "leave_notify_event",
GTK_SIGNAL_FUNC(gtk_window_leave_callback), (gpointer)this );
-
- // This keeps crashing on me. RR.
- //
- // gtk_signal_connect( GTK_OBJECT(widget), "destroy",
- // GTK_SIGNAL_FUNC(gtk_window_destroy_callback), (gpointer)this );
}
bool wxWindowGTK::Destroy()
pango_layout_line_get_extents(line, NULL, &rect);
g_object_unref( G_OBJECT( layout ) );
-
+
return (int) (rect.height / PANGO_SCALE);
#else
GdkFont *font = m_font.GetInternalFont( 1.0 );
pango_layout_line_get_extents(line, NULL, &rect);
g_object_unref( G_OBJECT( layout ) );
-
+
return (int) (rect.width / PANGO_SCALE);
#else
GdkFont *font = m_font.GetInternalFont( 1.0 );
pango_font_description_copy( m_font.GetNativeFontInfo()->description );
#else
gdk_font_unref( style->font );
- style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) )
+ style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) );
#endif
}