forked from AuroraMiddleware/gtk
gtkwindow: ignore default size if there is a size request
Some applications set both a default size on their gtk window and a size request on the corresponding gtk widget. Until now, the default size was ignored for fixed size windows, so this had no effect and remained unnoticed, but with the recent change for client-side decorations, the default size is now used even for fixed size windows, which can cause the resulting fixed size window to be much smaller than expected with the size request. For fixed size windows, if we have both a size request and a default size set, prefer the size request as before. https://bugzilla.gnome.org/show_bug.cgi?id=763749
This commit is contained in:
parent
4ddd29d8c0
commit
3e3d29f7b7
@ -9787,9 +9787,11 @@ gtk_window_update_fixed_size (GtkWindow *window,
|
||||
{
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
GtkWindowGeometryInfo *info;
|
||||
gboolean has_size_request;
|
||||
|
||||
/* Adjust the geometry hints for non-resizable windows only */
|
||||
if (priv->resizable)
|
||||
has_size_request = gtk_widget_has_size_request (GTK_WIDGET (window));
|
||||
if (priv->resizable || has_size_request)
|
||||
return;
|
||||
|
||||
info = gtk_window_get_geometry_info (window, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user