forked from AuroraMiddleware/gtk
GtkWidget: Start renaming widget->window
This is an automated change doing these command: git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface git sed -f g gtk_widget_set_window gtk_widget_set_surface git sed -f g gtk_widget_get_window gtk_widget_get_surface git sed -f g gtk_widget_register_window gtk_widget_register_surface git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface git checkout NEWS*
This commit is contained in:
parent
3dce0dcca7
commit
63e060a21d
@ -475,7 +475,7 @@ surface_state_changed (GtkWidget *widget)
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
GdkSurfaceState new_state;
|
||||
|
||||
new_state = gdk_surface_get_state (gtk_widget_get_window (widget));
|
||||
new_state = gdk_surface_get_state (gtk_widget_get_surface (widget));
|
||||
window->maximized = (new_state & GDK_SURFACE_STATE_MAXIMIZED) != 0;
|
||||
window->fullscreen = (new_state & GDK_SURFACE_STATE_FULLSCREEN) != 0;
|
||||
}
|
||||
@ -485,14 +485,14 @@ demo_application_window_realize (GtkWidget *widget)
|
||||
{
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->realize (widget);
|
||||
|
||||
g_signal_connect_swapped (gtk_widget_get_window (widget), "notify::state",
|
||||
g_signal_connect_swapped (gtk_widget_get_surface (widget), "notify::state",
|
||||
G_CALLBACK (surface_state_changed), widget);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_unrealize (GtkWidget *widget)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (gtk_widget_get_window (widget),
|
||||
g_signal_handlers_disconnect_by_func (gtk_widget_get_surface (widget),
|
||||
surface_state_changed, widget);
|
||||
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->unrealize (widget);
|
||||
|
@ -128,7 +128,7 @@ query_for_toplevel (GdkDisplay *display,
|
||||
device = gtk_get_current_event_device ();
|
||||
|
||||
if (gdk_seat_grab (gdk_device_get_seat (device),
|
||||
gtk_widget_get_window (popup),
|
||||
gtk_widget_get_surface (popup),
|
||||
GDK_SEAT_CAPABILITY_ALL_POINTING,
|
||||
FALSE, cursor, NULL, NULL, NULL) == GDK_GRAB_SUCCESS)
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ pressed_cb (GtkGesture *gesture,
|
||||
rect.height = 0;
|
||||
|
||||
gtk_menu_popup_at_rect (GTK_MENU (menu),
|
||||
gtk_widget_get_window (widget),
|
||||
gtk_widget_get_surface (widget),
|
||||
&rect,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
|
@ -208,7 +208,7 @@ plane_drag_gesture_end (GtkGestureDrag *gesture,
|
||||
static void
|
||||
gtk_font_plane_init (GtkFontPlane *plane)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (plane), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (plane), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (plane), TRUE);
|
||||
|
||||
plane->drag_gesture = gtk_gesture_drag_new (GTK_WIDGET (plane));
|
||||
|
@ -56,7 +56,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkFishbowl, gtk_fishbowl, GTK_TYPE_CONTAINER)
|
||||
static void
|
||||
gtk_fishbowl_init (GtkFishbowl *fishbowl)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (fishbowl), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (fishbowl), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,7 +64,7 @@ get_idle (gpointer data)
|
||||
GtkApplication *app = gtk_window_get_application (GTK_WINDOW (window));
|
||||
|
||||
gtk_widget_set_sensitive (window, TRUE);
|
||||
gdk_surface_set_cursor (gtk_widget_get_window (window), NULL);
|
||||
gdk_surface_set_cursor (gtk_widget_get_surface (window), NULL);
|
||||
g_application_unmark_busy (G_APPLICATION (app));
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
@ -81,7 +81,7 @@ get_busy (GSimpleAction *action,
|
||||
|
||||
g_application_mark_busy (G_APPLICATION (app));
|
||||
cursor = gdk_cursor_new_from_name ("wait", NULL);
|
||||
gdk_surface_set_cursor (gtk_widget_get_window (window), cursor);
|
||||
gdk_surface_set_cursor (gtk_widget_get_surface (window), cursor);
|
||||
g_object_unref (cursor);
|
||||
g_timeout_add (5000, get_idle, window);
|
||||
|
||||
|
@ -196,7 +196,7 @@
|
||||
A widget that does not have a GdkSurface of its own on which to
|
||||
draw its contents, but rather shares its <glossterm
|
||||
linkend="parent">parent's</glossterm>. This can be tested with
|
||||
the gtk_widget_get_has_window() function.
|
||||
the gtk_widget_get_has_surface() function.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
@ -230,7 +230,7 @@
|
||||
<para>
|
||||
Widgets that don't own the GdkSurface on which they draw are
|
||||
called <glossterm linkend="no-window">no-window widgets</glossterm>.
|
||||
This can be tested with the gtk_widget_get_has_window() function. Normally,
|
||||
This can be tested with the gtk_widget_get_has_surface() function. Normally,
|
||||
these widgets draw on their parent's GdkSurface.
|
||||
</para>
|
||||
|
||||
|
@ -4243,8 +4243,8 @@ gtk_widget_set_name
|
||||
gtk_widget_get_name
|
||||
gtk_widget_set_sensitive
|
||||
gtk_widget_set_parent
|
||||
gtk_widget_set_parent_window
|
||||
gtk_widget_get_parent_window
|
||||
gtk_widget_set_parent_surface
|
||||
gtk_widget_get_parent_surface
|
||||
gtk_widget_get_toplevel
|
||||
gtk_widget_get_ancestor
|
||||
gtk_widget_is_ancestor
|
||||
@ -4300,9 +4300,9 @@ gtk_widget_set_tooltip_window
|
||||
gtk_widget_get_has_tooltip
|
||||
gtk_widget_set_has_tooltip
|
||||
gtk_widget_trigger_tooltip_query
|
||||
gtk_widget_get_window
|
||||
gtk_widget_register_window
|
||||
gtk_widget_unregister_window
|
||||
gtk_widget_get_surface
|
||||
gtk_widget_register_surface
|
||||
gtk_widget_unregister_surface
|
||||
gtk_widget_get_allocated_width
|
||||
gtk_widget_get_allocated_height
|
||||
gtk_widget_get_allocation
|
||||
@ -4319,8 +4319,8 @@ gtk_widget_get_can_focus
|
||||
gtk_widget_set_can_focus
|
||||
gtk_widget_get_focus_on_click
|
||||
gtk_widget_set_focus_on_click
|
||||
gtk_widget_get_has_window
|
||||
gtk_widget_set_has_window
|
||||
gtk_widget_get_has_surface
|
||||
gtk_widget_set_has_surface
|
||||
gtk_widget_get_sensitive
|
||||
gtk_widget_is_sensitive
|
||||
gtk_widget_get_visible
|
||||
@ -4335,7 +4335,7 @@ gtk_widget_has_visible_focus
|
||||
gtk_widget_has_grab
|
||||
gtk_widget_is_drawable
|
||||
gtk_widget_is_toplevel
|
||||
gtk_widget_set_window
|
||||
gtk_widget_set_surface
|
||||
gtk_widget_set_receives_default
|
||||
gtk_widget_get_receives_default
|
||||
gtk_widget_set_support_multidevice
|
||||
|
@ -104,7 +104,7 @@
|
||||
a #GdkSurface, which in turn represents a windowing system surface in the
|
||||
backend. If a widget has grabbed the current input device, or all input
|
||||
devices, the event is propagated to that #GtkWidget. Otherwise, it is
|
||||
propagated to the the #GtkWidget which called gtk_widget_register_window()
|
||||
propagated to the the #GtkWidget which called gtk_widget_register_surface()
|
||||
on the #GdkSurface receiving the event.
|
||||
</para>
|
||||
|
||||
|
@ -235,7 +235,7 @@ shoot_one (WidgetInfo *info)
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
window = gtk_widget_get_window (info->window);
|
||||
window = gtk_widget_get_surface (info->window);
|
||||
id = gdk_x11_surface_get_xid (window);
|
||||
if (window_is_csd (window))
|
||||
decor = (info->include_decorations) ? DECOR_NONE : DECOR_WINDOW_FRAME;
|
||||
|
@ -329,7 +329,7 @@ Adding to a container
|
||||
|
||||
When a widget is added to a container, the container:
|
||||
|
||||
1) calls gtk_widget_set_parent_window (widget, window) if
|
||||
1) calls gtk_widget_set_parent_surface (widget, window) if
|
||||
the widget is being added to something other than container->window
|
||||
2) calls gtk_widget_set_parent (widget, container)
|
||||
|
||||
@ -364,7 +364,7 @@ When a widget receives the "realize" signal it should:
|
||||
|
||||
1) set the realized flag
|
||||
2) set widget->window
|
||||
widget->window = gtk_widget_get_parent_window (widget);
|
||||
widget->window = gtk_widget_get_parent_surface (widget);
|
||||
g_object_ref (widget->window);
|
||||
3) attach the widget's style
|
||||
|
||||
@ -374,7 +374,7 @@ When a widget receives the "realize" signal it should:
|
||||
|
||||
1) set the REALIZED flag
|
||||
2) create windows with the parent obtained from
|
||||
gtk_widget_get_parent_window (widget);
|
||||
gtk_widget_get_parent_surface (widget);
|
||||
3) attach the widget's style
|
||||
4) set the background color for the new window based on the style
|
||||
|
||||
|
@ -30,9 +30,9 @@ size_allocate_cb (GtkWidget *widget,
|
||||
surface = NULL;
|
||||
}
|
||||
|
||||
if (gtk_widget_get_window (widget))
|
||||
if (gtk_widget_get_surface (widget))
|
||||
{
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_window (widget),
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_surface (widget),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
|
@ -3855,7 +3855,7 @@ gdk_wayland_surface_get_gtk_surface (GdkSurface *surface)
|
||||
* struct wl_surface *surface;
|
||||
* struct input_panel_surface *ip_surface;
|
||||
*
|
||||
* surface = gtk_widget_get_window (widget);
|
||||
* surface = gtk_widget_get_surface (widget);
|
||||
* gdk_wayland_surface_set_custom_surface (surface);
|
||||
*
|
||||
* surface = gdk_wayland_surface_get_wl_surface (surface);
|
||||
|
@ -243,7 +243,7 @@ gtk_entry_icon_accessible_do_action (AtkAction *action,
|
||||
gtk_entry_get_icon_area (gtk_entry, icon->pos, &icon_area);
|
||||
|
||||
event = gdk_event_new (GDK_BUTTON_PRESS);
|
||||
event->any.surface = g_object_ref (gtk_widget_get_window (widget));
|
||||
event->any.surface = g_object_ref (gtk_widget_get_surface (widget));
|
||||
event->button.button = 1;
|
||||
event->any.send_event = TRUE;
|
||||
event->button.time = GDK_CURRENT_TIME;
|
||||
@ -976,7 +976,7 @@ gtk_entry_accessible_get_character_extents (AtkText *text,
|
||||
|
||||
_gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
gdk_surface_get_origin (window, &x_window, &y_window);
|
||||
|
||||
*x = x_window + allocation.x + x_layout + char_rect.x;
|
||||
@ -1017,7 +1017,7 @@ gtk_entry_accessible_get_offset_at_point (AtkText *atk_text,
|
||||
|
||||
gtk_entry_get_layout_offsets (entry, &x_layout, &y_layout);
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
gdk_surface_get_origin (window, &x_window, &y_window);
|
||||
|
||||
x_local = x - x_layout - x_window;
|
||||
|
@ -1010,7 +1010,7 @@ gtk_label_accessible_get_character_extents (AtkText *text,
|
||||
pango_layout_index_to_pos (gtk_label_get_layout (label), index, &char_rect);
|
||||
pango_extents_to_pixels (&char_rect, NULL);
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
gdk_surface_get_origin (window, &x_window, &y_window);
|
||||
|
||||
*x = x_window + x_layout + char_rect.x;
|
||||
@ -1050,7 +1050,7 @@ gtk_label_accessible_get_offset_at_point (AtkText *atk_text,
|
||||
|
||||
gtk_label_get_layout_offsets (label, &x_layout, &y_layout);
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
gdk_surface_get_origin (window, &x_window, &y_window);
|
||||
|
||||
x_local = x - x_layout - x_window;
|
||||
|
@ -486,9 +486,9 @@ get_origins (GtkWidget *widget,
|
||||
{
|
||||
GdkSurface *window;
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
gdk_surface_get_origin (window, x_window, y_window);
|
||||
window = gdk_surface_get_toplevel (gtk_widget_get_window (widget));
|
||||
window = gdk_surface_get_toplevel (gtk_widget_get_surface (widget));
|
||||
gdk_surface_get_origin (window, x_toplevel, y_toplevel);
|
||||
|
||||
if (GTK_IS_TREE_VIEW (widget))
|
||||
|
@ -454,7 +454,7 @@ gtk_text_view_accessible_get_offset_at_point (AtkText *text,
|
||||
return -1;
|
||||
|
||||
view = GTK_TEXT_VIEW (widget);
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
gdk_surface_get_origin (window, &x_widget, &y_widget);
|
||||
|
||||
if (coords == ATK_XY_SCREEN)
|
||||
@ -523,7 +523,7 @@ gtk_text_view_accessible_get_character_extents (AtkText *text,
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &iter, offset);
|
||||
gtk_text_view_get_iter_location (view, &iter, &rectangle);
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
|
@ -1099,7 +1099,7 @@ gtk_tree_view_accessible_get_cell_extents (GtkCellAccessibleParent *parent,
|
||||
GdkSurface *window;
|
||||
gint x_toplevel, y_toplevel;
|
||||
|
||||
window = gdk_surface_get_toplevel (gtk_widget_get_window (widget));
|
||||
window = gdk_surface_get_toplevel (gtk_widget_get_surface (widget));
|
||||
gdk_surface_get_origin (window, &x_toplevel, &y_toplevel);
|
||||
|
||||
w_x += x_toplevel;
|
||||
@ -1175,7 +1175,7 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent,
|
||||
{
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
gtk_window_present_with_time (GTK_WINDOW (toplevel),
|
||||
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
|
||||
gdk_x11_get_server_time (gtk_widget_get_surface (widget)));
|
||||
#else
|
||||
gtk_window_present (GTK_WINDOW (toplevel));
|
||||
#endif
|
||||
|
@ -586,13 +586,13 @@ gtk_widget_accessible_get_extents (AtkComponent *component,
|
||||
{
|
||||
*x = allocation.x;
|
||||
*y = allocation.y;
|
||||
window = gtk_widget_get_parent_window (widget);
|
||||
window = gtk_widget_get_parent_surface (widget);
|
||||
}
|
||||
else
|
||||
{
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
}
|
||||
gdk_surface_get_origin (window, &x_window, &y_window);
|
||||
*x += x_window;
|
||||
@ -600,7 +600,7 @@ gtk_widget_accessible_get_extents (AtkComponent *component,
|
||||
|
||||
if (coord_type == ATK_XY_WINDOW)
|
||||
{
|
||||
window = gdk_surface_get_toplevel (gtk_widget_get_window (widget));
|
||||
window = gdk_surface_get_toplevel (gtk_widget_get_surface (widget));
|
||||
gdk_surface_get_origin (window, &x_toplevel, &y_toplevel);
|
||||
|
||||
*x -= x_toplevel;
|
||||
@ -635,7 +635,7 @@ gtk_widget_accessible_grab_focus (AtkComponent *component)
|
||||
{
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
gtk_window_present_with_time (GTK_WINDOW (toplevel),
|
||||
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
|
||||
gdk_x11_get_server_time (gtk_widget_get_surface (widget)));
|
||||
#else
|
||||
gtk_window_present (GTK_WINDOW (toplevel));
|
||||
#endif
|
||||
@ -663,7 +663,7 @@ gtk_widget_accessible_set_extents (AtkComponent *component,
|
||||
if (coord_type == ATK_XY_WINDOW)
|
||||
{
|
||||
gint x_current, y_current;
|
||||
GdkSurface *window = gtk_widget_get_window (widget);
|
||||
GdkSurface *window = gtk_widget_get_surface (widget);
|
||||
|
||||
gdk_surface_get_origin (window, &x_current, &y_current);
|
||||
x_current += x;
|
||||
@ -703,7 +703,7 @@ gtk_widget_accessible_set_position (AtkComponent *component,
|
||||
if (coord_type == ATK_XY_WINDOW)
|
||||
{
|
||||
gint x_current, y_current;
|
||||
GdkSurface *window = gtk_widget_get_window (widget);
|
||||
GdkSurface *window = gtk_widget_get_surface (widget);
|
||||
|
||||
gdk_surface_get_origin (window, &x_current, &y_current);
|
||||
x_current += x;
|
||||
|
@ -240,7 +240,7 @@ gtk_window_accessible_ref_state_set (AtkObject *accessible)
|
||||
if (gtk_window_is_active (window))
|
||||
atk_state_set_add_state (state_set, ATK_STATE_ACTIVE);
|
||||
|
||||
gdk_surface = gtk_widget_get_window (widget);
|
||||
gdk_surface = gtk_widget_get_surface (widget);
|
||||
if (gdk_surface)
|
||||
{
|
||||
state = gdk_surface_get_state (gdk_surface);
|
||||
@ -385,7 +385,7 @@ gtk_window_accessible_get_extents (AtkComponent *component,
|
||||
return;
|
||||
}
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
@ -432,7 +432,7 @@ gtk_window_accessible_get_size (AtkComponent *component,
|
||||
return;
|
||||
}
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
|
@ -321,7 +321,7 @@ gtk_accel_label_init (GtkAccelLabel *accel_label)
|
||||
{
|
||||
GtkAccelLabelPrivate *priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (accel_label), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (accel_label), FALSE);
|
||||
|
||||
accel_label->priv = gtk_accel_label_get_instance_private (accel_label);
|
||||
priv = accel_label->priv;
|
||||
|
@ -411,7 +411,7 @@ gtk_action_bar_init (GtkActionBar *action_bar)
|
||||
GtkWidget *widget = GTK_WIDGET (action_bar);
|
||||
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar);
|
||||
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
|
||||
priv->revealer = gtk_revealer_new ();
|
||||
gtk_widget_set_parent (priv->revealer, widget);
|
||||
|
@ -1176,7 +1176,7 @@ gtk_app_chooser_widget_init (GtkAppChooserWidget *self)
|
||||
|
||||
self->priv = gtk_app_chooser_widget_get_instance_private (self);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
||||
|
@ -44,7 +44,7 @@ gtk_application_impl_wayland_handle_window_realize (GtkApplicationImpl *impl,
|
||||
GdkSurface *gdk_surface;
|
||||
gchar *window_path;
|
||||
|
||||
gdk_surface = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
gdk_surface = gtk_widget_get_surface (GTK_WIDGET (window));
|
||||
|
||||
if (!GDK_IS_WAYLAND_SURFACE (gdk_surface))
|
||||
return;
|
||||
|
@ -42,7 +42,7 @@ gtk_application_impl_x11_handle_window_realize (GtkApplicationImpl *impl,
|
||||
GdkSurface *gdk_surface;
|
||||
gchar *window_path;
|
||||
|
||||
gdk_surface = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
gdk_surface = gtk_widget_get_surface (GTK_WIDGET (window));
|
||||
|
||||
if (!GDK_IS_X11_SURFACE (gdk_surface))
|
||||
return;
|
||||
@ -65,7 +65,7 @@ gtk_application_impl_x11_get_window_system_id (GtkApplicationImplDBus *dbus,
|
||||
{
|
||||
GdkSurface *gdk_surface;
|
||||
|
||||
gdk_surface = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
gdk_surface = gtk_widget_get_surface (GTK_WIDGET (window));
|
||||
|
||||
if (GDK_IS_X11_SURFACE (gdk_surface))
|
||||
return g_variant_new_uint32 (GDK_SURFACE_XID (gdk_surface));
|
||||
|
@ -94,7 +94,7 @@ gtk_bin_class_init (GtkBinClass *class)
|
||||
static void
|
||||
gtk_bin_init (GtkBin *bin)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (bin), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (bin), FALSE);
|
||||
}
|
||||
|
||||
static GType
|
||||
|
@ -1288,7 +1288,7 @@ gtk_box_init (GtkBox *box)
|
||||
{
|
||||
GtkBoxPrivate *priv = gtk_box_get_instance_private (box);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (box), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (box), FALSE);
|
||||
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
priv->children = NULL;
|
||||
|
@ -435,7 +435,7 @@ gtk_button_init (GtkButton *button)
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (button), TRUE);
|
||||
gtk_widget_set_receives_default (GTK_WIDGET (button), TRUE);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (button), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (button), FALSE);
|
||||
|
||||
priv->in_button = FALSE;
|
||||
priv->button_down = FALSE;
|
||||
|
@ -665,7 +665,7 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
priv = calendar->priv = gtk_calendar_get_instance_private (calendar);
|
||||
|
||||
gtk_widget_set_can_focus (widget, TRUE);
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (calendar)),
|
||||
GTK_STYLE_CLASS_VIEW);
|
||||
|
@ -451,7 +451,7 @@ gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell,
|
||||
if (!is_editable)
|
||||
return NULL;
|
||||
|
||||
window = gtk_widget_get_window (gtk_widget_get_toplevel (widget));
|
||||
window = gtk_widget_get_surface (gtk_widget_get_toplevel (widget));
|
||||
|
||||
if (event)
|
||||
device = gdk_event_get_device (event);
|
||||
|
@ -419,7 +419,7 @@ gtk_cell_view_init (GtkCellView *cellview)
|
||||
cellview->priv = gtk_cell_view_get_instance_private (cellview);
|
||||
cellview->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (cellview), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (cellview), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -724,7 +724,7 @@ gtk_center_box_class_init (GtkCenterBoxClass *klass)
|
||||
static void
|
||||
gtk_center_box_init (GtkCenterBox *self)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
|
||||
self->start_widget = NULL;
|
||||
self->center_widget = NULL;
|
||||
|
@ -376,7 +376,7 @@ gtk_color_button_init (GtkColorButton *button)
|
||||
GtkStyleContext *context;
|
||||
GdkContentFormats *targets;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (button), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (button), FALSE);
|
||||
|
||||
/* Create the widgets */
|
||||
priv = button->priv = gtk_color_button_get_instance_private (button);
|
||||
|
@ -134,7 +134,7 @@ create_surface (GtkColorPlane *plane)
|
||||
width = gtk_widget_get_width (widget);
|
||||
height = gtk_widget_get_height (widget);
|
||||
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_window (widget),
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_surface (widget),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
width, height);
|
||||
|
||||
@ -408,7 +408,7 @@ gtk_color_plane_init (GtkColorPlane *plane)
|
||||
|
||||
plane->priv = gtk_color_plane_get_instance_private (plane);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (plane), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (plane), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (plane), TRUE);
|
||||
|
||||
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (plane));
|
||||
|
@ -579,7 +579,7 @@ gtk_color_swatch_init (GtkColorSwatch *swatch)
|
||||
swatch->priv->has_menu = TRUE;
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (swatch), TRUE);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (swatch), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (swatch), FALSE);
|
||||
|
||||
swatch->priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (swatch));
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (swatch->priv->long_press_gesture),
|
||||
|
@ -180,7 +180,7 @@ gtk_window_manage_updates (GtkWidget *widget,
|
||||
cairo_region_union (region, draw->region);
|
||||
}
|
||||
gtk_debug_updates_print (updates, region, "Queued update");
|
||||
gdk_surface_invalidate_region (gtk_widget_get_window (widget), region, TRUE);
|
||||
gdk_surface_invalidate_region (gtk_widget_get_surface (widget), region, TRUE);
|
||||
cairo_region_destroy (region);
|
||||
|
||||
/* Then remove all outdated regions */
|
||||
|
@ -348,7 +348,7 @@ static NSWindow *
|
||||
get_toplevel_nswindow (GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
GdkSurface *window = gtk_widget_get_window (toplevel);
|
||||
GdkSurface *window = gtk_widget_get_surface (toplevel);
|
||||
|
||||
if (gtk_widget_is_toplevel (toplevel) && window)
|
||||
return [gdk_quartz_surface_get_nsview (window) window];
|
||||
@ -633,11 +633,11 @@ gtk_drag_find_widget (GtkWidget *widget,
|
||||
if (gtk_widget_get_parent (widget))
|
||||
{
|
||||
gint tx, ty;
|
||||
GdkSurface *window = gtk_widget_get_window (widget);
|
||||
GdkSurface *window = gtk_widget_get_surface (widget);
|
||||
GdkSurface *parent_window;
|
||||
GtkAllocation allocation;
|
||||
|
||||
parent_window = gtk_widget_get_window (gtk_widget_get_parent (widget));
|
||||
parent_window = gtk_widget_get_surface (gtk_widget_get_parent (widget));
|
||||
|
||||
/* Compute the offset from allocation-relative to
|
||||
* window-relative coordinates.
|
||||
@ -646,7 +646,7 @@ gtk_drag_find_widget (GtkWidget *widget,
|
||||
allocation_to_window_x = allocation.x;
|
||||
allocation_to_window_y = allocation.y;
|
||||
|
||||
if (gtk_widget_get_has_window (widget))
|
||||
if (gtk_widget_get_has_surface (widget))
|
||||
{
|
||||
/* The allocation is relative to the parent window for
|
||||
* window widgets, not to widget->window.
|
||||
@ -930,7 +930,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
}
|
||||
}
|
||||
|
||||
gdk_surface_get_position (gtk_widget_get_window (toplevel), &tx, &ty);
|
||||
gdk_surface_get_position (gtk_widget_get_surface (toplevel), &tx, &ty);
|
||||
|
||||
data.x = event->dnd.x_root - tx;
|
||||
data.y = event->dnd.y_root - ty;
|
||||
@ -1124,9 +1124,9 @@ gtk_drag_begin_internal (GtkWidget *widget,
|
||||
if (x != -1 && y != -1)
|
||||
{
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
window = gtk_widget_get_window (toplevel);
|
||||
window = gtk_widget_get_surface (toplevel);
|
||||
gtk_widget_translate_coordinates (widget, toplevel, x, y, &x, &y);
|
||||
gdk_surface_get_root_coords (gtk_widget_get_window (toplevel), x, y,
|
||||
gdk_surface_get_root_coords (gtk_widget_get_surface (toplevel), x, y,
|
||||
&x, &y);
|
||||
dx = (gdouble)x;
|
||||
dy = (gdouble)y;
|
||||
|
10
gtk/gtkdnd.c
10
gtk/gtkdnd.c
@ -326,7 +326,7 @@ gtk_drag_get_source_widget (GdkDragContext *context)
|
||||
{
|
||||
GtkWidget *widget = tmp_list->data;
|
||||
|
||||
if (gtk_widget_get_window (widget) == gdk_drag_context_get_source_surface (context))
|
||||
if (gtk_widget_get_surface (widget) == gdk_drag_context_get_source_surface (context))
|
||||
return widget;
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
@ -445,7 +445,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
}
|
||||
}
|
||||
|
||||
window = gtk_widget_get_window (toplevel);
|
||||
window = gtk_widget_get_surface (toplevel);
|
||||
|
||||
gdk_surface_get_position (window, &tx, &ty);
|
||||
gdk_event_get_root_coords (event, &x_root, &y_root);
|
||||
@ -501,7 +501,7 @@ gtk_drag_find_widget (GtkWidget *widget,
|
||||
/* Get the widget at the pointer coordinates and travel up
|
||||
* the widget hierarchy from there.
|
||||
*/
|
||||
widget = _gtk_widget_find_at_coords (gtk_widget_get_window (widget),
|
||||
widget = _gtk_widget_find_at_coords (gtk_widget_get_surface (widget),
|
||||
x, y, &x, &y);
|
||||
if (!widget)
|
||||
return FALSE;
|
||||
@ -946,7 +946,7 @@ gtk_drag_begin_internal (GtkWidget *widget,
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
gtk_widget_translate_coordinates (widget, toplevel,
|
||||
x, y, &x, &y);
|
||||
gdk_surface_get_device_position (gtk_widget_get_window (toplevel),
|
||||
gdk_surface_get_device_position (gtk_widget_get_surface (toplevel),
|
||||
device,
|
||||
&dx, &dy,
|
||||
NULL);
|
||||
@ -958,7 +958,7 @@ gtk_drag_begin_internal (GtkWidget *widget,
|
||||
content->formats = gdk_content_formats_ref (target_list);
|
||||
content->time = time;
|
||||
|
||||
context = gdk_drag_begin (gtk_widget_get_window (toplevel), device, GDK_CONTENT_PROVIDER (content), actions, dx, dy);
|
||||
context = gdk_drag_begin (gtk_widget_get_surface (toplevel), device, GDK_CONTENT_PROVIDER (content), actions, dx, dy);
|
||||
if (context == NULL)
|
||||
{
|
||||
g_object_unref (content);
|
||||
|
@ -37,7 +37,7 @@ gtk_drag_dest_realized (GtkWidget *widget)
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
|
||||
if (gtk_widget_is_toplevel (toplevel))
|
||||
gdk_surface_register_dnd (gtk_widget_get_window (toplevel));
|
||||
gdk_surface_register_dnd (gtk_widget_get_surface (toplevel));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -47,7 +47,7 @@ gtk_drag_dest_hierarchy_changed (GtkWidget *widget,
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
|
||||
if (gtk_widget_is_toplevel (toplevel) && gtk_widget_get_realized (toplevel))
|
||||
gdk_surface_register_dnd (gtk_widget_get_window (toplevel));
|
||||
gdk_surface_register_dnd (gtk_widget_get_surface (toplevel));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -132,7 +132,7 @@ gtk_drag_dest_set_internal (GtkWidget *widget,
|
||||
* {
|
||||
* GdkModifierType mask;
|
||||
*
|
||||
* gdk_surface_get_pointer (gtk_widget_get_window (widget),
|
||||
* gdk_surface_get_pointer (gtk_widget_get_surface (widget),
|
||||
* NULL, NULL, &mask);
|
||||
* if (mask & GDK_CONTROL_MASK)
|
||||
* gdk_drag_status (context, GDK_ACTION_COPY, time);
|
||||
|
@ -304,7 +304,7 @@ gtk_drawing_area_class_init (GtkDrawingAreaClass *class)
|
||||
static void
|
||||
gtk_drawing_area_init (GtkDrawingArea *darea)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (darea), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (darea), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2499,7 +2499,7 @@ gtk_entry_init (GtkEntry *entry)
|
||||
gint i;
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (entry), TRUE);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (entry), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (entry), FALSE);
|
||||
|
||||
priv->editable = TRUE;
|
||||
priv->visible = TRUE;
|
||||
|
@ -1382,7 +1382,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
||||
GtkTreeViewColumn *action_column;
|
||||
gint action_height;
|
||||
|
||||
window = gtk_widget_get_window (completion->priv->entry);
|
||||
window = gtk_widget_get_surface (completion->priv->entry);
|
||||
|
||||
if (!window)
|
||||
return;
|
||||
@ -1390,7 +1390,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
||||
if (!completion->priv->filter_model)
|
||||
return;
|
||||
|
||||
gtk_widget_get_window_allocation (completion->priv->entry, &allocation);
|
||||
gtk_widget_get_surface_allocation (completion->priv->entry, &allocation);
|
||||
gtk_widget_get_preferred_size (completion->priv->entry,
|
||||
&entry_req, NULL);
|
||||
|
||||
@ -1533,7 +1533,7 @@ gtk_entry_completion_popup (GtkEntryCompletion *completion)
|
||||
{
|
||||
gtk_grab_add (completion->priv->popup_window);
|
||||
gdk_seat_grab (gdk_device_get_seat (completion->priv->device),
|
||||
gtk_widget_get_window (completion->priv->popup_window),
|
||||
gtk_widget_get_surface (completion->priv->popup_window),
|
||||
GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_TOUCH,
|
||||
TRUE, NULL, NULL,
|
||||
prepare_popup_func, completion);
|
||||
|
@ -341,7 +341,7 @@ gtk_expander_init (GtkExpander *expander)
|
||||
expander->priv = priv = gtk_expander_get_instance_private (expander);
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (expander), TRUE);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (expander), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (expander), FALSE);
|
||||
|
||||
priv->label_widget = NULL;
|
||||
priv->child = NULL;
|
||||
|
@ -466,7 +466,7 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button)
|
||||
GtkWidget *icon;
|
||||
GdkContentFormats *target_list;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (button), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (button), FALSE);
|
||||
|
||||
priv = button->priv = gtk_file_chooser_button_get_instance_private (button);
|
||||
|
||||
|
@ -529,7 +529,7 @@ gtk_file_chooser_native_quartz_show (GtkFileChooserNative *self)
|
||||
if (transient_for)
|
||||
{
|
||||
gtk_widget_realize (GTK_WIDGET (transient_for));
|
||||
data->parent = gdk_quartz_surface_get_nswindow (gtk_widget_get_window (GTK_WIDGET (transient_for)));
|
||||
data->parent = gdk_quartz_surface_get_nswindow (gtk_widget_get_surface (GTK_WIDGET (transient_for)));
|
||||
|
||||
if (gtk_native_dialog_get_modal (GTK_NATIVE_DIALOG (self)))
|
||||
data->modal = TRUE;
|
||||
|
@ -789,7 +789,7 @@ gtk_file_chooser_native_win32_show (GtkFileChooserNative *self)
|
||||
if (transient_for)
|
||||
{
|
||||
gtk_widget_realize (GTK_WIDGET (transient_for));
|
||||
data->parent = gdk_win32_surface_get_handle (gtk_widget_get_window (GTK_WIDGET (transient_for)));
|
||||
data->parent = gdk_win32_surface_get_handle (gtk_widget_get_surface (GTK_WIDGET (transient_for)));
|
||||
|
||||
if (gtk_native_dialog_get_modal (GTK_NATIVE_DIALOG (self)))
|
||||
data->modal = TRUE;
|
||||
|
@ -8506,7 +8506,7 @@ gtk_file_chooser_widget_init (GtkFileChooserWidget *impl)
|
||||
impl->priv = gtk_file_chooser_widget_get_instance_private (impl);
|
||||
priv = impl->priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (impl), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (impl), FALSE);
|
||||
|
||||
priv->local_only = FALSE;
|
||||
priv->preview_widget_active = TRUE;
|
||||
|
@ -176,7 +176,7 @@ gtk_fixed_init (GtkFixed *fixed)
|
||||
|
||||
fixed->priv->children = NULL;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (fixed), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (fixed), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3734,7 +3734,7 @@ gtk_flow_box_init (GtkFlowBox *box)
|
||||
{
|
||||
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (box), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (box), FALSE);
|
||||
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
priv->selection_mode = GTK_SELECTION_SINGLE;
|
||||
|
@ -578,7 +578,7 @@ gtk_font_button_init (GtkFontButton *font_button)
|
||||
font_button->priv = gtk_font_button_get_instance_private (font_button);
|
||||
priv = font_button->priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (font_button), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (font_button), FALSE);
|
||||
|
||||
priv->button = gtk_button_new ();
|
||||
g_signal_connect (priv->button, "clicked", G_CALLBACK (gtk_font_button_clicked), font_button);
|
||||
|
@ -825,7 +825,7 @@ gtk_font_chooser_widget_init (GtkFontChooserWidget *fontchooser)
|
||||
fontchooser->priv = gtk_font_chooser_widget_get_instance_private (fontchooser);
|
||||
priv = fontchooser->priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (fontchooser), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (fontchooser), FALSE);
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (fontchooser));
|
||||
|
||||
|
@ -606,7 +606,7 @@ gesture_within_window (GtkGesture *gesture,
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
|
||||
while (window)
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ gtk_gizmo_class_init (GtkGizmoClass *klass)
|
||||
static void
|
||||
gtk_gizmo_init (GtkGizmo *self)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@ -312,7 +312,7 @@ gtk_gl_area_real_create_context (GtkGLArea *area)
|
||||
GError *error = NULL;
|
||||
GdkGLContext *context;
|
||||
|
||||
context = gdk_surface_create_gl_context (gtk_widget_get_window (widget), &error);
|
||||
context = gdk_surface_create_gl_context (gtk_widget_get_surface (widget), &error);
|
||||
if (error != NULL)
|
||||
{
|
||||
gtk_gl_area_set_error (area, error);
|
||||
@ -958,7 +958,7 @@ gtk_gl_area_init (GtkGLArea *area)
|
||||
{
|
||||
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (area), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (area), FALSE);
|
||||
|
||||
priv->auto_render = TRUE;
|
||||
priv->needs_render = TRUE;
|
||||
|
@ -1729,7 +1729,7 @@ gtk_grid_init (GtkGrid *grid)
|
||||
{
|
||||
GtkGridPrivate *priv = gtk_grid_get_instance_private (grid);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (grid), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (grid), FALSE);
|
||||
|
||||
priv->children = NULL;
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
|
@ -1778,7 +1778,7 @@ gtk_header_bar_realize (GtkWidget *widget)
|
||||
G_CALLBACK (_gtk_header_bar_update_window_buttons), widget);
|
||||
g_signal_connect_swapped (settings, "notify::gtk-decoration-layout",
|
||||
G_CALLBACK (_gtk_header_bar_update_window_buttons), widget);
|
||||
g_signal_connect_swapped (_gtk_widget_get_window (widget), "notify::state",
|
||||
g_signal_connect_swapped (_gtk_widget_get_surface (widget), "notify::state",
|
||||
G_CALLBACK (surface_state_changed), widget);
|
||||
_gtk_header_bar_update_window_buttons (GTK_HEADER_BAR (widget));
|
||||
}
|
||||
@ -1791,7 +1791,7 @@ gtk_header_bar_unrealize (GtkWidget *widget)
|
||||
settings = gtk_widget_get_settings (widget);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (settings, _gtk_header_bar_update_window_buttons, widget);
|
||||
g_signal_handlers_disconnect_by_func (_gtk_widget_get_window (widget), surface_state_changed, widget);
|
||||
g_signal_handlers_disconnect_by_func (_gtk_widget_get_surface (widget), surface_state_changed, widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_header_bar_parent_class)->unrealize (widget);
|
||||
}
|
||||
@ -1803,7 +1803,7 @@ surface_state_changed (GtkWidget *widget)
|
||||
GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (bar);
|
||||
GdkSurfaceState changed, new_state;
|
||||
|
||||
new_state = gdk_surface_get_state (_gtk_widget_get_window (widget));
|
||||
new_state = gdk_surface_get_state (_gtk_widget_get_surface (widget));
|
||||
changed = new_state ^ priv->state;
|
||||
priv->state = new_state;
|
||||
|
||||
@ -1977,7 +1977,7 @@ gtk_header_bar_init (GtkHeaderBar *bar)
|
||||
|
||||
priv = gtk_header_bar_get_instance_private (bar);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (bar), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (bar), FALSE);
|
||||
|
||||
priv->title = NULL;
|
||||
priv->subtitle = NULL;
|
||||
|
@ -87,7 +87,7 @@ gtk_icon_class_init (GtkIconClass *klass)
|
||||
static void
|
||||
gtk_icon_init (GtkIcon *self)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
self->image = GTK_CSS_IMAGE_BUILTIN_NONE;
|
||||
}
|
||||
|
||||
|
@ -925,7 +925,7 @@ gtk_icon_view_init (GtkIconView *icon_view)
|
||||
icon_view->priv->mouse_x = -1;
|
||||
icon_view->priv->mouse_y = -1;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (icon_view), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (icon_view), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (icon_view), TRUE);
|
||||
|
||||
icon_view->priv->item_orientation = GTK_ORIENTATION_VERTICAL;
|
||||
@ -6719,7 +6719,7 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
||||
item->cell_area.height + icon_view->priv->item_padding * 2
|
||||
};
|
||||
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_window (GTK_WIDGET (icon_view)),
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_surface (GTK_WIDGET (icon_view)),
|
||||
CAIRO_CONTENT_COLOR_ALPHA,
|
||||
rect.width,
|
||||
rect.height);
|
||||
|
@ -296,7 +296,7 @@ gtk_image_init (GtkImage *image)
|
||||
GtkCssNode *widget_node;
|
||||
|
||||
widget_node = gtk_widget_get_css_node (GTK_WIDGET (image));
|
||||
gtk_widget_set_has_window (GTK_WIDGET (image), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (image), FALSE);
|
||||
|
||||
priv->icon_helper = gtk_icon_helper_new (widget_node, GTK_WIDGET (image));
|
||||
priv->keep_aspect_ratio = TRUE;
|
||||
|
@ -266,7 +266,7 @@ gtk_im_context_ime_set_client_widget (GtkIMContext *context,
|
||||
g_return_if_fail (GTK_IS_IM_CONTEXT_IME (context));
|
||||
context_ime = GTK_IM_CONTEXT_IME (context);
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
client_window = gtk_widget_get_window (toplevel);
|
||||
client_window = gtk_widget_get_surface (toplevel);
|
||||
|
||||
if (client_window)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ quartz_set_client_window (GtkIMContext *context, GtkWidget *widget)
|
||||
|
||||
GTK_NOTE (MISC, g_print ("quartz_set_client_window: %p\n", widget));
|
||||
|
||||
qc->client_window = gtk_widget_get_parent_window (widget);
|
||||
qc->client_window = gtk_widget_get_parent_surface (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -586,7 +586,7 @@ gtk_im_context_xim_set_client_widget (GtkIMContext *context,
|
||||
GdkSurface *surface = NULL;
|
||||
|
||||
if (widget != NULL)
|
||||
surface = gtk_widget_get_window (gtk_widget_get_toplevel (widget));
|
||||
surface = gtk_widget_get_surface (gtk_widget_get_toplevel (widget));
|
||||
|
||||
set_ic_client_window (context_xim, surface);
|
||||
}
|
||||
@ -1613,9 +1613,9 @@ on_status_toplevel_configure (GtkWidget *toplevel,
|
||||
|
||||
if (status_window->window)
|
||||
{
|
||||
height = DisplayHeight(GDK_SURFACE_XDISPLAY (gtk_widget_get_window (toplevel)), 0);
|
||||
height = DisplayHeight(GDK_SURFACE_XDISPLAY (gtk_widget_get_surface (toplevel)), 0);
|
||||
|
||||
gdk_surface_get_frame_extents (gtk_widget_get_window (toplevel), &rect);
|
||||
gdk_surface_get_frame_extents (gtk_widget_get_surface (toplevel), &rect);
|
||||
gtk_widget_get_preferred_size ( (status_window->window), &requisition, NULL);
|
||||
|
||||
if (rect.y + rect.height + requisition.height < height)
|
||||
|
@ -106,7 +106,7 @@ gtk_invisible_init (GtkInvisible *invisible)
|
||||
invisible->priv = gtk_invisible_get_instance_private (invisible);
|
||||
priv = invisible->priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (invisible), TRUE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (invisible), TRUE);
|
||||
_gtk_widget_set_is_toplevel (GTK_WIDGET (invisible), TRUE);
|
||||
|
||||
g_object_ref_sink (invisible);
|
||||
@ -225,8 +225,8 @@ gtk_invisible_realize (GtkWidget *widget)
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
|
||||
window = gdk_surface_new_temp (gtk_widget_get_display (widget));
|
||||
gtk_widget_set_window (widget, window);
|
||||
gtk_widget_register_window (widget, window);
|
||||
gtk_widget_set_surface (widget, window);
|
||||
gtk_widget_register_surface (widget, window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1273,7 +1273,7 @@ gtk_label_init (GtkLabel *label)
|
||||
{
|
||||
GtkLabelPrivate *priv = gtk_label_get_instance_private (label);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (label), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (label), FALSE);
|
||||
|
||||
priv->width_chars = -1;
|
||||
priv->max_width_chars = -1;
|
||||
|
@ -694,7 +694,7 @@ gtk_layout_init (GtkLayout *layout)
|
||||
{
|
||||
GtkLayoutPrivate *priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (layout), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (layout), FALSE);
|
||||
|
||||
layout->priv = gtk_layout_get_instance_private (layout);
|
||||
priv = layout->priv;
|
||||
|
@ -1067,7 +1067,7 @@ gtk_level_bar_init (GtkLevelBar *self)
|
||||
|
||||
priv->inverted = FALSE;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
|
||||
priv->trough_widget = gtk_gizmo_new ("trough",
|
||||
gtk_level_bar_measure_trough,
|
||||
|
@ -612,7 +612,7 @@ gtk_list_box_init (GtkListBox *box)
|
||||
GtkListBoxPrivate *priv = BOX_PRIV (box);
|
||||
GtkWidget *widget = GTK_WIDGET (box);
|
||||
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
priv->selection_mode = GTK_SELECTION_SINGLE;
|
||||
priv->activate_single_click = TRUE;
|
||||
|
||||
|
@ -319,7 +319,7 @@ _gtk_magnifier_init (GtkMagnifier *magnifier)
|
||||
|
||||
priv = _gtk_magnifier_get_instance_private (magnifier);
|
||||
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
priv->magnification = 1;
|
||||
priv->resize = FALSE;
|
||||
}
|
||||
|
@ -1374,9 +1374,9 @@ synth_crossing (GtkWidget *widget,
|
||||
gdk_event_set_device (event, gdk_event_get_device (source));
|
||||
gdk_event_set_source_device (event, gdk_event_get_source_device (source));
|
||||
|
||||
event->any.surface = g_object_ref (gtk_widget_get_window (toplevel));
|
||||
event->any.surface = g_object_ref (gtk_widget_get_surface (toplevel));
|
||||
if (other_widget)
|
||||
event->crossing.child_surface = g_object_ref (gtk_widget_get_window (other_widget));
|
||||
event->crossing.child_surface = g_object_ref (gtk_widget_get_surface (other_widget));
|
||||
|
||||
if (enter)
|
||||
gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE);
|
||||
|
@ -294,7 +294,7 @@ static void
|
||||
gtk_media_controls_init (GtkMediaControls *controls)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (controls));
|
||||
gtk_widget_set_has_window (GTK_WIDGET (controls), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (controls), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1491,7 +1491,7 @@ associate_menu_grab_transfer_window (GtkMenu *menu)
|
||||
GdkSurface *toplevel_window;
|
||||
GdkSurface *transfer_window;
|
||||
|
||||
toplevel_window = gtk_widget_get_window (priv->toplevel);
|
||||
toplevel_window = gtk_widget_get_surface (priv->toplevel);
|
||||
transfer_window = g_object_get_data (G_OBJECT (menu), "gtk-menu-transfer-window");
|
||||
|
||||
if (toplevel_window == NULL || transfer_window == NULL)
|
||||
@ -1595,7 +1595,7 @@ gtk_menu_popup_internal (GtkMenu *menu,
|
||||
|
||||
if (xgrab_shell && xgrab_shell != widget)
|
||||
{
|
||||
if (popup_grab_on_window (gtk_widget_get_window (xgrab_shell), pointer))
|
||||
if (popup_grab_on_window (gtk_widget_get_surface (xgrab_shell), pointer))
|
||||
{
|
||||
_gtk_menu_shell_set_grab_device (GTK_MENU_SHELL (xgrab_shell), pointer);
|
||||
GTK_MENU_SHELL (xgrab_shell)->priv->have_xgrab = TRUE;
|
||||
@ -1693,7 +1693,7 @@ gtk_menu_popup_internal (GtkMenu *menu,
|
||||
gtk_widget_show (priv->toplevel);
|
||||
|
||||
if (xgrab_shell == widget)
|
||||
popup_grab_on_window (gtk_widget_get_window (widget), pointer); /* Should always succeed */
|
||||
popup_grab_on_window (gtk_widget_get_surface (widget), pointer); /* Should always succeed */
|
||||
|
||||
gtk_grab_add (GTK_WIDGET (menu));
|
||||
|
||||
@ -2524,7 +2524,7 @@ menu_grab_transfer_window_get (GtkMenu *menu)
|
||||
if (!window)
|
||||
{
|
||||
window = gdk_surface_new_temp (gtk_widget_get_display (GTK_WIDGET (menu)));
|
||||
gtk_widget_register_window (GTK_WIDGET (menu), window);
|
||||
gtk_widget_register_surface (GTK_WIDGET (menu), window);
|
||||
|
||||
gdk_surface_show (window);
|
||||
|
||||
@ -2542,11 +2542,11 @@ menu_grab_transfer_window_destroy (GtkMenu *menu)
|
||||
{
|
||||
GdkSurface *widget_window;
|
||||
|
||||
gtk_widget_unregister_window (GTK_WIDGET (menu), window);
|
||||
gtk_widget_unregister_surface (GTK_WIDGET (menu), window);
|
||||
gdk_surface_destroy (window);
|
||||
g_object_set_data (G_OBJECT (menu), I_("gtk-menu-transfer-window"), NULL);
|
||||
|
||||
widget_window = gtk_widget_get_window (GTK_WIDGET (menu));
|
||||
widget_window = gtk_widget_get_surface (GTK_WIDGET (menu));
|
||||
g_object_set_data (G_OBJECT (widget_window), I_("gdk-attached-grab-surface"), window);
|
||||
}
|
||||
}
|
||||
@ -2956,7 +2956,7 @@ pointer_in_menu_window (GtkWidget *widget,
|
||||
GtkMenuShell *menu_shell;
|
||||
gint window_x, window_y;
|
||||
|
||||
gdk_surface_get_position (gtk_widget_get_window (priv->toplevel),
|
||||
gdk_surface_get_position (gtk_widget_get_surface (priv->toplevel),
|
||||
&window_x, &window_y);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
@ -3194,7 +3194,7 @@ gtk_menu_scroll_by (GtkMenu *menu,
|
||||
if ((priv->scroll_offset >= 0) && (offset < 0))
|
||||
offset = 0;
|
||||
|
||||
view_height = gdk_surface_get_height (gtk_widget_get_window (widget));
|
||||
view_height = gdk_surface_get_height (gtk_widget_get_surface (widget));
|
||||
|
||||
if (priv->scroll_offset == 0 &&
|
||||
view_height >= priv->requested_height)
|
||||
@ -3258,7 +3258,7 @@ get_arrows_sensitive_area (GtkMenu *menu,
|
||||
&bottom_arrow_height, NULL,
|
||||
NULL, NULL);
|
||||
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
width = gdk_surface_get_width (window);
|
||||
height = gdk_surface_get_height (window);
|
||||
|
||||
@ -3297,7 +3297,7 @@ gtk_menu_handle_scrolling (GtkMenu *menu,
|
||||
|
||||
menu_shell = GTK_MENU_SHELL (menu);
|
||||
|
||||
gdk_surface_get_position (gtk_widget_get_window (priv->toplevel),
|
||||
gdk_surface_get_position (gtk_widget_get_surface (priv->toplevel),
|
||||
&top_x, &top_y);
|
||||
x -= top_x;
|
||||
y -= top_y;
|
||||
@ -3509,7 +3509,7 @@ pointer_on_menu_widget (GtkMenu *menu,
|
||||
gint window_x, window_y;
|
||||
|
||||
gtk_widget_get_allocation (GTK_WIDGET (menu), &allocation);
|
||||
gdk_surface_get_position (gtk_widget_get_window (priv->toplevel),
|
||||
gdk_surface_get_position (gtk_widget_get_surface (priv->toplevel),
|
||||
&window_x, &window_y);
|
||||
|
||||
if (x_root >= window_x && x_root < window_x + allocation.width &&
|
||||
@ -3598,7 +3598,7 @@ gtk_menu_captured_event (GtkWidget *widget,
|
||||
y_diff = y_root - priv->drag_start_y;
|
||||
offset = priv->initial_drag_offset - y_diff;
|
||||
|
||||
view_height = gdk_surface_get_height (gtk_widget_get_window (widget));
|
||||
view_height = gdk_surface_get_height (gtk_widget_get_surface (widget));
|
||||
get_arrows_border (menu, &arrow_border);
|
||||
|
||||
if (priv->upper_arrow_visible)
|
||||
@ -4000,8 +4000,8 @@ gtk_menu_position (GtkMenu *menu,
|
||||
}
|
||||
else if (priv->widget)
|
||||
{
|
||||
rect_window = gtk_widget_get_window (priv->widget);
|
||||
gtk_widget_get_window_allocation (priv->widget, &rect);
|
||||
rect_window = gtk_widget_get_surface (priv->widget);
|
||||
gtk_widget_get_surface_allocation (priv->widget, &rect);
|
||||
text_direction = gtk_widget_get_direction (priv->widget);
|
||||
}
|
||||
else if (!priv->position_func)
|
||||
@ -4022,7 +4022,7 @@ gtk_menu_position (GtkMenu *menu,
|
||||
{
|
||||
rect = (GdkRectangle) { 0, 0, 1, 1 };
|
||||
|
||||
rect_window = gtk_widget_get_window (attach_widget);
|
||||
rect_window = gtk_widget_get_surface (attach_widget);
|
||||
gdk_surface_get_device_position (rect_window, grab_device,
|
||||
&rect.x, &rect.y, NULL);
|
||||
text_direction = gtk_widget_get_direction (attach_widget);
|
||||
@ -4058,7 +4058,7 @@ gtk_menu_position (GtkMenu *menu,
|
||||
menu_anchor = get_horizontally_flipped_anchor (menu_anchor);
|
||||
}
|
||||
|
||||
toplevel = gtk_widget_get_window (priv->toplevel);
|
||||
toplevel = gtk_widget_get_surface (priv->toplevel);
|
||||
|
||||
gdk_surface_set_transient_for (toplevel, rect_window);
|
||||
|
||||
@ -4187,7 +4187,7 @@ gtk_menu_scroll_item_visible (GtkMenuShell *menu_shell,
|
||||
&child_offset, &child_height, &last_child))
|
||||
{
|
||||
y = priv->scroll_offset;
|
||||
height = gdk_surface_get_height (gtk_widget_get_window (widget));
|
||||
height = gdk_surface_get_height (gtk_widget_get_surface (widget));
|
||||
|
||||
if (child_offset < y)
|
||||
{
|
||||
|
@ -670,7 +670,7 @@ gtk_menu_item_init (GtkMenuItem *menu_item)
|
||||
priv = gtk_menu_item_get_instance_private (menu_item);
|
||||
menu_item->priv = priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (menu_item), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (menu_item), FALSE);
|
||||
|
||||
g_signal_connect (menu_item, "notify::parent", G_CALLBACK (gtk_menu_item_parent_cb), NULL);
|
||||
|
||||
@ -1406,7 +1406,7 @@ gtk_menu_item_real_popup_submenu (GtkWidget *widget,
|
||||
/* Position the submenu at the menu item if it is mapped.
|
||||
* Otherwise, position the submenu at the pointer device.
|
||||
*/
|
||||
if (gtk_widget_get_window (widget))
|
||||
if (gtk_widget_get_surface (widget))
|
||||
{
|
||||
switch (priv->submenu_placement)
|
||||
{
|
||||
|
@ -408,7 +408,7 @@ gtk_menu_shell_init (GtkMenuShell *menu_shell)
|
||||
menu_shell->priv = gtk_menu_shell_get_instance_private (menu_shell);
|
||||
menu_shell->priv->take_focus = TRUE;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (menu_shell), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (menu_shell), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -124,7 +124,7 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
|
||||
for (list = targets; list; list = list->next)
|
||||
{
|
||||
widget = GTK_WIDGET (list->data);
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
|
||||
if (gtk_widget_is_sensitive (widget) &&
|
||||
gtk_widget_get_mapped (widget) &&
|
||||
|
@ -1046,7 +1046,7 @@ gtk_notebook_init (GtkNotebook *notebook)
|
||||
GdkContentFormats *targets;
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (notebook), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (notebook), FALSE);
|
||||
|
||||
notebook->priv = gtk_notebook_get_instance_private (notebook);
|
||||
priv = notebook->priv;
|
||||
@ -4171,7 +4171,7 @@ gtk_notebook_remove_tab_label (GtkNotebook *notebook,
|
||||
page->mnemonic_activate_signal);
|
||||
page->mnemonic_activate_signal = 0;
|
||||
|
||||
if (gtk_widget_get_window (page->tab_label) != gtk_widget_get_window (GTK_WIDGET (notebook)) ||
|
||||
if (gtk_widget_get_surface (page->tab_label) != gtk_widget_get_surface (GTK_WIDGET (notebook)) ||
|
||||
!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page))
|
||||
{
|
||||
GtkWidget *parent;
|
||||
|
@ -842,7 +842,7 @@ gtk_overlay_class_init (GtkOverlayClass *klass)
|
||||
static void
|
||||
gtk_overlay_init (GtkOverlay *overlay)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (overlay), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (overlay), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1497,7 +1497,7 @@ gtk_paned_init (GtkPaned *paned)
|
||||
GtkPanedPrivate *priv;
|
||||
GtkGesture *gesture;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (paned), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (paned), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (paned), TRUE);
|
||||
|
||||
paned->priv = gtk_paned_get_instance_private (paned);
|
||||
|
@ -237,7 +237,7 @@ gtk_path_bar_init (GtkPathBar *path_bar)
|
||||
g_signal_connect_swapped (path_bar->priv->down_slider_button, "clicked",
|
||||
G_CALLBACK (gtk_path_bar_scroll_down), path_bar);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (path_bar), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (path_bar), FALSE);
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (path_bar));
|
||||
gtk_style_context_add_class (context, "path-bar");
|
||||
|
@ -273,7 +273,7 @@ gtk_popover_init (GtkPopover *popover)
|
||||
GtkStyleContext *context;
|
||||
|
||||
widget = GTK_WIDGET (popover);
|
||||
gtk_widget_set_has_window (widget, TRUE);
|
||||
gtk_widget_set_has_surface (widget, TRUE);
|
||||
popover->priv = gtk_popover_get_instance_private (popover);
|
||||
popover->priv->modal = TRUE;
|
||||
popover->priv->tick_id = 0;
|
||||
@ -389,7 +389,7 @@ gtk_popover_hide_internal (GtkPopover *popover)
|
||||
if (gtk_widget_get_realized (widget))
|
||||
{
|
||||
cairo_region_t *region = cairo_region_create ();
|
||||
gdk_surface_input_shape_combine_region (gtk_widget_get_window (widget),
|
||||
gdk_surface_input_shape_combine_region (gtk_widget_get_surface (widget),
|
||||
region, 0, 0);
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
@ -473,7 +473,7 @@ gtk_popover_realize (GtkWidget *widget)
|
||||
GtkAllocation allocation;
|
||||
GdkSurface *window;
|
||||
|
||||
gtk_widget_get_window_allocation (widget, &allocation);
|
||||
gtk_widget_get_surface_allocation (widget, &allocation);
|
||||
|
||||
/* We want to use subsurfaces for popovers, so they can extend outside
|
||||
* the main window, but for that, we first need to have clean subsurface
|
||||
@ -490,17 +490,17 @@ gtk_popover_realize (GtkWidget *widget)
|
||||
&allocation);
|
||||
|
||||
gdk_surface_set_transient_for (window,
|
||||
gtk_widget_get_window (toplevel));
|
||||
gtk_widget_get_surface (toplevel));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
window = gdk_surface_new_child (gtk_widget_get_parent_window (widget),
|
||||
window = gdk_surface_new_child (gtk_widget_get_parent_surface (widget),
|
||||
&allocation);
|
||||
}
|
||||
|
||||
gtk_widget_set_window (widget, window);
|
||||
gtk_widget_register_window (widget, window);
|
||||
gtk_widget_set_surface (widget, window);
|
||||
gtk_widget_register_surface (widget, window);
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
}
|
||||
|
||||
@ -746,7 +746,7 @@ gtk_popover_map (GtkWidget *widget)
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_popover_parent_class)->map (widget);
|
||||
|
||||
gdk_surface_show (gtk_widget_get_window (widget));
|
||||
gdk_surface_show (gtk_widget_get_surface (widget));
|
||||
gtk_popover_update_position (GTK_POPOVER (widget));
|
||||
|
||||
gtk_window_set_default (priv->window, priv->default_widget);
|
||||
@ -759,7 +759,7 @@ gtk_popover_unmap (GtkWidget *widget)
|
||||
|
||||
priv->button_pressed = FALSE;
|
||||
|
||||
gdk_surface_hide (gtk_widget_get_window (widget));
|
||||
gdk_surface_hide (gtk_widget_get_surface (widget));
|
||||
GTK_WIDGET_CLASS (gtk_popover_parent_class)->unmap (widget);
|
||||
|
||||
if (gtk_window_get_default_widget (priv->window) == priv->default_widget)
|
||||
@ -826,7 +826,7 @@ gtk_popover_get_gap_coords (GtkPopover *popover,
|
||||
|
||||
gtk_widget_translate_coordinates (priv->widget, GTK_WIDGET (priv->window),
|
||||
rect.x, rect.y, &rect.x, &rect.y);
|
||||
gdk_surface_get_origin (gtk_widget_get_window (GTK_WIDGET (popover)),
|
||||
gdk_surface_get_origin (gtk_widget_get_surface (GTK_WIDGET (popover)),
|
||||
&win_x, &win_y);
|
||||
rect.x -= win_x;
|
||||
rect.y -= win_y;
|
||||
@ -1026,7 +1026,7 @@ gtk_popover_update_shape (GtkPopover *popover)
|
||||
return;
|
||||
#endif
|
||||
|
||||
win = gtk_widget_get_window (widget);
|
||||
win = gtk_widget_get_surface (widget);
|
||||
surface =
|
||||
gdk_surface_create_similar_surface (win,
|
||||
CAIRO_CONTENT_COLOR_ALPHA,
|
||||
@ -1043,7 +1043,7 @@ gtk_popover_update_shape (GtkPopover *popover)
|
||||
gtk_widget_shape_combine_region (widget, region);
|
||||
cairo_region_destroy (region);
|
||||
|
||||
gdk_surface_set_child_shapes (gtk_widget_get_window (widget));
|
||||
gdk_surface_set_child_shapes (gtk_widget_get_surface (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1362,8 +1362,8 @@ gtk_popover_size_allocate (GtkWidget *widget,
|
||||
if (gtk_widget_get_realized (widget))
|
||||
{
|
||||
GtkAllocation a;
|
||||
gtk_widget_get_window_allocation (widget, &a);
|
||||
gdk_surface_move_resize (gtk_widget_get_window (widget),
|
||||
gtk_widget_get_surface_allocation (widget, &a);
|
||||
gdk_surface_move_resize (gtk_widget_get_surface (widget),
|
||||
a.x, a.y, a.width, a.height);
|
||||
gtk_popover_update_shape (popover);
|
||||
}
|
||||
@ -1500,7 +1500,7 @@ gtk_popover_show (GtkWidget *widget)
|
||||
priv->state = STATE_SHOWN;
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gdk_surface_input_shape_combine_region (gtk_widget_get_window (widget),
|
||||
gdk_surface_input_shape_combine_region (gtk_widget_get_surface (widget),
|
||||
NULL, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ static HWND
|
||||
get_parent_hwnd (GtkWidget *widget)
|
||||
{
|
||||
gtk_widget_realize (widget);
|
||||
return gdk_win32_surface_get_handle (gtk_widget_get_window (widget));
|
||||
return gdk_win32_surface_get_handle (gtk_widget_get_surface (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1343,7 +1343,7 @@ plug_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed,
|
||||
GtkPrintOperation *op)
|
||||
{
|
||||
EnableWindow (GetAncestor (GDK_SURFACE_HWND (gtk_widget_get_window (widget)), GA_ROOT),
|
||||
EnableWindow (GetAncestor (GDK_SURFACE_HWND (gtk_widget_get_surface (widget)), GA_ROOT),
|
||||
was_grabbed);
|
||||
}
|
||||
|
||||
@ -1371,7 +1371,7 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
|
||||
gtk_container_add (GTK_CONTAINER (plug), op->priv->custom_widget);
|
||||
gtk_widget_show (op->priv->custom_widget);
|
||||
gtk_widget_show (plug);
|
||||
gdk_surface_focus (gtk_widget_get_window (plug), GDK_CURRENT_TIME);
|
||||
gdk_surface_focus (gtk_widget_get_surface (plug), GDK_CURRENT_TIME);
|
||||
|
||||
/* This dialog is modal, so we grab the embed widget */
|
||||
gtk_grab_add (plug);
|
||||
|
@ -778,7 +778,7 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
|
||||
page_name_func, NULL, NULL);
|
||||
|
||||
/* Preview drawing area has no window */
|
||||
gtk_widget_set_has_window (priv->page_layout_preview, FALSE);
|
||||
gtk_widget_set_has_surface (priv->page_layout_preview, FALSE);
|
||||
|
||||
/* Load backends */
|
||||
load_print_backends (dialog);
|
||||
|
@ -481,7 +481,7 @@ gtk_progress_bar_init (GtkProgressBar *pbar)
|
||||
priv->text = NULL;
|
||||
priv->fraction = 0.0;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (pbar), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (pbar), FALSE);
|
||||
|
||||
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (pbar));
|
||||
|
||||
|
@ -535,7 +535,7 @@ gtk_range_init (GtkRange *range)
|
||||
{
|
||||
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (range), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (range), FALSE);
|
||||
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
priv->adjustment = NULL;
|
||||
|
@ -123,7 +123,7 @@ gtk_revealer_init (GtkRevealer *revealer)
|
||||
priv->current_pos = 0.0;
|
||||
priv->target_pos = 0.0;
|
||||
|
||||
gtk_widget_set_has_window ((GtkWidget*) revealer, FALSE);
|
||||
gtk_widget_set_has_surface ((GtkWidget*) revealer, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -248,7 +248,7 @@ gtk_scrollbar_init (GtkScrollbar *self)
|
||||
{
|
||||
GtkScrollbarPrivate *priv = gtk_scrollbar_get_instance_private (self);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
|
||||
|
@ -1913,7 +1913,7 @@ gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
|
||||
scrolled_window->priv = priv =
|
||||
gtk_scrolled_window_get_instance_private (scrolled_window);
|
||||
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
gtk_widget_set_can_focus (widget, TRUE);
|
||||
|
||||
/* Instantiated by gtk_scrolled_window_set_[hv]adjustment
|
||||
|
@ -119,7 +119,7 @@ gtk_separator_init (GtkSeparator *separator)
|
||||
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (separator), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (separator), FALSE);
|
||||
|
||||
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (separator));
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ gtk_separator_tool_item_init (GtkSeparatorToolItem *separator_item)
|
||||
priv = separator_item->priv = gtk_separator_tool_item_get_instance_private (separator_item);
|
||||
priv->draw = TRUE;
|
||||
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -720,7 +720,7 @@ gtk_shortcuts_shortcut_class_init (GtkShortcutsShortcutClass *klass)
|
||||
static void
|
||||
gtk_shortcuts_shortcut_init (GtkShortcutsShortcut *self)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
|
||||
self->box = g_object_new (GTK_TYPE_BOX,
|
||||
"orientation", GTK_ORIENTATION_HORIZONTAL,
|
||||
|
@ -833,7 +833,7 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkSpinButtonPrivate *priv = gtk_spin_button_get_instance_private (spin_button);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (spin_button), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (spin_button), FALSE);
|
||||
|
||||
priv->adjustment = NULL;
|
||||
priv->timer = 0;
|
||||
|
@ -208,7 +208,7 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
|
||||
static void
|
||||
gtk_spinner_init (GtkSpinner *spinner)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (spinner), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2152,7 +2152,7 @@ gtk_stack_init (GtkStack *stack)
|
||||
{
|
||||
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (stack), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (stack), FALSE);
|
||||
|
||||
priv->vhomogeneous = TRUE;
|
||||
priv->hhomogeneous = TRUE;
|
||||
|
@ -87,7 +87,7 @@ gtk_stack_switcher_init (GtkStackSwitcher *switcher)
|
||||
GtkStyleContext *context;
|
||||
GtkStackSwitcherPrivate *priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (switcher), FALSE);
|
||||
|
||||
priv = gtk_stack_switcher_get_instance_private (switcher);
|
||||
|
||||
|
@ -226,7 +226,7 @@ gtk_statusbar_init (GtkStatusbar *statusbar)
|
||||
{
|
||||
GtkStatusbarPrivate *priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (statusbar), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (statusbar), FALSE);
|
||||
|
||||
statusbar->priv = gtk_statusbar_get_instance_private (statusbar);
|
||||
priv = statusbar->priv;
|
||||
|
@ -623,7 +623,7 @@ gtk_switch_init (GtkSwitch *self)
|
||||
GtkSwitchPrivate *priv = gtk_switch_get_instance_private (self);
|
||||
GtkGesture *gesture;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
|
||||
|
||||
gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self));
|
||||
|
@ -233,7 +233,7 @@ _gtk_text_util_create_drag_icon (GtkWidget *widget,
|
||||
pixmap_width = layout_width / PANGO_SCALE;
|
||||
pixmap_height = layout_height / PANGO_SCALE;
|
||||
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_window (widget),
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_surface (widget),
|
||||
CAIRO_CONTENT_COLOR_ALPHA,
|
||||
pixmap_width, pixmap_height);
|
||||
cr = cairo_create (surface);
|
||||
@ -342,7 +342,7 @@ _gtk_text_util_create_rich_drag_icon (GtkWidget *widget,
|
||||
layout_width = MIN (layout_width, DRAG_ICON_MAX_WIDTH);
|
||||
layout_height = MIN (layout_height, DRAG_ICON_MAX_HEIGHT);
|
||||
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_window (widget),
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_surface (widget),
|
||||
CAIRO_CONTENT_COLOR_ALPHA,
|
||||
layout_width, layout_height);
|
||||
|
||||
|
@ -1629,7 +1629,7 @@ gtk_text_view_init (GtkTextView *text_view)
|
||||
text_view->priv = gtk_text_view_get_instance_private (text_view);
|
||||
priv = text_view->priv;
|
||||
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
gtk_widget_set_can_focus (widget, TRUE);
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (text_view));
|
||||
@ -8746,7 +8746,7 @@ gtk_text_view_do_popup (GtkTextView *text_view,
|
||||
&iter_location.y);
|
||||
|
||||
gtk_menu_popup_at_rect (GTK_MENU (priv->popup_menu),
|
||||
gtk_widget_get_window (GTK_WIDGET (text_view)),
|
||||
gtk_widget_get_surface (GTK_WIDGET (text_view)),
|
||||
&iter_location,
|
||||
GDK_GRAVITY_SOUTH_EAST,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
|
@ -566,7 +566,7 @@ gtk_toolbar_init (GtkToolbar *toolbar)
|
||||
priv = toolbar->priv;
|
||||
|
||||
gtk_widget_set_can_focus (widget, FALSE);
|
||||
gtk_widget_set_has_window (widget, FALSE);
|
||||
gtk_widget_set_has_surface (widget, FALSE);
|
||||
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
priv->style = DEFAULT_TOOLBAR_STYLE;
|
||||
|
@ -614,9 +614,9 @@ get_bounding_box (GtkWidget *widget,
|
||||
gint x3, y3;
|
||||
gint x4, y4;
|
||||
|
||||
window = gtk_widget_get_parent_window (widget);
|
||||
window = gtk_widget_get_parent_surface (widget);
|
||||
if (window == NULL)
|
||||
window = gtk_widget_get_window (widget);
|
||||
window = gtk_widget_get_surface (widget);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
@ -1052,7 +1052,7 @@ _gtk_tooltip_focus_in (GtkWidget *widget)
|
||||
|
||||
tooltip->keyboard_widget = g_object_ref (widget);
|
||||
|
||||
gdk_surface_get_device_position (gtk_widget_get_window (widget),
|
||||
gdk_surface_get_device_position (gtk_widget_get_surface (widget),
|
||||
device, &x, &y, NULL);
|
||||
|
||||
return_value = gtk_tooltip_run_requery (&widget, tooltip, &x, &y);
|
||||
|
@ -1707,7 +1707,7 @@ gtk_tree_view_init (GtkTreeView *tree_view)
|
||||
priv->event_last_x = -10000;
|
||||
priv->event_last_y = -10000;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (tree_view), FALSE);
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (tree_view), FALSE);
|
||||
|
||||
gtk_tree_view_do_set_vadjustment (tree_view, NULL);
|
||||
gtk_tree_view_do_set_hadjustment (tree_view, NULL);
|
||||
@ -2270,14 +2270,14 @@ gtk_tree_view_unrealize (GtkWidget *widget)
|
||||
|
||||
if (priv->drag_surface)
|
||||
{
|
||||
gtk_widget_unregister_window (widget, priv->drag_surface);
|
||||
gtk_widget_unregister_surface (widget, priv->drag_surface);
|
||||
gdk_surface_destroy (priv->drag_surface);
|
||||
priv->drag_surface = NULL;
|
||||
}
|
||||
|
||||
if (priv->drag_highlight_window)
|
||||
{
|
||||
gtk_widget_unregister_window (widget, priv->drag_highlight_window);
|
||||
gtk_widget_unregister_surface (widget, priv->drag_highlight_window);
|
||||
gdk_surface_destroy (priv->drag_highlight_window);
|
||||
priv->drag_highlight_window = NULL;
|
||||
}
|
||||
@ -3200,7 +3200,7 @@ gtk_tree_view_button_release_drag_column (GtkTreeView *tree_view)
|
||||
tree_view->priv->cur_reorder->left_column);
|
||||
}
|
||||
tree_view->priv->drag_column = NULL;
|
||||
gtk_widget_unregister_window (widget, tree_view->priv->drag_surface);
|
||||
gtk_widget_unregister_surface (widget, tree_view->priv->drag_surface);
|
||||
gdk_surface_destroy (tree_view->priv->drag_surface);
|
||||
tree_view->priv->drag_surface = NULL;
|
||||
|
||||
@ -3644,7 +3644,7 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
|
||||
if (tree_view->priv->drag_highlight_window)
|
||||
{
|
||||
gtk_widget_unregister_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gtk_widget_unregister_surface (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gdk_surface_destroy (tree_view->priv->drag_highlight_window);
|
||||
}
|
||||
|
||||
@ -3652,13 +3652,13 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
gtk_widget_get_allocation (button, &drag_allocation);
|
||||
width = drag_allocation.width;
|
||||
height = drag_allocation.height;
|
||||
tree_view->priv->drag_highlight_window = gdk_surface_new_child (gtk_widget_get_window (widget),
|
||||
tree_view->priv->drag_highlight_window = gdk_surface_new_child (gtk_widget_get_surface (widget),
|
||||
&(GdkRectangle){
|
||||
tree_view->priv->drag_column_x,
|
||||
0,
|
||||
drag_allocation.width,
|
||||
drag_allocation.height});
|
||||
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gtk_widget_register_surface (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
|
||||
tree_view->priv->drag_column_surface_state = DRAG_COLUMN_WINDOW_STATE_ORIGINAL;
|
||||
}
|
||||
@ -3697,13 +3697,13 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
{
|
||||
if (tree_view->priv->drag_highlight_window)
|
||||
{
|
||||
gtk_widget_unregister_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gtk_widget_unregister_surface (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gdk_surface_destroy (tree_view->priv->drag_highlight_window);
|
||||
}
|
||||
|
||||
tree_view->priv->drag_highlight_window = gdk_surface_new_popup (gtk_widget_get_display (widget),
|
||||
&(GdkRectangle) { x, y, width, height });
|
||||
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gtk_widget_register_surface (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
|
||||
mask_image = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height);
|
||||
|
||||
@ -3767,13 +3767,13 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
{
|
||||
if (tree_view->priv->drag_highlight_window)
|
||||
{
|
||||
gtk_widget_unregister_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gtk_widget_unregister_surface (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gdk_surface_destroy (tree_view->priv->drag_highlight_window);
|
||||
}
|
||||
|
||||
tree_view->priv->drag_highlight_window = gdk_surface_new_popup (gtk_widget_get_display (widget),
|
||||
&(GdkRectangle) { x, y, width, height });
|
||||
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
gtk_widget_register_surface (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
|
||||
|
||||
mask_image = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height);
|
||||
|
||||
@ -5714,7 +5714,7 @@ gtk_tree_view_key_press (GtkWidget *widget,
|
||||
new_event = gdk_event_copy ((GdkEvent *) event);
|
||||
g_object_unref (((GdkEventKey *) new_event)->any.surface);
|
||||
((GdkEventKey *) new_event)->any.surface =
|
||||
g_object_ref (gtk_widget_get_window (search_window));
|
||||
g_object_ref (gtk_widget_get_surface (search_window));
|
||||
gtk_widget_realize (search_window);
|
||||
|
||||
popup_menu_id = g_signal_connect (tree_view->priv->search_entry,
|
||||
@ -9575,14 +9575,14 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
|
||||
gtk_widget_get_allocation (button, &button_allocation);
|
||||
button_allocation.y = 0;
|
||||
|
||||
tree_view->priv->drag_surface = gdk_surface_new_child (gtk_widget_get_window (GTK_WIDGET (tree_view)),
|
||||
tree_view->priv->drag_surface = gdk_surface_new_child (gtk_widget_get_surface (GTK_WIDGET (tree_view)),
|
||||
&button_allocation);
|
||||
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_surface);
|
||||
gtk_widget_register_surface (GTK_WIDGET (tree_view), tree_view->priv->drag_surface);
|
||||
|
||||
/* Kids, don't try this at home */
|
||||
g_object_ref (button);
|
||||
gtk_container_remove (GTK_CONTAINER (tree_view), button);
|
||||
gtk_widget_set_parent_window (button, tree_view->priv->drag_surface);
|
||||
gtk_widget_set_parent_surface (button, tree_view->priv->drag_surface);
|
||||
gtk_widget_set_parent (button, GTK_WIDGET (tree_view));
|
||||
g_object_unref (button);
|
||||
|
||||
@ -10610,7 +10610,7 @@ send_focus_change (GtkWidget *widget,
|
||||
/* Skip non-master keyboards that haven't
|
||||
* selected for events from this surface
|
||||
*/
|
||||
surface = gtk_widget_get_window (widget);
|
||||
surface = gtk_widget_get_surface (widget);
|
||||
if (gdk_device_get_device_type (dev) != GDK_DEVICE_TYPE_MASTER &&
|
||||
!gdk_surface_get_device_events (surface, dev))
|
||||
continue;
|
||||
@ -13866,7 +13866,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
|
||||
|
||||
bin_window_width = gtk_widget_get_width (GTK_WIDGET (tree_view));
|
||||
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_window (GTK_WIDGET (tree_view)),
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_surface (GTK_WIDGET (tree_view)),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
bin_window_width + 2,
|
||||
background_area.height + 2);
|
||||
@ -14280,7 +14280,7 @@ gtk_tree_view_search_position_func (GtkTreeView *tree_view,
|
||||
GdkDisplay *display;
|
||||
GdkMonitor *monitor;
|
||||
GdkRectangle workarea;
|
||||
GdkSurface *tree_window = gtk_widget_get_window (GTK_WIDGET (tree_view));
|
||||
GdkSurface *tree_window = gtk_widget_get_surface (GTK_WIDGET (tree_view));
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_widget_realize (search_window);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user