mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-17 11:10:18 +00:00
Moved GTK2-only parent window and colormap handling into the GTK2 code path while keeping GTK3 setup relying on gtk_widget_get_parent_window and visual-only attributes in gtk_xtext_realize.
This commit is contained in:
@@ -874,13 +874,11 @@ gtk_xtext_realize (GtkWidget * widget)
|
|||||||
|
|
||||||
xtext = GTK_XTEXT (widget);
|
xtext = GTK_XTEXT (widget);
|
||||||
|
|
||||||
#if HAVE_GTK3
|
|
||||||
gtk_widget_set_realized (widget, TRUE);
|
gtk_widget_set_realized (widget, TRUE);
|
||||||
|
#if HAVE_GTK3
|
||||||
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);
|
||||||
#endif
|
#else
|
||||||
#if !HAVE_GTK3
|
|
||||||
gtk_widget_set_realized (widget, TRUE);
|
|
||||||
allocation = widget->allocation;
|
allocation = widget->allocation;
|
||||||
parent_window = widget->parent->window;
|
parent_window = widget->parent->window;
|
||||||
#endif
|
#endif
|
||||||
@@ -895,10 +893,10 @@ gtk_xtext_realize (GtkWidget * widget)
|
|||||||
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
|
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
|
||||||
| GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK;
|
| GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK;
|
||||||
|
|
||||||
#if !HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
|
||||||
attributes.visual = gtk_widget_get_visual (widget);
|
attributes.visual = gtk_widget_get_visual (widget);
|
||||||
#else
|
#else
|
||||||
|
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||||
attributes.visual = gtk_widget_get_visual (widget);
|
attributes.visual = gtk_widget_get_visual (widget);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user