mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Added explicit GTK3-only branches in gtk_xtext_unrealize() so gtk_widget_get_window() is used without GTK2 struct access leaking into the GTK3 path.
Split the GTK3 and GTK2 initialization paths in gtk_xtext_realize() so the GTK3 branch uses gtk_widget_get_allocation()/gtk_widget_get_parent_window() and the GTK2 branch keeps the direct struct access under #if !HAVE_GTK3.
This commit is contained in:
@@ -733,7 +733,8 @@ gtk_xtext_unrealize (GtkWidget * widget)
|
||||
#if HAVE_GTK3
|
||||
if (window)
|
||||
gdk_window_set_user_data (window, NULL);
|
||||
#else
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
gdk_window_set_user_data (widget->window, NULL);
|
||||
#endif
|
||||
|
||||
@@ -811,7 +812,8 @@ gtk_xtext_realize (GtkWidget * widget)
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
parent_window = gtk_widget_get_parent_window (widget);
|
||||
#else
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
allocation = widget->allocation;
|
||||
parent_window = widget->parent->window;
|
||||
|
||||
Reference in New Issue
Block a user