From c39b6e1edd6a71de7d2bbfa114f9455db019d7bf Mon Sep 17 00:00:00 2001 From: Jaakko Salli <jaakko.salli@dnainternet.net> Date: Sat, 5 Sep 2009 13:23:03 +0000 Subject: [PATCH] Fixed GtkBorder allocation (hopefully) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/textentry.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index 7b49e1150d..0bf2b128e9 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -350,7 +350,7 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins) #if GTK_CHECK_VERSION(2,14,0) newBorder = gtk_border_new(); #else - newBorder = new GtkBorder; + newBorder = g_slice_new0(GtkBorder); #endif // Use some reasonable defaults for initial margins newBorder->left = 2; @@ -370,6 +370,12 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins) gtk_entry_set_inner_border(entry, newBorder); +#if GTK_CHECK_VERSION(2,14,0) + gtk_border_free(newBorder); +#else + g_slice_free(GtkBorder, newBorder); +#endif + return true; #else wxUnusedVar(margins); -- 2.47.2