[gtk+] overlay/paned: Ensure we set the right visual on windows
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] overlay/paned: Ensure we set the right visual on windows
- Date: Wed, 8 May 2013 13:52:05 +0000 (UTC)
commit bb7054b508bfe41eb3e7f27496d4c2eb3a2b2f7a
Author: Alexander Larsson <alexl redhat com>
Date: Wed May 8 15:51:00 2013 +0200
overlay/paned: Ensure we set the right visual on windows
This was always "needed", but the problems with not doing it
now are worse, since any CSD window will have a nonstandard
rgba visual.
gtk/gtkoverlay.c | 3 ++-
gtk/gtkpaned.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c
index 75ca60d..c06f8e0 100644
--- a/gtk/gtkoverlay.c
+++ b/gtk/gtkoverlay.c
@@ -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),
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 7f976e6..e85521c 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -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;
@@ -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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]