Commit 089315b5 authored by Stefano Teso's avatar Stefano Teso

typeahead-find: make sure the search widget is on-screen when maximized

https://bugzilla.gnome.org/show_bug.cgi?id=642953
parent a5d4e411
......@@ -4769,7 +4769,7 @@ nautilus_icon_container_search_position_func (NautilusIconContainer *container,
gtk_widget_get_preferred_size (search_dialog, &requisition, NULL);
if (cont_x + cont_width - requisition.width > gdk_screen_get_width (screen)) {
if (cont_x + cont_width > gdk_screen_get_width (screen)) {
x = gdk_screen_get_width (screen) - requisition.width;
} else if (cont_x + cont_width - requisition.width < 0) {
x = 0;
......@@ -4777,7 +4777,7 @@ nautilus_icon_container_search_position_func (NautilusIconContainer *container,
x = cont_x + cont_width - requisition.width;
}
if (cont_y + cont_height > gdk_screen_get_height (screen)) {
if (cont_y + cont_height + requisition.height > gdk_screen_get_height (screen)) {
y = gdk_screen_get_height (screen) - requisition.height;
} else if (cont_y + cont_height < 0) { /* isn't really possible ... */
y = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment