avoid GDK warning "drawable is not a pixmap or window"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fa23222253
commit
1a0d3739c1
@ -1883,6 +1883,16 @@ gtk_window_realized_callback(GtkWidget* WXUNUSED(widget), wxWindow* win)
|
||||
win->GTKHandleRealized();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "unrealize" from m_wxwindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void unrealize(GtkWidget*, wxWindowGTK* win)
|
||||
{
|
||||
if (win->m_imData)
|
||||
gtk_im_context_set_client_window(win->m_imData->context, NULL);
|
||||
}
|
||||
|
||||
void wxWindowGTK::GTKHandleRealized()
|
||||
{
|
||||
if (m_imData)
|
||||
@ -2270,6 +2280,7 @@ wxWindowGTK::~wxWindowGTK()
|
||||
|
||||
// delete before the widgets to avoid a crash on solaris
|
||||
delete m_imData;
|
||||
m_imData = NULL;
|
||||
|
||||
// avoid problem with GTK+ 2.18 where a frozen window causes the whole
|
||||
// TLW to be frozen, and if the window is then destroyed, nothing ever
|
||||
@ -2333,6 +2344,7 @@ void wxWindowGTK::PostCreation()
|
||||
|
||||
g_signal_connect (m_imData->context, "commit",
|
||||
G_CALLBACK (gtk_wxwindow_commit_cb), this);
|
||||
g_signal_connect(m_wxwindow, "unrealize", G_CALLBACK(unrealize), this);
|
||||
}
|
||||
|
||||
// focus handling
|
||||
|
Loading…
Reference in New Issue
Block a user