public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Nirbheek Chauhan" <nirbheek@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: gnome-base/gdm/, gnome-base/gdm/files/
Date: Sat,  2 Apr 2011 13:54:07 +0000 (UTC)	[thread overview]
Message-ID: <05332aeddbd7e526110730595ed0cdb3cbf54036.nirbheek@gentoo> (raw)

commit:     05332aeddbd7e526110730595ed0cdb3cbf54036
Author:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  2 13:43:14 2011 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 13:43:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=05332aed

gnome-base/gdm: fix crasher with gtk+-3.0.7

---
 .../gdm/files/gdm-2.91.94-fix-gtk+-crasher.patch   |  104 ++++++++++++++++++++
 .../{gdm-2.91.94.ebuild => gdm-2.91.94-r1.ebuild}  |    3 +
 2 files changed, 107 insertions(+), 0 deletions(-)

diff --git a/gnome-base/gdm/files/gdm-2.91.94-fix-gtk+-crasher.patch b/gnome-base/gdm/files/gdm-2.91.94-fix-gtk+-crasher.patch
new file mode 100644
index 0000000..3b8379e
--- /dev/null
+++ b/gnome-base/gdm/files/gdm-2.91.94-fix-gtk+-crasher.patch
@@ -0,0 +1,104 @@
+From 045c319f2655fc45c24951479eb9cd1e59792cef Mon Sep 17 00:00:00 2001
+From: Benjamin Otte <otte@redhat.com>
+Date: Sat, 2 Apr 2011 04:10:09 +0200
+Subject: [PATCH] simple-greeter: Don't request an invalid size
+
+GTK widgets must at all times report a size they can handle. So it is
+not allowed to return 0 when not realized, because then size allocations
+break when GTK uses this size for its widget.
+In this case, GTK uses the pre-realize size to determine the size it
+should request when creating the greeter window - chicken and egg so to
+say.
+
+This patch just uses the default monitor (I guess the root window's
+monitor is the default monitor?) for determining the login window size.
+
+One thing this patch doesn't do is add a call to gtk_widget_queue_resize()
+from the realize callback or from monitor-changing signals, though
+that's probably technically necessary.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646498
+---
+ gui/simple-greeter/gdm-greeter-login-window.c |   28 +++++++++----------------
+ 1 files changed, 10 insertions(+), 18 deletions(-)
+
+diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
+index abd6707..3ec9a09 100644
+--- a/gui/simple-greeter/gdm-greeter-login-window.c
++++ b/gui/simple-greeter/gdm-greeter-login-window.c
+@@ -1413,25 +1413,22 @@ gdm_greeter_login_window_get_preferred_width (GtkWidget *widget,
+ {
+         int             monitor;
+         GdkScreen      *screen;
++        GdkWindow      *window;
+         GdkRectangle    area;
+         GtkAllocation   widget_allocation;
+         int             min_size;
+         int             nat_size;
+ 
+-        min_size = 0;
+-        nat_size = 0;
+-
+-        if (!gtk_widget_get_realized (widget)) {
+-                goto out;
+-        }
+-
+         gtk_widget_get_preferred_width (gtk_bin_get_child (GTK_BIN (widget)),
+                                         &min_size,
+                                         &nat_size);
+ 
+         /* Make width be at least 33% screen width */
+         screen = gtk_widget_get_screen (widget);
+-        monitor = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
++        window = gtk_widget_get_window (widget);
++        if (window == NULL)
++          window = gdk_screen_get_root_window (screen);
++        monitor = gdk_screen_get_monitor_at_window (screen, window);
+         gdk_screen_get_monitor_geometry (screen, monitor, &area);
+         min_size = MAX (min_size, .33 * area.width);
+         nat_size = MAX (nat_size, .33 * area.width);
+@@ -1442,7 +1439,6 @@ gdm_greeter_login_window_get_preferred_width (GtkWidget *widget,
+         min_size = MAX (min_size, widget_allocation.width);
+         nat_size = MAX (nat_size, widget_allocation.width);
+ 
+- out:
+         if (minimum_size)
+                 *minimum_size = min_size;
+         if (natural_size)
+@@ -1456,29 +1452,25 @@ gdm_greeter_login_window_get_preferred_height (GtkWidget *widget,
+ {
+         int             monitor;
+         GdkScreen      *screen;
++        GdkWindow      *window;
+         GdkRectangle    area;
+         int             min_size;
+         int             nat_size;
+ 
+-        min_size = 0;
+-        nat_size = 0;
+-
+-        if (!gtk_widget_get_realized (widget)) {
+-                goto out;
+-        }
+-
+         gtk_widget_get_preferred_height (gtk_bin_get_child (GTK_BIN (widget)),
+                                         &min_size,
+                                         &nat_size);
+ 
+         /* Make height be at most 80% of screen height */
+         screen = gtk_widget_get_screen (widget);
+-        monitor = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
++        window = gtk_widget_get_window (widget);
++        if (window == NULL)
++          window = gdk_screen_get_root_window (screen);
++        monitor = gdk_screen_get_monitor_at_window (screen, window);
+         gdk_screen_get_monitor_geometry (screen, monitor, &area);
+         min_size = MIN (min_size, .8 * area.height);
+         nat_size = MIN (nat_size, .8 * area.height);
+ 
+- out:
+         if (minimum_size)
+                 *minimum_size = min_size;
+         if (natural_size)
+-- 
+1.7.4
\ No newline at end of file

diff --git a/gnome-base/gdm/gdm-2.91.94.ebuild b/gnome-base/gdm/gdm-2.91.94-r1.ebuild
similarity index 98%
rename from gnome-base/gdm/gdm-2.91.94.ebuild
rename to gnome-base/gdm/gdm-2.91.94-r1.ebuild
index 1a5e95e..971c67a 100644
--- a/gnome-base/gdm/gdm-2.91.94.ebuild
+++ b/gnome-base/gdm/gdm-2.91.94-r1.ebuild
@@ -118,6 +118,9 @@ src_prepare() {
 	# fix libxklavier automagic support
 	epatch "${FILESDIR}/${PN}-2.32.0-automagic-libxklavier-support.patch"
 
+	# Fix crasher with gtk+-3.0.7, bug 361679
+	epatch "${FILESDIR}/${P}-fix-gtk+-crasher.patch"
+
 	mkdir "${S}"/m4
 	intltoolize --force --copy --automake || die "intltoolize failed"
 	eautoreconf



             reply	other threads:[~2011-04-02 13:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-02 13:54 Nirbheek Chauhan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-11 23:44 [gentoo-commits] proj/gnome:master commit in: gnome-base/gdm/, gnome-base/gdm/files/ Gilles Dartiguelongue
2012-12-26 21:45 Gilles Dartiguelongue
2012-09-12 12:08 Nirbheek Chauhan
2012-09-12 12:06 Nirbheek Chauhan
2012-09-09  0:39 Nirbheek Chauhan
2012-08-18 14:07 Priit Laes
2011-10-23  8:41 Alexandre Restovtsev
2011-08-13  6:08 Alexandre Restovtsev
2011-06-26  6:22 Nirbheek Chauhan
2011-05-03 10:52 Nirbheek Chauhan
2011-04-15 19:36 Nirbheek Chauhan
2011-04-05  0:57 Nirbheek Chauhan
2011-02-26 11:41 Nirbheek Chauhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05332aeddbd7e526110730595ed0cdb3cbf54036.nirbheek@gentoo \
    --to=nirbheek@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox