[gtk/gtk-3-24: 2/5] window: Add private API to force-resize
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 2/5] window: Add private API to force-resize
- Date: Thu, 7 Feb 2019 21:29:49 +0000 (UTC)
commit 461f5fde0340137678416422a026c4369d5dcff8
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Feb 7 09:53:45 2019 +0100
window: Add private API to force-resize
Sometimes (read for GtkMenu on X11) it's not enough to resize on show,
and relying on the size to be calculated on realization only works the
first time a menu is popped up, so add an API that GtkMenu can use to
ensure the size of a menu is "refreshed" before passing anything along
to gdk_window_move_to_rect().
gtk/gtkwindow.c | 3 +--
gtk/gtkwindowprivate.h | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 92d6793995..762adda344 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -474,7 +474,6 @@ static GdkScreen *gtk_window_check_screen (GtkWindow *window);
static GtkWindowGeometryInfo* gtk_window_get_geometry_info (GtkWindow *window,
gboolean create);
-static void gtk_window_move_resize (GtkWindow *window);
static gboolean gtk_window_compare_hints (GdkGeometry *geometry_a,
guint flags_a,
GdkGeometry *geometry_b,
@@ -9751,7 +9750,7 @@ gtk_window_constrain_position (GtkWindow *window,
}
}
-static void
+void
gtk_window_move_resize (GtkWindow *window)
{
/* Overview:
diff --git a/gtk/gtkwindowprivate.h b/gtk/gtkwindowprivate.h
index 0c849d67b2..0f48685c8a 100644
--- a/gtk/gtkwindowprivate.h
+++ b/gtk/gtkwindowprivate.h
@@ -140,6 +140,7 @@ void gtk_window_set_unlimited_guessed_size (GtkWindow *window,
gboolean y);
void gtk_window_force_resize (GtkWindow *window);
void gtk_window_fixate_size (GtkWindow *window);
+void gtk_window_move_resize (GtkWindow *window);
/* Exported handles */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]