mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
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.
This commit is contained in:
parent
a38472c139
commit
e8a6bad00b
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -2646,7 +2646,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 |
|
||||
@ -2657,7 +2656,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,
|
||||
@ -2750,7 +2749,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 |
|
||||
@ -2761,7 +2759,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);
|
||||
|
@ -403,10 +403,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);
|
||||
|
@ -311,11 +311,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);
|
||||
|
@ -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);
|
||||
|
@ -1341,10 +1341,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);
|
||||
|
@ -884,10 +884,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);
|
||||
|
@ -2431,12 +2431,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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -2790,9 +2790,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,
|
||||
|
@ -148,10 +148,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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -381,10 +381,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);
|
||||
|
@ -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;
|
||||
|
@ -3996,10 +3996,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);
|
||||
@ -8402,10 +8401,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);
|
||||
|
||||
|
@ -1198,12 +1198,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);
|
||||
|
@ -675,12 +675,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);
|
||||
|
@ -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);
|
||||
@ -3459,9 +3458,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));
|
||||
|
||||
@ -3518,9 +3516,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;
|
||||
@ -3597,9 +3594,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;
|
||||
@ -9380,9 +9376,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,
|
||||
|
@ -1291,7 +1291,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 |
|
||||
|
@ -706,14 +706,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);
|
||||
|
@ -217,7 +217,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 |
|
||||
@ -227,7 +226,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 |= (gtk_window_get_title (window) ? GDK_WA_TITLE : 0);
|
||||
attributes_mask |= (attributes.wmclass_name ? GDK_WA_WMCLASS : 0);
|
||||
|
||||
|
@ -4674,7 +4674,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)
|
||||
{
|
||||
@ -4692,7 +4691,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);
|
||||
@ -4734,7 +4733,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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user