[gtk+/rendering-cleanup: 103/141] gtk: Don't set colormap anymore when creating GDK windows
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 103/141] gtk: Don't set colormap anymore when creating GDK windows
- Date: Sat, 11 Sep 2010 03:09:17 +0000 (UTC)
commit 33297fbe5026f642e24c19c8de6fcd229a69d28e
Author: Benjamin Otte <otte redhat com>
Date: Sat Aug 28 18:04:08 2010 +0200
gtk: Don't set colormap anymore when creating GDK windows
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
gtk/gtkcalendar.c | 15 +++++----------
gtk/gtkdrawingarea.c | 3 +--
gtk/gtkentry.c | 6 ++----
gtk/gtkeventbox.c | 3 +--
gtk/gtkfixed.c | 3 +--
gtk/gtkhandlebox.c | 8 +++-----
gtk/gtkiconview.c | 3 +--
gtk/gtklayout.c | 3 +--
gtk/gtkmenu.c | 3 +--
gtk/gtkmenushell.c | 3 +--
gtk/gtkmisc.c | 3 +--
gtk/gtknotebook.c | 3 +--
gtk/gtkoffscreenwindow.c | 3 +--
gtk/gtkplug.c | 3 +--
gtk/gtkprogressbar.c | 3 +--
gtk/gtkruler.c | 3 +--
gtk/gtkseparatortoolitem.c | 1 -
gtk/gtksocket.c | 3 +--
gtk/gtkspinbutton.c | 3 +--
gtk/gtktextview.c | 6 ++----
gtk/gtktoolitemgroup.c | 3 +--
gtk/gtktoolpalette.c | 3 +--
gtk/gtktreeview.c | 15 +++++----------
gtk/gtktreeviewcolumn.c | 1 -
gtk/gtkviewport.c | 3 +--
gtk/gtkwin32embedwidget.c | 3 +--
gtk/gtkwindow.c | 5 ++---
27 files changed, 38 insertions(+), 76 deletions(-)
---
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 2fe80ff..bb7894d 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -1555,11 +1555,10 @@ calendar_realize_arrows (GtkCalendar *calendar)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = (gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
for (i = 0; i < 4; i++)
{
GdkRectangle rect;
@@ -1609,9 +1608,8 @@ calendar_realize_header (GtkCalendar *calendar)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.x = style->xthickness;
attributes.y = style->ythickness;
attributes.width = allocation.width - 2 * attributes.x;
@@ -1689,9 +1687,8 @@ calendar_realize_day_names (GtkCalendar *calendar)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.x = style->xthickness + inner_border;
attributes.y = priv->header_h + (style->ythickness + inner_border);
attributes.width = allocation.width - (style->xthickness + inner_border) * 2;
@@ -1729,9 +1726,8 @@ calendar_realize_week_numbers (GtkCalendar *calendar)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
{
attributes.x = style->xthickness + inner_border;
@@ -1785,9 +1781,8 @@ gtk_calendar_realize (GtkWidget *widget)
attributes.event_mask = (gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK |GDK_KEY_PRESS_MASK | GDK_SCROLL_MASK);
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c
index 6357ca6..b3a2e6c 100644
--- a/gtk/gtkdrawingarea.c
+++ b/gtk/gtkdrawingarea.c
@@ -84,10 +84,9 @@ gtk_drawing_area_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 09e16c0..65456f5 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2645,7 +2645,6 @@ realize_icon_info (GtkWidget *widget,
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
@@ -2656,7 +2655,7 @@ realize_icon_info (GtkWidget *widget,
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
icon_info->window = gdk_window_new (gtk_widget_get_window (widget),
&attributes,
@@ -2755,7 +2754,6 @@ gtk_entry_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
@@ -2766,7 +2764,7 @@ gtk_entry_realize (GtkWidget *widget)
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
gtk_widget_set_window (widget, window);
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index 70fd1aa..cbc5be5 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -399,10 +399,9 @@ gtk_event_box_realize (GtkWidget *widget)
if (visible_window)
{
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 0a46142..22451d8 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -307,11 +307,10 @@ gtk_fixed_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index 3fe3d23..e90a02b 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -422,10 +422,9 @@ gtk_handle_box_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = (gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
@@ -443,7 +442,7 @@ gtk_handle_box_realize (GtkWidget *widget)
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
priv->bin_window = gdk_window_new (window,
&attributes, attributes_mask);
@@ -462,7 +461,6 @@ gtk_handle_box_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_TOPLEVEL;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = (gtk_widget_get_events (widget) |
GDK_KEY_PRESS_MASK |
GDK_ENTER_NOTIFY_MASK |
@@ -470,7 +468,7 @@ gtk_handle_box_realize (GtkWidget *widget)
GDK_FOCUS_CHANGE_MASK |
GDK_STRUCTURE_MASK);
attributes.type_hint = GDK_WINDOW_TYPE_HINT_TOOLBAR;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_TYPE_HINT;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_TYPE_HINT;
priv->float_window = gdk_window_new (gtk_widget_get_root_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (priv->float_window, widget);
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index a0c4013..dfb62c3 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1340,10 +1340,9 @@ gtk_icon_view_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index 4250c1f..660c799 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -880,10 +880,9 @@ gtk_layout_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 39bb108..32af408 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2411,12 +2411,11 @@ gtk_menu_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK );
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 9aee0f1..475f7c1 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -530,7 +530,6 @@ gtk_menu_shell_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
@@ -539,7 +538,7 @@ gtk_menu_shell_realize (GtkWidget *widget)
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c
index ad96094..edc9514 100644
--- a/gtk/gtkmisc.c
+++ b/gtk/gtkmisc.c
@@ -352,9 +352,8 @@ gtk_misc_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
gtk_widget_set_window (widget, window);
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 5585d75..31dc473 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2837,9 +2837,8 @@ show_drag_window (GtkNotebook *notebook,
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
priv->drag_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes,
diff --git a/gtk/gtkoffscreenwindow.c b/gtk/gtkoffscreenwindow.c
index 923d912..06ab1e6 100644
--- a/gtk/gtkoffscreenwindow.c
+++ b/gtk/gtkoffscreenwindow.c
@@ -144,10 +144,9 @@ gtk_offscreen_window_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_OFFSCREEN;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index c31f070..5f445e1 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -652,7 +652,6 @@ gtk_plug_realize (GtkWidget *widget)
/* this isn't right - we should match our parent's visual/colormap.
* though that will require handling "foreign" colormaps */
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_KEY_PRESS_MASK |
@@ -661,7 +660,7 @@ gtk_plug_realize (GtkWidget *widget)
GDK_LEAVE_NOTIFY_MASK |
GDK_STRUCTURE_MASK);
- attributes_mask = GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_VISUAL;
attributes_mask |= (title ? GDK_WA_TITLE : 0);
attributes_mask |= (g_strdup (g_get_prgname ()) ? GDK_WA_WMCLASS : 0);
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index fdb9b9b..154ed67 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -298,11 +298,10 @@ gtk_progress_bar_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index d7ed72e..4b82bb1 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -475,13 +475,12 @@ gtk_ruler_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkseparatortoolitem.c b/gtk/gtkseparatortoolitem.c
index a26dd4f..139cd25 100644
--- a/gtk/gtkseparatortoolitem.c
+++ b/gtk/gtkseparatortoolitem.c
@@ -270,7 +270,6 @@ gtk_separator_tool_item_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_ONLY;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget) |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK;
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index ed82739..f7308bd 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -378,10 +378,9 @@ gtk_socket_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = GDK_FOCUS_CHANGE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 4576435..d8bdcc0 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -604,13 +604,12 @@ gtk_spin_button_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK
| GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.x = allocation.width - arrow_size - 2 * style->xthickness;
attributes.y = (allocation.height - requisition.height) / 2;
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index a34547c..402dd52 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -3993,10 +3993,9 @@ gtk_text_view_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
@@ -8398,10 +8397,9 @@ text_window_realize (GtkTextWindow *win,
attributes.height = win->allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (win->widget);
- attributes.colormap = gtk_widget_get_colormap (win->widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gtk_widget_get_window (widget);
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index 96241b7..8e5ee1b 100644
--- a/gtk/gtktoolitemgroup.c
+++ b/gtk/gtktoolitemgroup.c
@@ -1191,12 +1191,11 @@ gtk_tool_item_group_realize (GtkWidget *widget)
attributes.height = allocation.height - border_width * 2;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_BUTTON_MOTION_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index de6d268..51cf5d3 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -674,12 +674,11 @@ gtk_tool_palette_realize (GtkWidget *widget)
attributes.height = allocation.height - border_width * 2;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_BUTTON_MOTION_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 4ad1063..0e688b8 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -1796,10 +1796,9 @@ gtk_tree_view_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
@@ -3457,9 +3456,8 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
width = attributes.width = drag_allocation.width;
height = attributes.height = drag_allocation.height;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
- attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
tree_view->priv->drag_highlight_window = gdk_window_new (tree_view->priv->header_window, &attributes, attributes_mask);
gdk_window_set_user_data (tree_view->priv->drag_highlight_window, GTK_WIDGET (tree_view));
@@ -3516,9 +3514,8 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
- attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.x = x;
attributes.y = y;
attributes.width = width;
@@ -3595,9 +3592,8 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
- attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.x = x;
attributes.y = y;
attributes.width = width;
@@ -9375,9 +9371,8 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
attributes.width = button_allocation.width;
attributes.height = button_allocation.height;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
- attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
tree_view->priv->drag_window = gdk_window_new (tree_view->priv->bin_window,
&attributes,
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index b920376..f323767 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1287,7 +1287,6 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
attr.window_type = GDK_WINDOW_CHILD;
attr.wclass = GDK_INPUT_ONLY;
attr.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
- attr.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
attr.event_mask = gtk_widget_get_events (GTK_WIDGET (tree_view)) |
(GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 60f8f11..ea6a6ab 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -699,14 +699,13 @@ gtk_viewport_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
/* We select on button_press_mask so that button 4-5 scrolls are trapped.
*/
attributes.event_mask = event_mask | GDK_BUTTON_PRESS_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
diff --git a/gtk/gtkwin32embedwidget.c b/gtk/gtkwin32embedwidget.c
index a3061c8..0597465 100644
--- a/gtk/gtkwin32embedwidget.c
+++ b/gtk/gtkwin32embedwidget.c
@@ -218,7 +218,6 @@ gtk_win32_embed_widget_realize (GtkWidget *widget)
/* this isn't right - we should match our parent's visual/colormap.
* though that will require handling "foreign" colormaps */
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_KEY_PRESS_MASK |
@@ -228,7 +227,7 @@ gtk_win32_embed_widget_realize (GtkWidget *widget)
GDK_STRUCTURE_MASK |
GDK_FOCUS_CHANGE_MASK);
- attributes_mask = GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_VISUAL;
attributes_mask |= (window->title ? GDK_WA_TITLE : 0);
attributes_mask |= (window->wmclass_name ? GDK_WA_WMCLASS : 0);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 01ef6e6..31a3dcf 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4673,7 +4673,6 @@ gtk_window_realize (GtkWidget *widget)
attributes.wmclass_class = priv->wmclass_class;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
if (priv->has_frame)
{
@@ -4691,7 +4690,7 @@ gtk_window_realize (GtkWidget *widget)
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK);
- attributes_mask = GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_VISUAL;
priv->frame = gdk_window_new (gtk_widget_get_root_window (widget),
&attributes, attributes_mask);
@@ -4733,7 +4732,7 @@ gtk_window_realize (GtkWidget *widget)
GDK_STRUCTURE_MASK);
attributes.type_hint = priv->type_hint;
- attributes_mask |= GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_TYPE_HINT;
+ attributes_mask |= GDK_WA_VISUAL | GDK_WA_TYPE_HINT;
attributes_mask |= (priv->title ? GDK_WA_TITLE : 0);
attributes_mask |= (priv->wmclass_name ? GDK_WA_WMCLASS : 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]