mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Split the GTK3 and GTK2 branches in gtk_xtext_unrealize() so GTK3 uses gtk_widget_get_window() while the GTK2 path remains under #if !HAVE_GTK3 with direct struct access.
Split the GTK3 and GTK2 branches in gtk_xtext_realize() so GTK3 uses gtk_widget_get_allocation(), gtk_widget_get_parent_window(), and gtk_widget_set_window(), while keeping the existing GTK2 struct access under #if !HAVE_GTK3.
This commit is contained in:
@@ -733,7 +733,8 @@ gtk_xtext_unrealize (GtkWidget * widget)
|
|||||||
if (window)
|
if (window)
|
||||||
gdk_window_set_user_data (window, NULL);
|
gdk_window_set_user_data (window, NULL);
|
||||||
}
|
}
|
||||||
#else
|
#endif
|
||||||
|
#if !HAVE_GTK3
|
||||||
gdk_window_set_user_data (widget->window, NULL);
|
gdk_window_set_user_data (widget->window, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -806,7 +807,8 @@ gtk_xtext_realize (GtkWidget * widget)
|
|||||||
gtk_widget_set_realized (widget, TRUE);
|
gtk_widget_set_realized (widget, TRUE);
|
||||||
gtk_widget_get_allocation (widget, &allocation);
|
gtk_widget_get_allocation (widget, &allocation);
|
||||||
parent_window = gtk_widget_get_parent_window (widget);
|
parent_window = gtk_widget_get_parent_window (widget);
|
||||||
#else
|
#endif
|
||||||
|
#if !HAVE_GTK3
|
||||||
gtk_widget_set_realized (widget, TRUE);
|
gtk_widget_set_realized (widget, TRUE);
|
||||||
allocation = widget->allocation;
|
allocation = widget->allocation;
|
||||||
parent_window = widget->parent->window;
|
parent_window = widget->parent->window;
|
||||||
@@ -839,7 +841,8 @@ gtk_xtext_realize (GtkWidget * widget)
|
|||||||
|
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
gtk_widget_set_window (widget, window);
|
gtk_widget_set_window (widget, window);
|
||||||
#else
|
#endif
|
||||||
|
#if !HAVE_GTK3
|
||||||
widget->window = window;
|
widget->window = window;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user