summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcaja-private/caja-icon-container.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index f3e1ccf8..583b6c85 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -5258,11 +5258,13 @@ caja_icon_container_search_position_func (CajaIconContainer *container,
#if GTK_CHECK_VERSION(3, 0, 0)
cont_width = gdk_window_get_width (cont_window);
cont_height = gdk_window_get_height (cont_window);
+
+ gtk_widget_get_preferred_size (search_dialog, &requisition, NULL);
#else
gdk_drawable_get_size (cont_window, &cont_width, &cont_height);
-#endif
gtk_widget_size_request (search_dialog, &requisition);
+#endif
if (cont_x + cont_width - requisition.width > gdk_screen_get_width (screen))
{