Add a few more inlined getters

This commit is contained in:
Matthias Clasen 2015-09-27 20:20:29 -04:00
parent 65ec902df9
commit ac198a3ce6
4 changed files with 122 additions and 114 deletions

View File

@ -2196,9 +2196,8 @@ gtk_container_real_check_resize (GtkContainer *container)
GtkAllocation allocation; GtkAllocation allocation;
GtkRequisition requisition; GtkRequisition requisition;
gtk_widget_get_preferred_size (widget, gtk_widget_get_preferred_size (widget, &requisition, NULL);
&requisition, NULL); _gtk_widget_get_allocation (widget, &allocation);
gtk_widget_get_allocation (widget, &allocation);
if (requisition.width > allocation.width || if (requisition.width > allocation.width ||
requisition.height > allocation.height) requisition.height > allocation.height)
@ -2247,7 +2246,7 @@ gtk_container_resize_children (GtkContainer *container)
g_return_if_fail (GTK_IS_CONTAINER (container)); g_return_if_fail (GTK_IS_CONTAINER (container));
widget = GTK_WIDGET (container); widget = GTK_WIDGET (container);
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
gtk_widget_size_allocate (widget, &allocation); gtk_widget_size_allocate (widget, &allocation);
gtk_widget_set_allocation (widget, &allocation); gtk_widget_set_allocation (widget, &allocation);
@ -2716,11 +2715,11 @@ gtk_container_real_set_focus_child (GtkContainer *container,
gtk_widget_translate_coordinates (focus_child, priv->focus_child, gtk_widget_translate_coordinates (focus_child, priv->focus_child,
0, 0, &x, &y); 0, 0, &x, &y);
gtk_widget_get_allocation (priv->focus_child, &allocation); _gtk_widget_get_allocation (priv->focus_child, &allocation);
x += allocation.x; x += allocation.x;
y += allocation.y; y += allocation.y;
gtk_widget_get_allocation (focus_child, &allocation); _gtk_widget_get_allocation (focus_child, &allocation);
if (vadj) if (vadj)
gtk_adjustment_clamp_page (vadj, y, y + allocation.height); gtk_adjustment_clamp_page (vadj, y, y + allocation.height);
@ -2832,8 +2831,8 @@ tab_compare (gconstpointer a,
GtkTextDirection text_direction = GPOINTER_TO_INT (data); GtkTextDirection text_direction = GPOINTER_TO_INT (data);
gint y1, y2; gint y1, y2;
gtk_widget_get_allocation ((GtkWidget *) child1, &child1_allocation); _gtk_widget_get_allocation ((GtkWidget *) child1, &child1_allocation);
gtk_widget_get_allocation ((GtkWidget *) child2, &child2_allocation); _gtk_widget_get_allocation ((GtkWidget *) child2, &child2_allocation);
y1 = child1_allocation.y + child1_allocation.height / 2; y1 = child1_allocation.y + child1_allocation.height / 2;
y2 = child2_allocation.y + child2_allocation.height / 2; y2 = child2_allocation.y + child2_allocation.height / 2;
@ -3049,7 +3048,7 @@ gtk_container_focus_sort_up_down (GtkContainer *container,
GtkWidget *widget = GTK_WIDGET (container); GtkWidget *widget = GTK_WIDGET (container);
GdkRectangle old_focus_rect; GdkRectangle old_focus_rect;
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
if (old_focus_coords (container, &old_focus_rect)) if (old_focus_coords (container, &old_focus_rect))
{ {
@ -3179,7 +3178,7 @@ gtk_container_focus_sort_left_right (GtkContainer *container,
GtkWidget *widget = GTK_WIDGET (container); GtkWidget *widget = GTK_WIDGET (container);
GdkRectangle old_focus_rect; GdkRectangle old_focus_rect;
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
if (old_focus_coords (container, &old_focus_rect)) if (old_focus_coords (container, &old_focus_rect))
{ {
@ -3615,7 +3614,7 @@ gtk_container_draw_forall (GtkWidget *widget,
info.window_depth = G_MAXINT; info.window_depth = G_MAXINT;
if (_gtk_widget_get_has_window (widget)) if (_gtk_widget_get_has_window (widget))
{ {
window = gtk_widget_get_window (widget); window = _gtk_widget_get_window (widget);
siblings = gdk_window_peek_children (gdk_window_get_parent (window)); siblings = gdk_window_peek_children (gdk_window_get_parent (window));
info.window_depth = g_list_index (siblings, window); info.window_depth = g_list_index (siblings, window);
} }
@ -3690,7 +3689,7 @@ gtk_container_map (GtkWidget *widget)
NULL); NULL);
if (_gtk_widget_get_has_window (widget)) if (_gtk_widget_get_has_window (widget))
gdk_window_show (gtk_widget_get_window (widget)); gdk_window_show (_gtk_widget_get_window (widget));
} }
static void static void
@ -3704,7 +3703,7 @@ gtk_container_unmap (GtkWidget *widget)
* window, e.g. a GtkSocket would) * window, e.g. a GtkSocket would)
*/ */
if (_gtk_widget_get_has_window (widget)) if (_gtk_widget_get_has_window (widget))
gdk_window_hide (gtk_widget_get_window (widget)); gdk_window_hide (_gtk_widget_get_window (widget));
gtk_container_forall (GTK_CONTAINER (widget), gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback)gtk_widget_unmap, (GtkCallback)gtk_widget_unmap,
@ -3727,8 +3726,8 @@ gtk_container_should_propagate_draw (GtkContainer *container,
*/ */
event = _gtk_cairo_get_event (cr); event = _gtk_cairo_get_event (cr);
if (event && if (event &&
(_gtk_widget_get_has_window (child) && _gtk_widget_get_has_window (child) &&
gdk_window_has_native (gtk_widget_get_window (child)))) gdk_window_has_native (_gtk_widget_get_window (child)))
return FALSE; return FALSE;
/* Never propagate to a child window when exposing a window /* Never propagate to a child window when exposing a window
@ -3736,9 +3735,9 @@ gtk_container_should_propagate_draw (GtkContainer *container,
*/ */
event_window = _gtk_cairo_get_event_window (cr); event_window = _gtk_cairo_get_event_window (cr);
if (_gtk_widget_get_has_window (child)) if (_gtk_widget_get_has_window (child))
child_in_window = gdk_window_get_parent (gtk_widget_get_window (child)); child_in_window = gdk_window_get_parent (_gtk_widget_get_window (child));
else else
child_in_window = gtk_widget_get_window (child); child_in_window = _gtk_widget_get_window (child);
if (event_window != NULL && child_in_window != event_window) if (event_window != NULL && child_in_window != event_window)
return FALSE; return FALSE;
@ -3793,7 +3792,7 @@ gtk_container_propagate_draw (GtkContainer *container,
/* translate coordinates. Ugly business, that. */ /* translate coordinates. Ugly business, that. */
if (!_gtk_widget_get_has_window (GTK_WIDGET (container))) if (!_gtk_widget_get_has_window (GTK_WIDGET (container)))
{ {
gtk_widget_get_allocation (GTK_WIDGET (container), &allocation); _gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
x = -allocation.x; x = -allocation.x;
y = -allocation.y; y = -allocation.y;
} }
@ -3803,9 +3802,9 @@ gtk_container_propagate_draw (GtkContainer *container,
y = 0; y = 0;
} }
window = gtk_widget_get_window (GTK_WIDGET (container)); window = _gtk_widget_get_window (GTK_WIDGET (container));
for (w = gtk_widget_get_window (child); w && w != window; w = gdk_window_get_parent (w)) for (w = _gtk_widget_get_window (child); w && w != window; w = gdk_window_get_parent (w))
{ {
int wx, wy; int wx, wy;
gdk_window_get_position (w, &wx, &wy); gdk_window_get_position (w, &wx, &wy);
@ -3821,7 +3820,7 @@ gtk_container_propagate_draw (GtkContainer *container,
if (!_gtk_widget_get_has_window (child)) if (!_gtk_widget_get_has_window (child))
{ {
gtk_widget_get_allocation (child, &allocation); _gtk_widget_get_allocation (child, &allocation);
x += allocation.x; x += allocation.x;
y += allocation.y; y += allocation.y;
} }

View File

@ -3927,7 +3927,7 @@ gtk_widget_get_property (GObject *object,
g_value_set_string (value, g_object_get_qdata (object, quark_tooltip_markup)); g_value_set_string (value, g_object_get_qdata (object, quark_tooltip_markup));
break; break;
case PROP_WINDOW: case PROP_WINDOW:
g_value_set_object (value, gtk_widget_get_window (widget)); g_value_set_object (value, _gtk_widget_get_window (widget));
break; break;
case PROP_DOUBLE_BUFFERED: case PROP_DOUBLE_BUFFERED:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS G_GNUC_BEGIN_IGNORE_DEPRECATIONS
@ -5038,14 +5038,14 @@ gtk_widget_set_device_enabled_internal (GtkWidget *widget,
{ {
GdkWindow *window; GdkWindow *window;
window = gtk_widget_get_window (widget); window = _gtk_widget_get_window (widget);
device_enable_foreach_window (window, &data); device_enable_foreach_window (window, &data);
} }
else else
{ {
GList *window_list; GList *window_list;
window_list = gdk_window_peek_children (gtk_widget_get_window (widget)); window_list = gdk_window_peek_children (_gtk_widget_get_window (widget));
g_list_foreach (window_list, device_enable_foreach_window, &data); g_list_foreach (window_list, device_enable_foreach_window, &data);
} }
@ -5661,7 +5661,7 @@ gtk_widget_get_frame_clock (GtkWidget *widget)
* reparenting windows and widgets. * reparenting windows and widgets.
*/ */
GtkWidget *toplevel = _gtk_widget_get_toplevel (widget); GtkWidget *toplevel = _gtk_widget_get_toplevel (widget);
GdkWindow *window = gtk_widget_get_window (toplevel); GdkWindow *window = _gtk_widget_get_window (toplevel);
g_assert (window != NULL); g_assert (window != NULL);
return gdk_window_get_frame_clock (window); return gdk_window_get_frame_clock (window);
@ -7000,7 +7000,7 @@ _gtk_widget_draw (GtkWidget *widget,
if (push_group) if (push_group)
cairo_push_group (cr); cairo_push_group (cr);
window = gtk_widget_get_window (widget); window = _gtk_widget_get_window (widget);
if (_gtk_widget_get_has_window (widget)) if (_gtk_widget_get_has_window (widget))
{ {
/* The widget will be completely contained in its window, so just /* The widget will be completely contained in its window, so just
@ -7421,7 +7421,7 @@ _gtk_widget_get_translation_to_window (GtkWidget *widget,
*y = 0; *y = 0;
} }
widget_window = gtk_widget_get_window (widget); widget_window = _gtk_widget_get_window (widget);
for (w = window; w && w != widget_window; w = gdk_window_get_parent (w)) for (w = window; w && w != widget_window; w = gdk_window_get_parent (w))
{ {
@ -7921,7 +7921,7 @@ gtk_widget_intersect (GtkWidget *widget,
* cairo_region_intersect_rectangle() to get the same behavior. * cairo_region_intersect_rectangle() to get the same behavior.
*/ */
cairo_region_t * cairo_region_t *
gtk_widget_region_intersect (GtkWidget *widget, gtk_widget_region_intersect (GtkWidget *widget,
const cairo_region_t *region) const cairo_region_t *region)
{ {
GdkRectangle rect; GdkRectangle rect;
@ -7930,7 +7930,7 @@ gtk_widget_region_intersect (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
g_return_val_if_fail (region != NULL, NULL); g_return_val_if_fail (region != NULL, NULL);
gtk_widget_get_allocation (widget, &rect); _gtk_widget_get_allocation (widget, &rect);
dest = cairo_region_create_rectangle (&rect); dest = cairo_region_create_rectangle (&rect);
@ -10773,7 +10773,7 @@ gtk_widget_get_scale_factor (GtkWidget *widget)
g_return_val_if_fail (GTK_IS_WIDGET (widget), 1); g_return_val_if_fail (GTK_IS_WIDGET (widget), 1);
if (_gtk_widget_get_realized (widget)) if (_gtk_widget_get_realized (widget))
return gdk_window_get_scale_factor (gtk_widget_get_window (widget)); return gdk_window_get_scale_factor (_gtk_widget_get_window (widget));
toplevel = _gtk_widget_get_toplevel (widget); toplevel = _gtk_widget_get_toplevel (widget);
if (toplevel && toplevel != widget) if (toplevel && toplevel != widget)
@ -13585,8 +13585,8 @@ gtk_widget_queue_compute_expand (GtkWidget *widget)
* Returns: whether widget tree rooted here should be expanded * Returns: whether widget tree rooted here should be expanded
*/ */
gboolean gboolean
gtk_widget_compute_expand (GtkWidget *widget, gtk_widget_compute_expand (GtkWidget *widget,
GtkOrientation orientation) GtkOrientation orientation)
{ {
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
@ -13597,13 +13597,9 @@ gtk_widget_compute_expand (GtkWidget *widget,
gtk_widget_update_computed_expand (widget); gtk_widget_update_computed_expand (widget);
if (orientation == GTK_ORIENTATION_HORIZONTAL) if (orientation == GTK_ORIENTATION_HORIZONTAL)
{ return widget->priv->computed_hexpand;
return widget->priv->computed_hexpand;
}
else else
{ return widget->priv->computed_vexpand;
return widget->priv->computed_vexpand;
}
} }
static void static void
@ -15553,7 +15549,7 @@ _gtk_widget_set_simple_clip (GtkWidget *widget,
context = _gtk_widget_get_style_context (widget); context = _gtk_widget_get_style_context (widget);
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
_gtk_css_shadows_value_get_extents (_gtk_style_context_peek_property (context, _gtk_css_shadows_value_get_extents (_gtk_style_context_peek_property (context,
GTK_CSS_PROPERTY_BOX_SHADOW), GTK_CSS_PROPERTY_BOX_SHADOW),
@ -16049,7 +16045,7 @@ _gtk_widget_set_has_focus (GtkWidget *widget,
* *
* fevent->focus_change.type = GDK_FOCUS_CHANGE; * fevent->focus_change.type = GDK_FOCUS_CHANGE;
* fevent->focus_change.in = TRUE; * fevent->focus_change.in = TRUE;
* fevent->focus_change.window = gtk_widget_get_window (widget); * fevent->focus_change.window = _gtk_widget_get_window (widget);
* if (fevent->focus_change.window != NULL) * if (fevent->focus_change.window != NULL)
* g_object_ref (fevent->focus_change.window); * g_object_ref (fevent->focus_change.window);
* *

View File

@ -382,6 +382,19 @@ _gtk_widget_peek_request_cache (GtkWidget *widget)
return &widget->priv->requests; return &widget->priv->requests;
} }
static inline GdkWindow *
_gtk_widget_get_window (GtkWidget *widget)
{
return widget->priv->window;
}
static inline void
_gtk_widget_get_allocation (GtkWidget *widget,
GtkAllocation *allocation)
{
*allocation = widget->priv->allocation;
}
G_END_DECLS G_END_DECLS
#endif /* __GTK_WIDGET_PRIVATE_H__ */ #endif /* __GTK_WIDGET_PRIVATE_H__ */

View File

@ -1284,7 +1284,7 @@ send_delete_event (gpointer data)
event = gdk_event_new (GDK_DELETE); event = gdk_event_new (GDK_DELETE);
event->any.window = g_object_ref (gtk_widget_get_window (window)); event->any.window = g_object_ref (_gtk_widget_get_window (window));
event->any.send_event = TRUE; event->any.send_event = TRUE;
priv->delete_event_handler = 0; priv->delete_event_handler = 0;
@ -1367,9 +1367,9 @@ gtk_window_titlebar_action (GtkWindow *window,
else if (g_str_has_prefix (action, "toggle-maximize")) else if (g_str_has_prefix (action, "toggle-maximize"))
_gtk_window_toggle_maximized (window); _gtk_window_toggle_maximized (window);
else if (g_str_equal (action, "lower")) else if (g_str_equal (action, "lower"))
gdk_window_lower (gtk_widget_get_window (GTK_WIDGET (window))); gdk_window_lower (_gtk_widget_get_window (GTK_WIDGET (window)));
else if (g_str_equal (action, "minimize")) else if (g_str_equal (action, "minimize"))
gdk_window_iconify (gtk_widget_get_window (GTK_WIDGET (window))); gdk_window_iconify (_gtk_widget_get_window (GTK_WIDGET (window)));
else if (g_str_equal (action, "menu")) else if (g_str_equal (action, "menu"))
gtk_window_do_popup (window, (GdkEventButton*) event); gtk_window_do_popup (window, (GdkEventButton*) event);
else else
@ -1439,7 +1439,7 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture,
event_widget = gtk_get_event_widget ((GdkEvent*) event); event_widget = gtk_get_event_widget ((GdkEvent*) event);
if (region == GTK_WINDOW_REGION_TITLE) if (region == GTK_WINDOW_REGION_TITLE)
gdk_window_raise (gtk_widget_get_window (widget)); gdk_window_raise (_gtk_widget_get_window (widget));
switch (region) switch (region)
{ {
@ -1470,7 +1470,7 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture,
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED); gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
gdk_event_get_root_coords (event, &x_root, &y_root); gdk_event_get_root_coords (event, &x_root, &y_root);
gdk_window_begin_resize_drag_for_device (gtk_widget_get_window (widget), gdk_window_begin_resize_drag_for_device (_gtk_widget_get_window (widget),
(GdkWindowEdge) region, (GdkWindowEdge) region,
gdk_event_get_device ((GdkEvent *) event), gdk_event_get_device ((GdkEvent *) event),
GDK_BUTTON_PRIMARY, GDK_BUTTON_PRIMARY,
@ -1555,10 +1555,10 @@ drag_gesture_update_cb (GtkGestureDrag *gesture,
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED); gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
gtk_gesture_drag_get_start_point (gesture, &start_x, &start_y); gtk_gesture_drag_get_start_point (gesture, &start_x, &start_y);
gdk_window_get_root_coords (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_get_root_coords (_gtk_widget_get_window (GTK_WIDGET (window)),
start_x, start_y, &x_root, &y_root); start_x, start_y, &x_root, &y_root);
gdk_window_begin_move_drag_for_device (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_begin_move_drag_for_device (_gtk_widget_get_window (GTK_WIDGET (window)),
gtk_gesture_get_device (GTK_GESTURE (gesture)), gtk_gesture_get_device (GTK_GESTURE (gesture)),
gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)), gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)),
x_root, y_root, x_root, y_root,
@ -2260,7 +2260,7 @@ gtk_window_set_title_internal (GtkWindow *window,
new_title = ""; new_title = "";
if (_gtk_widget_get_realized (widget)) if (_gtk_widget_get_realized (widget))
gdk_window_set_title (gtk_widget_get_window (widget), new_title); gdk_window_set_title (_gtk_widget_get_window (widget), new_title);
if (update_titlebar && GTK_IS_HEADER_BAR (priv->title_box)) if (update_titlebar && GTK_IS_HEADER_BAR (priv->title_box))
gtk_header_bar_set_title (GTK_HEADER_BAR (priv->title_box), new_title); gtk_header_bar_set_title (GTK_HEADER_BAR (priv->title_box), new_title);
@ -2384,7 +2384,7 @@ gtk_window_set_role (GtkWindow *window,
priv->wm_role = new_role; priv->wm_role = new_role;
if (_gtk_widget_get_realized (widget)) if (_gtk_widget_get_realized (widget))
gdk_window_set_role (gtk_widget_get_window (widget), priv->wm_role); gdk_window_set_role (_gtk_widget_get_window (widget), priv->wm_role);
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_ROLE]); g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_ROLE]);
} }
@ -2427,7 +2427,7 @@ gtk_window_set_startup_id (GtkWindow *window,
GdkWindow *gdk_window; GdkWindow *gdk_window;
guint32 timestamp = extract_time_from_startup_id (priv->startup_id); guint32 timestamp = extract_time_from_startup_id (priv->startup_id);
gdk_window = gtk_widget_get_window (widget); gdk_window = _gtk_widget_get_window (widget);
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
if (timestamp != GDK_CURRENT_TIME && GDK_IS_X11_WINDOW(gdk_window)) if (timestamp != GDK_CURRENT_TIME && GDK_IS_X11_WINDOW(gdk_window))
@ -2985,7 +2985,7 @@ gtk_window_set_modal (GtkWindow *window,
/* adjust desired modality state */ /* adjust desired modality state */
if (_gtk_widget_get_realized (widget)) if (_gtk_widget_get_realized (widget))
gdk_window_set_modal_hint (gtk_widget_get_window (widget), priv->modal); gdk_window_set_modal_hint (_gtk_widget_get_window (widget), priv->modal);
if (gtk_widget_get_visible (widget)) if (gtk_widget_get_visible (widget))
{ {
@ -3112,8 +3112,8 @@ gtk_window_transient_parent_realized (GtkWidget *parent,
GtkWidget *window) GtkWidget *window)
{ {
if (_gtk_widget_get_realized (window)) if (_gtk_widget_get_realized (window))
gdk_window_set_transient_for (gtk_widget_get_window (window), gdk_window_set_transient_for (_gtk_widget_get_window (window),
gtk_widget_get_window (parent)); _gtk_widget_get_window (parent));
} }
static void static void
@ -3121,7 +3121,7 @@ gtk_window_transient_parent_unrealized (GtkWidget *parent,
GtkWidget *window) GtkWidget *window)
{ {
if (_gtk_widget_get_realized (window)) if (_gtk_widget_get_realized (window))
gdk_property_delete (gtk_widget_get_window (window), gdk_property_delete (_gtk_widget_get_window (window),
gdk_atom_intern_static_string ("WM_TRANSIENT_FOR")); gdk_atom_intern_static_string ("WM_TRANSIENT_FOR"));
} }
@ -3489,7 +3489,7 @@ gtk_window_set_type_hint (GtkWindow *window,
priv->type_hint = hint; priv->type_hint = hint;
gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
if (gdk_window) if (gdk_window)
gdk_window_set_type_hint (gdk_window, hint); gdk_window_set_type_hint (gdk_window, hint);
@ -3540,7 +3540,7 @@ gtk_window_set_skip_taskbar_hint (GtkWindow *window,
{ {
priv->skips_taskbar = setting; priv->skips_taskbar = setting;
if (_gtk_widget_get_realized (GTK_WIDGET (window))) if (_gtk_widget_get_realized (GTK_WIDGET (window)))
gdk_window_set_skip_taskbar_hint (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_set_skip_taskbar_hint (_gtk_widget_get_window (GTK_WIDGET (window)),
priv->skips_taskbar); priv->skips_taskbar);
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_SKIP_TASKBAR_HINT]); g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_SKIP_TASKBAR_HINT]);
} }
@ -3593,7 +3593,7 @@ gtk_window_set_skip_pager_hint (GtkWindow *window,
{ {
priv->skips_pager = setting; priv->skips_pager = setting;
if (_gtk_widget_get_realized (GTK_WIDGET (window))) if (_gtk_widget_get_realized (GTK_WIDGET (window)))
gdk_window_set_skip_pager_hint (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_set_skip_pager_hint (_gtk_widget_get_window (GTK_WIDGET (window)),
priv->skips_pager); priv->skips_pager);
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_SKIP_PAGER_HINT]); g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_SKIP_PAGER_HINT]);
} }
@ -3643,7 +3643,7 @@ gtk_window_set_urgency_hint (GtkWindow *window,
{ {
priv->urgent = setting; priv->urgent = setting;
if (_gtk_widget_get_realized (GTK_WIDGET (window))) if (_gtk_widget_get_realized (GTK_WIDGET (window)))
gdk_window_set_urgency_hint (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_set_urgency_hint (_gtk_widget_get_window (GTK_WIDGET (window)),
priv->urgent); priv->urgent);
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_URGENCY_HINT]); g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_URGENCY_HINT]);
} }
@ -3693,7 +3693,7 @@ gtk_window_set_accept_focus (GtkWindow *window,
{ {
priv->accept_focus = setting; priv->accept_focus = setting;
if (_gtk_widget_get_realized (GTK_WIDGET (window))) if (_gtk_widget_get_realized (GTK_WIDGET (window)))
gdk_window_set_accept_focus (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_set_accept_focus (_gtk_widget_get_window (GTK_WIDGET (window)),
priv->accept_focus); priv->accept_focus);
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_ACCEPT_FOCUS]); g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_ACCEPT_FOCUS]);
} }
@ -3744,7 +3744,7 @@ gtk_window_set_focus_on_map (GtkWindow *window,
{ {
priv->focus_on_map = setting; priv->focus_on_map = setting;
if (_gtk_widget_get_realized (GTK_WIDGET (window))) if (_gtk_widget_get_realized (GTK_WIDGET (window)))
gdk_window_set_focus_on_map (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_set_focus_on_map (_gtk_widget_get_window (GTK_WIDGET (window)),
priv->focus_on_map); priv->focus_on_map);
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_FOCUS_ON_MAP]); g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_FOCUS_ON_MAP]);
} }
@ -3831,7 +3831,7 @@ gtk_window_apply_hide_titlebar_when_maximized (GtkWindow *window)
gboolean setting; gboolean setting;
setting = window->priv->hide_titlebar_when_maximized; setting = window->priv->hide_titlebar_when_maximized;
gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
if (GDK_IS_X11_WINDOW (gdk_window)) if (GDK_IS_X11_WINDOW (gdk_window))
gdk_x11_window_set_hide_titlebar_when_maximized (gdk_window, setting); gdk_x11_window_set_hide_titlebar_when_maximized (gdk_window, setting);
@ -4209,7 +4209,7 @@ gtk_window_set_decorated (GtkWindow *window,
priv->decorated = setting; priv->decorated = setting;
gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
if (gdk_window) if (gdk_window)
{ {
if (priv->decorated) if (priv->decorated)
@ -4282,7 +4282,7 @@ gtk_window_set_deletable (GtkWindow *window,
priv->deletable = setting; priv->deletable = setting;
gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
if (gdk_window) if (gdk_window)
{ {
if (priv->deletable) if (priv->deletable)
@ -4398,7 +4398,7 @@ gtk_window_realize_icon (GtkWindow *window)
GList *icon_list; GList *icon_list;
widget = GTK_WIDGET (window); widget = GTK_WIDGET (window);
gdk_window = gtk_widget_get_window (widget); gdk_window = _gtk_widget_get_window (widget);
g_return_if_fail (gdk_window != NULL); g_return_if_fail (gdk_window != NULL);
@ -4453,7 +4453,7 @@ gtk_window_realize_icon (GtkWindow *window)
info->realized = TRUE; info->realized = TRUE;
gdk_window_set_icon_list (gtk_widget_get_window (widget), icon_list); gdk_window_set_icon_list (_gtk_widget_get_window (widget), icon_list);
if (GTK_IS_HEADER_BAR (priv->title_box)) if (GTK_IS_HEADER_BAR (priv->title_box))
_gtk_header_bar_update_window_icon (GTK_HEADER_BAR (priv->title_box), window); _gtk_header_bar_update_window_icon (GTK_HEADER_BAR (priv->title_box), window);
@ -5331,8 +5331,8 @@ gtk_window_get_size (GtkWindow *window,
if (_gtk_widget_get_mapped (GTK_WIDGET (window))) if (_gtk_widget_get_mapped (GTK_WIDGET (window)))
{ {
w = gdk_window_get_width (gtk_widget_get_window (GTK_WIDGET (window))); w = gdk_window_get_width (_gtk_widget_get_window (GTK_WIDGET (window)));
h = gdk_window_get_height (gtk_widget_get_window (GTK_WIDGET (window))); h = gdk_window_get_height (_gtk_widget_get_window (GTK_WIDGET (window)));
} }
else else
{ {
@ -5410,7 +5410,7 @@ gtk_window_move (GtkWindow *window,
{ {
GtkAllocation allocation; GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
/* we have now sent a request with this position /* we have now sent a request with this position
* with currently-active constraints, so toggle flag. * with currently-active constraints, so toggle flag.
@ -5439,7 +5439,7 @@ gtk_window_move (GtkWindow *window,
* the same as the position being changed by the window * the same as the position being changed by the window
* manager. * manager.
*/ */
gdk_window_move (gtk_widget_get_window (GTK_WIDGET (window)), x, y); gdk_window_move (_gtk_widget_get_window (GTK_WIDGET (window)), x, y);
} }
else else
{ {
@ -5510,7 +5510,7 @@ gtk_window_get_position (GtkWindow *window,
priv = window->priv; priv = window->priv;
widget = GTK_WIDGET (window); widget = GTK_WIDGET (window);
gdk_window = gtk_widget_get_window (widget); gdk_window = _gtk_widget_get_window (widget);
if (priv->gravity == GDK_GRAVITY_STATIC) if (priv->gravity == GDK_GRAVITY_STATIC)
{ {
@ -5943,7 +5943,7 @@ gtk_window_show (GtkWidget *widget)
* then we created it with widget->allocation anyhow. * then we created it with widget->allocation anyhow.
*/ */
if (!was_realized) if (!was_realized)
gdk_window_move_resize (gtk_widget_get_window (widget), gdk_window_move_resize (_gtk_widget_get_window (widget),
configure_request.x, configure_request.x,
configure_request.y, configure_request.y,
configure_request.width, configure_request.width,
@ -5957,7 +5957,7 @@ gtk_window_show (GtkWidget *widget)
/* Try to make sure that we have some focused widget /* Try to make sure that we have some focused widget
*/ */
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
is_plug = GDK_IS_X11_WINDOW (gtk_widget_get_window (widget)) && is_plug = GDK_IS_X11_WINDOW (_gtk_widget_get_window (widget)) &&
GTK_IS_PLUG (window); GTK_IS_PLUG (window);
#else #else
is_plug = FALSE; is_plug = FALSE;
@ -6054,7 +6054,7 @@ gtk_window_map (GtkWidget *widget)
gtk_widget_get_child_visible (priv->title_box)) gtk_widget_get_child_visible (priv->title_box))
gtk_widget_map (priv->title_box); gtk_widget_map (priv->title_box);
gdk_window = gtk_widget_get_window (widget); gdk_window = _gtk_widget_get_window (widget);
if (priv->maximize_initially) if (priv->maximize_initially)
gdk_window_maximize (gdk_window); gdk_window_maximize (gdk_window);
@ -6159,7 +6159,7 @@ gtk_window_map_event (GtkWidget *widget,
* the window being unmapped. more details can be found in: * the window being unmapped. more details can be found in:
* http://bugzilla.gnome.org/show_bug.cgi?id=316180 * http://bugzilla.gnome.org/show_bug.cgi?id=316180
*/ */
gdk_window_hide (gtk_widget_get_window (widget)); gdk_window_hide (_gtk_widget_get_window (widget));
} }
return FALSE; return FALSE;
} }
@ -6190,7 +6190,7 @@ gtk_window_unmap (GtkWidget *widget)
popover_unmap (popover->widget, popover); popover_unmap (popover->widget, popover);
} }
gdk_window = gtk_widget_get_window (widget); gdk_window = _gtk_widget_get_window (widget);
gtk_widget_set_mapped (widget, FALSE); gtk_widget_set_mapped (widget, FALSE);
gdk_window_withdraw (gdk_window); gdk_window_withdraw (gdk_window);
@ -6254,7 +6254,7 @@ gtk_window_guess_default_size (GtkWindow *window,
widget = GTK_WIDGET (window); widget = GTK_WIDGET (window);
screen = _gtk_window_get_screen (window); screen = _gtk_window_get_screen (window);
gdkwindow = gtk_widget_get_window (widget); gdkwindow = _gtk_widget_get_window (widget);
if (gdkwindow) if (gdkwindow)
{ {
@ -6302,7 +6302,7 @@ gtk_window_get_remembered_size (GtkWindow *window,
*width = 0; *width = 0;
*height = 0; *height = 0;
gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
if (gdk_window) if (gdk_window)
{ {
*width = gdk_window_get_width (gdk_window); *width = gdk_window_get_width (gdk_window);
@ -6330,7 +6330,7 @@ popover_get_rect (GtkWindowPopover *popover,
gdouble min, max; gdouble min, max;
gtk_widget_get_preferred_size (popover->widget, NULL, &req); gtk_widget_get_preferred_size (popover->widget, NULL, &req);
gtk_widget_get_allocation (GTK_WIDGET (window), &win_alloc); _gtk_widget_get_allocation (GTK_WIDGET (window), &win_alloc);
get_shadow_width (window, &win_border); get_shadow_width (window, &win_border);
win_alloc.x += win_border.left; win_alloc.x += win_border.left;
@ -6454,7 +6454,7 @@ popover_realize (GtkWidget *widget,
#endif #endif
{ {
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
parent_window = gtk_widget_get_window (GTK_WIDGET (window)); parent_window = _gtk_widget_get_window (GTK_WIDGET (window));
} }
attributes.wclass = GDK_INPUT_OUTPUT; attributes.wclass = GDK_INPUT_OUTPUT;
@ -6473,7 +6473,7 @@ popover_realize (GtkWidget *widget,
#ifdef GDK_WINDOWING_WAYLAND #ifdef GDK_WINDOWING_WAYLAND
if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget))) if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
gdk_window_set_transient_for (popover->window, gdk_window_set_transient_for (popover->window,
gtk_widget_get_window (GTK_WIDGET (window))); _gtk_widget_get_window (GTK_WIDGET (window)));
#endif #endif
gtk_widget_set_parent_window (popover->widget, popover->window); gtk_widget_set_parent_window (popover->widget, popover->window);
@ -6866,7 +6866,7 @@ update_shadow_width (GtkWindow *window,
{ {
GdkWindow *gdk_window; GdkWindow *gdk_window;
gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
if (gdk_window) if (gdk_window)
gdk_window_set_shadow_width (gdk_window, gdk_window_set_shadow_width (gdk_window,
@ -6960,7 +6960,7 @@ update_opaque_region (GtkWindow *window,
opaque_region = NULL; opaque_region = NULL;
} }
gdk_window_set_opaque_region (gtk_widget_get_window (widget), opaque_region); gdk_window_set_opaque_region (_gtk_widget_get_window (widget), opaque_region);
cairo_region_destroy (opaque_region); cairo_region_destroy (opaque_region);
} }
@ -7002,7 +7002,7 @@ gtk_window_realize (GtkWidget *widget)
if (!priv->client_decorated && gtk_window_should_use_csd (window)) if (!priv->client_decorated && gtk_window_should_use_csd (window))
create_decoration (widget); create_decoration (widget);
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
if (gtk_widget_get_parent_window (widget)) if (gtk_widget_get_parent_window (widget))
{ {
@ -7061,7 +7061,7 @@ gtk_window_realize (GtkWidget *widget)
if (priv->hardcoded_window) if (priv->hardcoded_window)
{ {
gdk_window = priv->hardcoded_window; gdk_window = priv->hardcoded_window;
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
gdk_window_resize (gdk_window, allocation.width, allocation.height); gdk_window_resize (gdk_window, allocation.width, allocation.height);
} }
else else
@ -7094,7 +7094,7 @@ gtk_window_realize (GtkWidget *widget)
attributes_mask = 0; attributes_mask = 0;
parent_window = gdk_screen_get_root_window (_gtk_window_get_screen (window)); parent_window = gdk_screen_get_root_window (_gtk_window_get_screen (window));
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
attributes.width = allocation.width; attributes.width = allocation.width;
attributes.height = allocation.height; attributes.height = allocation.height;
attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask = gtk_widget_get_events (widget);
@ -7166,7 +7166,7 @@ gtk_window_realize (GtkWidget *widget)
if (priv->transient_parent && if (priv->transient_parent &&
_gtk_widget_get_realized (GTK_WIDGET (priv->transient_parent))) _gtk_widget_get_realized (GTK_WIDGET (priv->transient_parent)))
gdk_window_set_transient_for (gdk_window, gdk_window_set_transient_for (gdk_window,
gtk_widget_get_window (GTK_WIDGET (priv->transient_parent))); _gtk_widget_get_window (GTK_WIDGET (priv->transient_parent)));
if (priv->wm_role) if (priv->wm_role)
gdk_window_set_role (gdk_window, priv->wm_role); gdk_window_set_role (gdk_window, priv->wm_role);
@ -7462,7 +7462,7 @@ _gtk_window_set_allocation (GtkWindow *window,
if (!_gtk_widget_is_toplevel (widget) && _gtk_widget_get_realized (widget)) if (!_gtk_widget_is_toplevel (widget) && _gtk_widget_get_realized (widget))
{ {
gdk_window_move_resize (gtk_widget_get_window (widget), gdk_window_move_resize (_gtk_widget_get_window (widget),
allocation->x, allocation->y, allocation->x, allocation->y,
allocation->width, allocation->height); allocation->width, allocation->height);
} }
@ -7521,7 +7521,7 @@ gtk_window_configure_event (GtkWidget *widget,
* have been a queued resize from child widgets, and so we * have been a queued resize from child widgets, and so we
* need to reallocate our children in case *they* changed. * need to reallocate our children in case *they* changed.
*/ */
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
if (priv->configure_request_count == 0 && if (priv->configure_request_count == 0 &&
(allocation.width == event->width && (allocation.width == event->width &&
allocation.height == event->height)) allocation.height == event->height))
@ -7545,7 +7545,7 @@ gtk_window_configure_event (GtkWidget *widget,
{ {
priv->configure_request_count -= 1; priv->configure_request_count -= 1;
GDK_PRIVATE_CALL (gdk_window_thaw_toplevel_updates) (gtk_widget_get_window (widget)); GDK_PRIVATE_CALL (gdk_window_thaw_toplevel_updates) (_gtk_widget_get_window (widget));
} }
/* /*
@ -7849,7 +7849,7 @@ get_active_region_type (GtkWindow *window, GdkEventAny *event, gint x, gint y)
gtk_widget_get_visible (priv->title_box) && gtk_widget_get_visible (priv->title_box) &&
gtk_widget_get_child_visible (priv->title_box)) gtk_widget_get_child_visible (priv->title_box))
{ {
gtk_widget_get_allocation (priv->title_box, &allocation); _gtk_widget_get_allocation (priv->title_box, &allocation);
if (allocation.x <= x && allocation.x + allocation.width > x && if (allocation.x <= x && allocation.x + allocation.width > x &&
allocation.y <= y && allocation.y + allocation.height > y) allocation.y <= y && allocation.y + allocation.height > y)
return GTK_WINDOW_REGION_TITLE; return GTK_WINDOW_REGION_TITLE;
@ -7984,7 +7984,7 @@ do_focus_change (GtkWidget *widget,
/* Skip non-master keyboards that haven't /* Skip non-master keyboards that haven't
* selected for events from this window * selected for events from this window
*/ */
window = gtk_widget_get_window (widget); window = _gtk_widget_get_window (widget);
if (gdk_device_get_device_type (dev) != GDK_DEVICE_TYPE_MASTER && if (gdk_device_get_device_type (dev) != GDK_DEVICE_TYPE_MASTER &&
window && !gdk_window_get_device_events (window, dev)) window && !gdk_window_get_device_events (window, dev))
continue; continue;
@ -8028,7 +8028,7 @@ gtk_window_has_mnemonic_modifier_pressed (GtkWindow *window)
{ {
GdkModifierType mask; GdkModifierType mask;
gdk_device_get_state (dev, gtk_widget_get_window (GTK_WIDGET (window)), gdk_device_get_state (dev, _gtk_widget_get_window (GTK_WIDGET (window)),
NULL, &mask); NULL, &mask);
if (window->priv->mnemonic_modifier == (mask & gtk_accelerator_get_default_mod_mask ())) if (window->priv->mnemonic_modifier == (mask & gtk_accelerator_get_default_mod_mask ()))
{ {
@ -8709,7 +8709,7 @@ static void
gtk_window_do_popup (GtkWindow *window, gtk_window_do_popup (GtkWindow *window,
GdkEventButton *event) GdkEventButton *event)
{ {
if (!gdk_window_show_window_menu (gtk_widget_get_window (GTK_WIDGET (window)), if (!gdk_window_show_window_menu (_gtk_widget_get_window (GTK_WIDGET (window)),
(GdkEvent *) event)) (GdkEvent *) event))
gtk_window_do_popup_fallback (window, event); gtk_window_do_popup_fallback (window, event);
} }
@ -9015,7 +9015,7 @@ gtk_window_compute_configure_request (GtkWindow *window,
g_assert (_gtk_widget_get_mapped (parent_widget)); /* established earlier */ g_assert (_gtk_widget_get_mapped (parent_widget)); /* established earlier */
gdk_window = gtk_widget_get_window (parent_widget); gdk_window = _gtk_widget_get_window (parent_widget);
if (gdk_window != NULL) if (gdk_window != NULL)
monitor_num = gdk_screen_get_monitor_at_window (screen, monitor_num = gdk_screen_get_monitor_at_window (screen,
@ -9026,7 +9026,7 @@ gtk_window_compute_configure_request (GtkWindow *window,
gdk_window_get_origin (gdk_window, gdk_window_get_origin (gdk_window,
&ox, &oy); &ox, &oy);
gtk_widget_get_allocation (parent_widget, &allocation); _gtk_widget_get_allocation (parent_widget, &allocation);
x = ox + (allocation.width - w) / 2; x = ox + (allocation.width - w) / 2;
y = oy + (allocation.height - h) / 2; y = oy + (allocation.height - h) / 2;
@ -9181,7 +9181,7 @@ gtk_window_move_resize (GtkWindow *window)
widget = GTK_WIDGET (window); widget = GTK_WIDGET (window);
gdk_window = gtk_widget_get_window (widget); gdk_window = _gtk_widget_get_window (widget);
container = GTK_CONTAINER (widget); container = GTK_CONTAINER (widget);
info = gtk_window_get_geometry_info (window, TRUE); info = gtk_window_get_geometry_info (window, TRUE);
@ -9780,10 +9780,10 @@ gtk_window_draw (GtkWidget *widget,
context = gtk_widget_get_style_context (widget); context = gtk_widget_get_style_context (widget);
get_shadow_width (GTK_WINDOW (widget), &window_border); get_shadow_width (GTK_WINDOW (widget), &window_border);
gtk_widget_get_allocation (widget, &allocation); _gtk_widget_get_allocation (widget, &allocation);
if (!gtk_widget_get_app_paintable (widget) && if (!gtk_widget_get_app_paintable (widget) &&
gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget))) gtk_cairo_should_draw_window (cr, _gtk_widget_get_window (widget)))
{ {
if (priv->client_decorated && if (priv->client_decorated &&
priv->decorated && priv->decorated &&
@ -9909,7 +9909,7 @@ gtk_window_present_with_time (GtkWindow *window,
if (gtk_widget_get_visible (widget)) if (gtk_widget_get_visible (widget))
{ {
gdk_window = gtk_widget_get_window (widget); gdk_window = _gtk_widget_get_window (widget);
g_assert (gdk_window != NULL); g_assert (gdk_window != NULL);
@ -9968,7 +9968,7 @@ gtk_window_iconify (GtkWindow *window)
window->priv->iconify_initially = TRUE; window->priv->iconify_initially = TRUE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_iconify (toplevel); gdk_window_iconify (toplevel);
@ -9996,7 +9996,7 @@ gtk_window_deiconify (GtkWindow *window)
window->priv->iconify_initially = FALSE; window->priv->iconify_initially = FALSE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_deiconify (toplevel); gdk_window_deiconify (toplevel);
@ -10028,7 +10028,7 @@ gtk_window_stick (GtkWindow *window)
window->priv->stick_initially = TRUE; window->priv->stick_initially = TRUE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_stick (toplevel); gdk_window_stick (toplevel);
@ -10057,7 +10057,7 @@ gtk_window_unstick (GtkWindow *window)
window->priv->stick_initially = FALSE; window->priv->stick_initially = FALSE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_unstick (toplevel); gdk_window_unstick (toplevel);
@ -10092,7 +10092,7 @@ gtk_window_maximize (GtkWindow *window)
window->priv->maximize_initially = TRUE; window->priv->maximize_initially = TRUE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_maximize (toplevel); gdk_window_maximize (toplevel);
@ -10121,7 +10121,7 @@ gtk_window_unmaximize (GtkWindow *window)
window->priv->maximize_initially = FALSE; window->priv->maximize_initially = FALSE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_unmaximize (toplevel); gdk_window_unmaximize (toplevel);
@ -10153,7 +10153,7 @@ gtk_window_fullscreen (GtkWindow *window)
window->priv->fullscreen_initially = TRUE; window->priv->fullscreen_initially = TRUE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_fullscreen (toplevel); gdk_window_fullscreen (toplevel);
@ -10195,7 +10195,7 @@ gtk_window_fullscreen_on_monitor (GtkWindow *window,
priv->initial_fullscreen_monitor = monitor; priv->initial_fullscreen_monitor = monitor;
priv->fullscreen_initially = TRUE; priv->fullscreen_initially = TRUE;
toplevel = gtk_widget_get_window (widget); toplevel = _gtk_widget_get_window (widget);
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_fullscreen_on_monitor (toplevel, monitor); gdk_window_fullscreen_on_monitor (toplevel, monitor);
@ -10228,7 +10228,7 @@ gtk_window_unfullscreen (GtkWindow *window)
window->priv->initial_fullscreen_monitor = -1; window->priv->initial_fullscreen_monitor = -1;
window->priv->fullscreen_initially = FALSE; window->priv->fullscreen_initially = FALSE;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_unfullscreen (toplevel); gdk_window_unfullscreen (toplevel);
@ -10275,7 +10275,7 @@ gtk_window_set_keep_above (GtkWindow *window,
window->priv->above_initially = setting; window->priv->above_initially = setting;
window->priv->below_initially &= !setting; window->priv->below_initially &= !setting;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_set_keep_above (toplevel, setting); gdk_window_set_keep_above (toplevel, setting);
@ -10322,7 +10322,7 @@ gtk_window_set_keep_below (GtkWindow *window,
window->priv->below_initially = setting; window->priv->below_initially = setting;
window->priv->above_initially &= !setting; window->priv->above_initially &= !setting;
toplevel = gtk_widget_get_window (GTK_WIDGET (window)); toplevel = _gtk_widget_get_window (GTK_WIDGET (window));
if (toplevel != NULL) if (toplevel != NULL)
gdk_window_set_keep_below (toplevel, setting); gdk_window_set_keep_below (toplevel, setting);
@ -10458,7 +10458,7 @@ gtk_window_begin_resize_drag (GtkWindow *window,
widget = GTK_WIDGET (window); widget = GTK_WIDGET (window);
g_return_if_fail (gtk_widget_get_visible (widget)); g_return_if_fail (gtk_widget_get_visible (widget));
toplevel = gtk_widget_get_window (widget); toplevel = _gtk_widget_get_window (widget);
gdk_window_begin_resize_drag (toplevel, gdk_window_begin_resize_drag (toplevel,
edge, button, edge, button,
@ -10495,7 +10495,7 @@ gtk_window_begin_move_drag (GtkWindow *window,
widget = GTK_WIDGET (window); widget = GTK_WIDGET (window);
g_return_if_fail (gtk_widget_get_visible (widget)); g_return_if_fail (gtk_widget_get_visible (widget));
toplevel = gtk_widget_get_window (widget); toplevel = _gtk_widget_get_window (widget);
gdk_window_begin_move_drag (toplevel, gdk_window_begin_move_drag (toplevel,
button, button,
@ -10603,7 +10603,7 @@ gtk_window_set_theme_variant (GtkWindow *window)
"gtk-application-prefer-dark-theme", &dark_theme_requested, "gtk-application-prefer-dark-theme", &dark_theme_requested,
NULL); NULL);
gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
if (GDK_IS_X11_WINDOW (gdk_window)) if (GDK_IS_X11_WINDOW (gdk_window))
gdk_x11_window_set_theme_variant (gdk_window, gdk_x11_window_set_theme_variant (gdk_window,
@ -11807,7 +11807,7 @@ ensure_state_flag_backdrop (GtkWidget *widget)
GdkWindow *window; GdkWindow *window;
gboolean window_focused = TRUE; gboolean window_focused = TRUE;
window = gtk_widget_get_window (widget); window = _gtk_widget_get_window (widget);
window_focused = gdk_window_get_state (window) & GDK_WINDOW_STATE_FOCUSED; window_focused = gdk_window_get_state (window) & GDK_WINDOW_STATE_FOCUSED;