mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
window: Use GtkNative's check_resize everywhere
This commit is contained in:
parent
9cc6ddf80d
commit
22e7d11583
@ -1901,7 +1901,16 @@ gtk_window_native_get_surface_transform (GtkNative *native,
|
||||
static void
|
||||
gtk_window_native_check_resize (GtkNative *native)
|
||||
{
|
||||
gtk_window_check_resize (GTK_WINDOW (native));
|
||||
GtkWidget *widget = GTK_WIDGET (native);
|
||||
gint64 before = g_get_monotonic_time ();
|
||||
|
||||
if (!_gtk_widget_get_alloc_needed (widget))
|
||||
gtk_widget_ensure_allocate (widget);
|
||||
else if (gtk_widget_get_visible (widget))
|
||||
gtk_window_move_resize (GTK_WINDOW (native));
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
gdk_profiler_end_mark (before, "size allocation", "");
|
||||
}
|
||||
|
||||
static void
|
||||
@ -3818,7 +3827,7 @@ gtk_window_show (GtkWidget *widget)
|
||||
|
||||
gtk_widget_realize (widget);
|
||||
|
||||
gtk_window_check_resize (window);
|
||||
gtk_native_check_resize (GTK_NATIVE (window));
|
||||
|
||||
gtk_widget_map (widget);
|
||||
|
||||
@ -4882,21 +4891,6 @@ gtk_window_key_released (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_window_check_resize (GtkWindow *self)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (self);
|
||||
gint64 before = g_get_monotonic_time ();
|
||||
|
||||
if (!_gtk_widget_get_alloc_needed (widget))
|
||||
gtk_widget_ensure_allocate (widget);
|
||||
else if (gtk_widget_get_visible (widget))
|
||||
gtk_window_move_resize (self);
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
gdk_profiler_end_mark (before, "size allocation", "");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_window_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction)
|
||||
|
@ -51,7 +51,6 @@ void _gtk_window_set_allocation (GtkWindow *window,
|
||||
int width,
|
||||
int height,
|
||||
GtkAllocation *allocation_out);
|
||||
void gtk_window_check_resize (GtkWindow *self);
|
||||
|
||||
typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window,
|
||||
guint keyval,
|
||||
|
Loading…
Reference in New Issue
Block a user