[gtk+] gtkwindow: ignore default size if there is a size request
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkwindow: ignore default size if there is a size request
- Date: Fri, 18 Mar 2016 02:40:59 +0000 (UTC)
commit 3e3d29f7b73381dd328e5213e0dca04d3e4f8048
Author: Olivier Fourdan <ofourdan redhat com>
Date: Wed Mar 16 14:19:14 2016 +0100
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
gtk/gtkwindow.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6b21e0b..789bb1e 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]