Skip to content

Commit

Permalink
overlay/paned: Ensure we set the right visual on windows
Browse files Browse the repository at this point in the history
This was always "needed", but the problems with not doing it
now are worse, since any CSD window will have a nonstandard
rgba visual.
  • Loading branch information
alexlarsson committed May 8, 2013
1 parent 35a14ce commit bb7054b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gtk/gtkoverlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ gtk_overlay_create_child_window (GtkOverlay *overlay,
attributes.height = allocation.height;
attributes.x = allocation.x;
attributes.y = allocation.y;
attributes_mask = GDK_WA_X | GDK_WA_Y;
attributes.visual = gtk_widget_get_visual (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;

window = gdk_window_new (gtk_widget_get_window (widget),
Expand Down
5 changes: 3 additions & 2 deletions gtk/gtkpaned.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,7 @@ gtk_paned_create_child_window (GtkPaned *paned,
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.visual = gtk_widget_get_visual (widget);
if (child)
{
GtkAllocation allocation;
Expand All @@ -1415,13 +1416,13 @@ gtk_paned_create_child_window (GtkPaned *paned,
gtk_widget_get_allocation (child, &allocation);
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes_mask = GDK_WA_X | GDK_WA_Y;
attributes_mask = GDK_WA_X | GDK_WA_Y| GDK_WA_VISUAL;
}
else
{
attributes.width = 1;
attributes.height = 1;
attributes_mask = 0;
attributes_mask = GDK_WA_VISUAL;
}

window = gdk_window_new (gtk_widget_get_window (widget),
Expand Down

0 comments on commit bb7054b

Please sign in to comment.