- Drop upstreamed patches

- rebase multi-stack patch
This commit is contained in:
Ray Strode 2009-12-03 05:05:23 +00:00
parent 22d9169f41
commit ec33c147f0
11 changed files with 1013 additions and 4787 deletions

View File

@ -1,88 +0,0 @@
diff -up gdm-2.28.1/gui/user-switch-applet/applet.c.dont-show-lock-screen-if-locked-down gdm-2.28.1/gui/user-switch-applet/applet.c
--- gdm-2.28.1/gui/user-switch-applet/applet.c.dont-show-lock-screen-if-locked-down 2009-10-19 18:12:45.000000000 -0400
+++ gdm-2.28.1/gui/user-switch-applet/applet.c 2009-10-31 19:57:21.700544070 -0400
@@ -44,7 +44,9 @@
#include "gdm-entry-menu-item.h"
#define LOCKDOWN_DIR "/desktop/gnome/lockdown"
-#define LOCKDOWN_KEY LOCKDOWN_DIR "/disable_user_switching"
+#define LOCKDOWN_USER_SWITCHING_KEY LOCKDOWN_DIR "/disable_user_switching"
+#define LOCKDOWN_LOCK_SCREEN_KEY LOCKDOWN_DIR "/disable_lock_screen"
+#define LOCKDOWN_COMMAND_LINE_KEY LOCKDOWN_DIR "/disable_command_line"
typedef enum {
GSM_PRESENCE_STATUS_AVAILABLE = 0,
@@ -1163,7 +1165,11 @@ create_sub_menu (GdmAppletData *adata)
G_CALLBACK (menuitem_style_set_cb), adata);
g_signal_connect (adata->lock_screen_item, "activate",
G_CALLBACK (on_lock_screen_activate), adata);
- gtk_widget_show (adata->lock_screen_item);
+ if (gconf_client_get_bool (adata->client, LOCKDOWN_LOCK_SCREEN_KEY, NULL)) {
+ gtk_widget_hide (adata->lock_screen_item);
+ } else {
+ gtk_widget_show (adata->lock_screen_item);
+ }
adata->login_screen_item = gtk_image_menu_item_new_with_label (_("Switch User"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_screen_item),
@@ -1174,7 +1180,7 @@ create_sub_menu (GdmAppletData *adata)
G_CALLBACK (menuitem_style_set_cb), adata);
g_signal_connect (adata->login_screen_item, "activate",
G_CALLBACK (on_login_screen_activate), adata);
- /* Only show switch user if there are other users */
+ update_switch_user (adata);
adata->quit_session_item = gtk_image_menu_item_new_with_label (_("Quit..."));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->quit_session_item),
@@ -1229,11 +1235,17 @@ client_notify_lockdown_func (GConfClient
return;
}
- if (strcmp (key, LOCKDOWN_KEY) == 0) {
+ if (strcmp (key, LOCKDOWN_USER_SWITCHING_KEY) == 0) {
if (gconf_value_get_bool (value)) {
- set_menu_visibility (adata, FALSE);
+ gtk_widget_hide (adata->login_screen_item);
} else {
- set_menu_visibility (adata, TRUE);
+ gtk_widget_show (adata->login_screen_item);
+ }
+ } else if (strcmp (key, LOCKDOWN_LOCK_SCREEN_KEY) == 0) {
+ if (gconf_value_get_bool (value)) {
+ gtk_widget_hide (adata->lock_screen_item);
+ } else {
+ gtk_widget_show (adata->lock_screen_item);
}
}
}
@@ -1430,7 +1442,7 @@ fill_applet (PanelApplet *applet)
/* Hide the admin context menu items if locked down or no cmd-line */
if (gconf_client_get_bool (adata->client,
- "/desktop/gnome/lockdown/inhibit_command_line",
+ LOCKDOWN_COMMAND_LINE_KEY,
NULL) ||
panel_applet_get_locked_down (applet)) {
bonobo_ui_component_set_prop (popup_component,
@@ -1502,14 +1514,19 @@ fill_applet (PanelApplet *applet)
adata->manager = gdm_user_manager_ref_default ();
setup_current_user (adata);
+ gconf_client_add_dir (adata->client,
+ LOCKDOWN_DIR,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
+
adata->client_notify_lockdown_id = gconf_client_notify_add (adata->client,
- LOCKDOWN_KEY,
+ LOCKDOWN_DIR,
(GConfClientNotifyFunc)client_notify_lockdown_func,
adata,
NULL,
NULL);
- if (gconf_client_get_bool (adata->client, LOCKDOWN_KEY, NULL)) {
+ if (gconf_client_get_bool (adata->client, LOCKDOWN_USER_SWITCHING_KEY, NULL)) {
set_menu_visibility (adata, FALSE);
} else {
set_menu_visibility (adata, TRUE);

View File

@ -1,168 +0,0 @@
From 87248d5c3e0a90c3b0748c7be05a9e6eac231737 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 21 Oct 2009 10:57:59 -0400
Subject: [PATCH] Move date to tooltip in panel clock
It's a bit long at the moment. Dropping the
date makes the screen look a little cleaner, and putting
the date in the tooltip makes it still available for those
people who want to see it.
---
gui/simple-greeter/gdm-clock-widget.c | 97 +++++++++++++++++++++++----------
1 files changed, 67 insertions(+), 30 deletions(-)
diff --git a/gui/simple-greeter/gdm-clock-widget.c b/gui/simple-greeter/gdm-clock-widget.c
index a3816d2..9008e6d 100644
--- a/gui/simple-greeter/gdm-clock-widget.c
+++ b/gui/simple-greeter/gdm-clock-widget.c
@@ -44,8 +44,10 @@ struct GdmClockWidgetPrivate
{
GtkWidget *label;
char *time_format;
+ char *tooltip_format;
guint update_clock_id;
guint should_show_seconds : 1;
+ guint should_show_date : 1;
};
static void gdm_clock_widget_class_init (GdmClockWidgetClass *klass);
@@ -55,38 +57,59 @@ static gboolean update_timeout_cb (GdmClockWidget *clock);
G_DEFINE_TYPE (GdmClockWidget, gdm_clock_widget, GTK_TYPE_ALIGNMENT)
-static char *
-get_time_format (GdmClockWidget *clock)
+static void
+update_time_format (GdmClockWidget *clock)
{
- const char *time_format;
- const char *date_format;
char *clock_format;
- char *result;
-
- time_format = clock->priv->should_show_seconds ? _("%l:%M:%S %p") : _("%l:%M %p");
- /* translators: replace %e with %d if, when the day of the
- * month as a decimal number is a single digit, it
- * should begin with a 0 in your locale (e.g. "May
- * 01" instead of "May 1").
- */
- date_format = _("%a %b %e");
- /* translators: reverse the order of these arguments
- * if the time should come before the
- * date on a clock in your locale.
- */
- clock_format = g_strdup_printf (_("%1$s, %2$s"),
- date_format,
- time_format);
-
- result = g_locale_from_utf8 (clock_format, -1, NULL, NULL, NULL);
- g_free (clock_format);
-
- return result;
+ char *tooltip_format;
+
+ if (clock->priv->should_show_date && clock->priv->should_show_seconds) {
+ /* translators: This is the time format to use when both
+ * the date and time with seconds are being shown together.
+ */
+ clock_format = _("%a %b %e, %l:%M:%S %p");
+ tooltip_format = NULL;
+ } else if (clock->priv->should_show_date && !clock->priv->should_show_seconds) {
+ /* translators: This is the time format to use when both
+ * the date and time without seconds are being shown together.
+ */
+ clock_format = _("%a %b %e, %l:%M %p");
+
+ tooltip_format = NULL;
+ } else if (!clock->priv->should_show_date && clock->priv->should_show_seconds) {
+ /* translators: This is the time format to use when there is
+ * no date, just weekday and time with seconds.
+ */
+ clock_format = _("%a %l:%M:%S %p");
+
+ /* translators: This is the time format to use for the date
+ */
+ tooltip_format = _("%x");
+ } else {
+ /* translators: This is the time format to use when there is
+ * no date, just weekday and time without seconds.
+ */
+ clock_format = _("%a %l:%M %p");
+
+ tooltip_format = _("%x");
+ }
+
+ g_free (clock->priv->time_format);
+ clock->priv->time_format = g_locale_from_utf8 (clock_format, -1, NULL, NULL, NULL);
+
+ g_free (clock->priv->tooltip_format);
+
+ if (tooltip_format != NULL) {
+ clock->priv->tooltip_format = g_locale_from_utf8 (tooltip_format, -1, NULL, NULL, NULL);
+ } else {
+ clock->priv->tooltip_format = NULL;
+ }
}
static void
update_clock (GtkLabel *label,
- const char *format)
+ const char *clock_format,
+ const char *tooltip_format)
{
time_t t;
struct tm *tm;
@@ -99,13 +122,25 @@ update_clock (GtkLabel *label,
g_warning ("Unable to get broken down local time");
return;
}
- if (strftime (buf, sizeof (buf), format, tm) == 0) {
- g_warning ("Couldn't format time: %s", format);
+ if (strftime (buf, sizeof (buf), clock_format, tm) == 0) {
+ g_warning ("Couldn't format time: %s", clock_format);
strcpy (buf, "???");
}
utf8 = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
gtk_label_set_text (label, utf8);
g_free (utf8);
+
+ if (tooltip_format != NULL) {
+ if (strftime (buf, sizeof (buf), tooltip_format, tm) == 0) {
+ g_warning ("Couldn't format tooltip date: %s", tooltip_format);
+ strcpy (buf, "???");
+ }
+ utf8 = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (label), utf8);
+ g_free (utf8);
+ } else {
+ gtk_widget_set_has_tooltip (GTK_WIDGET (label), FALSE);
+ }
}
static void
@@ -142,7 +177,8 @@ update_timeout_cb (GdmClockWidget *clock)
if (clock->priv->label != NULL) {
update_clock (GTK_LABEL (clock->priv->label),
- clock->priv->time_format);
+ clock->priv->time_format,
+ clock->priv->tooltip_format);
}
set_clock_timeout (clock, new_time);
@@ -214,10 +250,11 @@ gdm_clock_widget_init (GdmClockWidget *widget)
gtk_container_add (GTK_CONTAINER (widget), box);
widget->priv->label = gtk_label_new ("");
+
gtk_widget_show (widget->priv->label);
gtk_box_pack_start (GTK_BOX (box), widget->priv->label, FALSE, FALSE, 0);
- widget->priv->time_format = get_time_format (widget);
+ update_time_format (widget);
update_timeout_cb (widget);
}
--
1.6.5.rc2

View File

@ -1,104 +0,0 @@
From 18bf08d14ed77db00a17e74c5ce04c812ef251af Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 26 Oct 2009 10:45:49 -0400
Subject: [PATCH 1/2] Use gethostname instead of g_get_host_name in greeter
The latter is unreliable when the hostname changes at runtime.
---
gui/simple-greeter/gdm-greeter-login-window.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 9a29a2e..9d75b8c 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -996,7 +996,11 @@ create_computer_info (GdmGreeterLoginWindow *login_window)
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-name-label");
if (label != NULL) {
- gtk_label_set_text (GTK_LABEL (label), g_get_host_name ());
+ char localhost[HOST_NAME_MAX + 1] = "";•
+
+ if (gethostname (localhost, HOST_NAME_MAX) == 0) {•
+ gtk_label_set_text (GTK_LABEL (label), localhost);
+ }
}
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-version-label");
--
1.6.5.1
From 03e01936f5c11580a1485c492355eb0a468ea0f6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 26 Oct 2009 10:53:25 -0400
Subject: [PATCH 2/2] Don't bother showing hostname if it's not unique
The advantage of showing hostname by default is it is a
unique identifier for people who have multiple machines.
If it only says "localhost" or "localhost.localdomain"
that advantage is mitigated, and it's probably better to
show OS release.
---
gui/simple-greeter/gdm-greeter-login-window.c | 27 +++++++++++++++++++-----
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 9d75b8c..8de74df 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -887,10 +887,8 @@ on_user_unchosen (GdmUserChooserWidget *user_chooser,
do_cancel (login_window);
}
-static gboolean
-on_computer_info_label_button_press (GtkWidget *widget,
- GdkEventButton *event,
- GdmGreeterLoginWindow *login_window)
+static void
+rotate_computer_info (GdmGreeterLoginWindow *login_window)
{
GtkWidget *notebook;
int current_page;
@@ -907,6 +905,14 @@ on_computer_info_label_button_press (GtkWidget *widget,
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
}
+}
+
+static gboolean
+on_computer_info_label_button_press (GtkWidget *widget,
+ GdkEventButton *event,
+ GdmGreeterLoginWindow *login_window)
+{
+ rotate_computer_info (login_window);
return FALSE;
}
@@ -996,11 +1002,20 @@ create_computer_info (GdmGreeterLoginWindow *login_window)
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-name-label");
if (label != NULL) {
- char localhost[HOST_NAME_MAX + 1] = "";•
+ char localhost[HOST_NAME_MAX + 1] = "";
- if (gethostname (localhost, HOST_NAME_MAX) == 0) {•
+ if (gethostname (localhost, HOST_NAME_MAX) == 0) {
gtk_label_set_text (GTK_LABEL (label), localhost);
}
+
+ /* If this isn't actually unique identifier for the computer, then
+ * don't bother showing it by default.
+ */
+ if (strcmp (localhost, "localhost") == 0 ||
+ strcmp (localhost, "localhost.localdomain") == 0) {
+
+ rotate_computer_info (login_window);
+ }
}
label = glade_xml_get_widget (login_window->priv->xml, "computer-info-version-label");
--
1.6.5.1

File diff suppressed because it is too large Load Diff

View File

@ -1,370 +0,0 @@
From 5475c0a823cf94f817821105b40760d902d9ace5 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 27 Oct 2009 10:40:55 -0400
Subject: [PATCH 1/4] Make screenshot dir a configure argument
This provides a little more flexibility to distributors,
but more importantly makes it less hard coded in gdm-screenshot.c
---
configure.ac | 17 +++++++++++++++++
data/Makefile.am | 8 ++++++++
utils/Makefile.am | 1 +
utils/gdm-screenshot.c | 5 +----
4 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4fe4430..0dd2658 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1237,6 +1237,23 @@ fi
AC_SUBST(GDM_XAUTH_DIR)
dnl ---------------------------------------------------------------------------
+dnl - Directory for greeter screenshot
+dnl ---------------------------------------------------------------------------
+
+AC_ARG_WITH(screenshot-dir,
+ AS_HELP_STRING([--with-screenshot-dir=<dir>],
+ [directory to store greeter screenshot]))
+
+if ! test -z "$with_screenshot_dir"; then
+ GDM_SCREENSHOT_DIR=$with_screenshot_dir
+else
+ GDM_SCREENSHOT_DIR=${localstatedir}/run/gdm
+fi
+
+AC_SUBST(GDM_SCREENSHOT_DIR)
+
+
+dnl ---------------------------------------------------------------------------
dnl - Finish
dnl ---------------------------------------------------------------------------
diff --git a/data/Makefile.am b/data/Makefile.am
index 73fa106..608194d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -13,6 +13,7 @@ predir = $(gdmconfdir)/PreSession
postlogindir = $(gdmconfdir)/PostLogin
workingdir = $(GDM_WORKING_DIR)
xauthdir = $(GDM_XAUTH_DIR)
+screenshotdir = $(GDM_SCREENSHOT_DIR)
cachedir = $(localstatedir)/cache/gdm
Xsession: $(srcdir)/Xsession.in
@@ -123,6 +124,7 @@ uninstall-hook:
-rf \
$(DESTDIR)$(workingdir)/.gconf.mandatory \
$(DESTDIR)$(xauthdir)
+ $(DESTDIR)$(screenshotdir)
install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.path
if test '!' -d $(DESTDIR)$(gdmconfdir); then \
@@ -204,6 +206,12 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
chown root:gdm $(DESTDIR)$(xauthdir) || : ; \
fi
+ if test '!' -d $(DESTDIR)$(screenshotdir); then \
+ $(mkinstalldirs) $(DESTDIR)$(screenshotdir); \
+ chmod 0755 $(DESTDIR)$(screenshotdir); \
+ chown gdm:gdm $(DESTDIR)$(screenshotdir) || : ; \
+ fi
+
if test '!' -d $(DESTDIR)$(workingdir); then \
$(mkinstalldirs) $(DESTDIR)$(workingdir); \
chmod 1770 $(DESTDIR)$(workingdir); \
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 0b6ea04..f1ff331 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -4,6 +4,7 @@ AM_CPPFLAGS = \
-I. \
-I.. \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
+ -DGDM_SCREENSHOT_DIR=\""$(GDM_SCREENSHOT_DIR)"\"\
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(UTILS_CFLAGS) \
$(CANBERRA_GTK_CFLAGS) \
diff --git a/utils/gdm-screenshot.c b/utils/gdm-screenshot.c
index f66de46..12102f2 100644
--- a/utils/gdm-screenshot.c
+++ b/utils/gdm-screenshot.c
@@ -163,11 +163,8 @@ screenshot_save (GdkPixbuf *pixbuf)
char *filename;
gboolean res;
GError *error;
- const char *save_dir;
- save_dir = LOCALSTATEDIR "/run/gdm";
-
- filename = g_build_filename (save_dir,
+ filename = g_build_filename (GDM_SCREENSHOT_DIR,
"GDM-Screenshot.png",
NULL);
--
1.6.5.1
From 1fe51c8f69dc93033d2035c27389377090f21b78 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 27 Oct 2009 11:25:19 -0400
Subject: [PATCH 2/4] Create screenshot dir at runtime if not available
We want the screenshot dir to be owned by the GDM user,
so the greeter can write screenshots to it.
---
daemon/Makefile.am | 1 +
daemon/gdm-greeter-session.c | 1 +
daemon/gdm-welcome-session.c | 32 ++++++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index a122a15..ab10dc5 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
-DSBINDIR=\"$(sbindir)\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
+ -DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\" \
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
-DGDM_SESSION_DEFAULT_PATH=\"$(GDM_SESSION_DEFAULT_PATH)\" \
$(DISABLE_DEPRECATED_CFLAGS) \
diff --git a/daemon/gdm-greeter-session.c b/daemon/gdm-greeter-session.c
index aae1928..994acbc 100644
--- a/daemon/gdm-greeter-session.c
+++ b/daemon/gdm-greeter-session.c
@@ -156,6 +156,7 @@ gdm_greeter_session_new (const char *display_name,
"x11-display-device", display_device,
"x11-display-hostname", display_hostname,
"x11-display-is-local", display_is_local,
+ "runtime-dir", GDM_SCREENSHOT_DIR,
NULL);
return GDM_GREETER_SESSION (object);
diff --git a/daemon/gdm-welcome-session.c b/daemon/gdm-welcome-session.c
index b58e855..f340660 100644
--- a/daemon/gdm-welcome-session.c
+++ b/daemon/gdm-welcome-session.c
@@ -63,6 +63,7 @@ struct GdmWelcomeSessionPrivate
char *user_name;
char *group_name;
+ char *runtime_dir;
char *x11_display_name;
char *x11_display_device;
@@ -91,6 +92,7 @@ enum {
PROP_X11_DISPLAY_IS_LOCAL,
PROP_USER_NAME,
PROP_GROUP_NAME,
+ PROP_RUNTIME_DIR,
PROP_SERVER_ADDRESS,
PROP_COMMAND,
PROP_SERVER_DBUS_PATH,
@@ -408,6 +410,7 @@ rotate_logs (const char *path,
typedef struct {
const char *user_name;
const char *group_name;
+ const char *runtime_dir;
const char *log_file;
} SpawnChildData;
@@ -435,6 +438,10 @@ spawn_child_setup (SpawnChildData *data)
_exit (1);
}
+ g_debug ("GdmWelcomeSession: Setting up run time dir %s", data->runtime_dir);
+ g_mkdir (data->runtime_dir, 0755);
+ chown (data->runtime_dir, pwent->pw_uid, pwent->pw_gid);
+
g_debug ("GdmWelcomeSession: Changing (uid:gid) for child process to (%d:%d)",
pwent->pw_uid,
grent->gr_gid);
@@ -552,6 +559,7 @@ static gboolean
spawn_command_line_async_as_user (const char *command_line,
const char *user_name,
const char *group_name,
+ const char *runtime_dir,
const char *log_file,
char **env,
GPid *child_pid,
@@ -575,6 +583,7 @@ spawn_command_line_async_as_user (const char *command_line,
data.user_name = user_name;
data.group_name = group_name;
+ data.runtime_dir = runtime_dir;
data.log_file = log_file;
local_error = NULL;
@@ -756,6 +765,7 @@ gdm_welcome_session_spawn (GdmWelcomeSession *welcome_session)
ret = spawn_command_line_async_as_user (welcome_session->priv->command,
welcome_session->priv->user_name,
welcome_session->priv->group_name,
+ welcome_session->priv->runtime_dir,
log_path,
(char **)env->pdata,
&welcome_session->priv->pid,
@@ -928,6 +938,14 @@ _gdm_welcome_session_set_group_name (GdmWelcomeSession *welcome_session,
}
static void
+_gdm_welcome_session_set_runtime_dir (GdmWelcomeSession *welcome_session,
+ const char *dir)
+{
+ g_free (welcome_session->priv->runtime_dir);
+ welcome_session->priv->runtime_dir = g_strdup (dir);
+}
+
+static void
_gdm_welcome_session_set_server_dbus_path (GdmWelcomeSession *welcome_session,
const char *name)
{
@@ -998,6 +1016,9 @@ gdm_welcome_session_set_property (GObject *object,
case PROP_GROUP_NAME:
_gdm_welcome_session_set_group_name (self, g_value_get_string (value));
break;
+ case PROP_RUNTIME_DIR:
+ _gdm_welcome_session_set_runtime_dir (self, g_value_get_string (value));
+ break;
case PROP_SERVER_ADDRESS:
gdm_welcome_session_set_server_address (self, g_value_get_string (value));
break;
@@ -1054,6 +1075,9 @@ gdm_welcome_session_get_property (GObject *object,
case PROP_GROUP_NAME:
g_value_set_string (value, self->priv->group_name);
break;
+ case PROP_RUNTIME_DIR:
+ g_value_set_string (value, self->priv->runtime_dir);
+ break;
case PROP_SERVER_ADDRESS:
g_value_set_string (value, self->priv->server_address);
break;
@@ -1154,6 +1178,13 @@ gdm_welcome_session_class_init (GdmWelcomeSessionClass *klass)
GDM_GROUPNAME,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
+ PROP_RUNTIME_DIR,
+ g_param_spec_string ("runtime-dir",
+ "runtime dir",
+ "runtime dir",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (object_class,
PROP_SERVER_ADDRESS,
g_param_spec_string ("server-address",
"server address",
@@ -1267,6 +1298,7 @@ gdm_welcome_session_finalize (GObject *object)
g_free (welcome_session->priv->command);
g_free (welcome_session->priv->user_name);
g_free (welcome_session->priv->group_name);
+ g_free (welcome_session->priv->runtime_dir);
g_free (welcome_session->priv->x11_display_name);
g_free (welcome_session->priv->x11_display_device);
g_free (welcome_session->priv->x11_display_hostname);
--
1.6.5.1
From 81870b019c929694ea392359b0a66b0a500c7d5c Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 27 Oct 2009 11:43:15 -0400
Subject: [PATCH 3/4] Move default screenshot dir to it's own subdirectory
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0dd2658..93917e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1247,7 +1247,7 @@ AC_ARG_WITH(screenshot-dir,
if ! test -z "$with_screenshot_dir"; then
GDM_SCREENSHOT_DIR=$with_screenshot_dir
else
- GDM_SCREENSHOT_DIR=${localstatedir}/run/gdm
+ GDM_SCREENSHOT_DIR=${localstatedir}/run/gdm/greeter
fi
AC_SUBST(GDM_SCREENSHOT_DIR)
--
1.6.5.1
From c96697431529ed87dbdbb987ed92ac2286b247b7 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 27 Oct 2009 10:35:37 -0400
Subject: [PATCH 4/4] Lock down /var/run/gdm
We don't need it so open now that screenshots are written to their
own directory, and having it open has implications for quota abuse.
---
daemon/gdm-display-access-file.c | 14 +++++++-------
data/Makefile.am | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/daemon/gdm-display-access-file.c b/daemon/gdm-display-access-file.c
index a3d3e2f..1b52f15 100644
--- a/daemon/gdm-display-access-file.c
+++ b/daemon/gdm-display-access-file.c
@@ -268,10 +268,10 @@ _create_xauth_file_for_user (const char *username,
fp = NULL;
fd = -1;
- /* Create directory if not exist, then set permission 01775 and ownership root:gdm */
+ /* Create directory if not exist, then set permission 0711 and ownership root:gdm */
if (g_file_test (GDM_XAUTH_DIR, G_FILE_TEST_IS_DIR) == FALSE) {
g_unlink (GDM_XAUTH_DIR);
- if (g_mkdir (GDM_XAUTH_DIR, S_ISVTX | S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) {
+ if (g_mkdir (GDM_XAUTH_DIR, 0711) != 0) {
g_set_error (error,
G_FILE_ERROR,
g_file_error_from_errno (errno),
@@ -279,15 +279,15 @@ _create_xauth_file_for_user (const char *username,
goto out;
}
- g_chmod (GDM_XAUTH_DIR, S_ISVTX | S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+ g_chmod (GDM_XAUTH_DIR, 0711);
_get_uid_and_gid_for_user (GDM_USERNAME, &uid, &gid);
if (chown (GDM_XAUTH_DIR, 0, gid) != 0) {
g_warning ("Unable to change owner of '%s'",
GDM_XAUTH_DIR);
}
} else {
- /* if it does exist make sure it has correct mode 01775 */
- g_chmod (GDM_XAUTH_DIR, S_ISVTX | S_IRWXU |S_IRWXG | S_IROTH | S_IXOTH);
+ /* if it does exist make sure it has correct mode 0711 */
+ g_chmod (GDM_XAUTH_DIR, 0711);
/* and clean up any stale auth subdirs */
clean_up_stale_auth_subdirs ();
@@ -368,8 +368,8 @@ _create_xauth_file_for_user (const char *username,
}
/* now open up permissions on per-session directory */
- g_debug ("GdmDisplayAccessFile: chmoding %s to 1777", dir_name);
- g_chmod (dir_name, S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO);
+ g_debug ("GdmDisplayAccessFile: chmoding %s to 0711", dir_name);
+ g_chmod (dir_name, 0711);
errno = 0;
fp = fdopen (fd, "w");
diff --git a/data/Makefile.am b/data/Makefile.am
index 608194d..dfbd096 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -202,7 +202,7 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
if test '!' -d $(DESTDIR)$(xauthdir); then \
$(mkinstalldirs) $(DESTDIR)$(xauthdir); \
- chmod 1777 $(DESTDIR)$(xauthdir); \
+ chmod 0711 $(DESTDIR)$(xauthdir); \
chown root:gdm $(DESTDIR)$(xauthdir) || : ; \
fi
--
1.6.5.1

View File

@ -1,66 +0,0 @@
From 88d4e5d79ca5ded0f9e88af67044d53342ff0897 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 22 Oct 2009 17:39:27 -0400
Subject: [PATCH 1/2] Force cell renderer to be a specific height
Before it was growing and shrinking all the time causing,
flicker.
---
gui/simple-greeter/gdm-cell-renderer-timer.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/gui/simple-greeter/gdm-cell-renderer-timer.c b/gui/simple-greeter/gdm-cell-renderer-timer.c
index 7918b48..9453d7e 100644
--- a/gui/simple-greeter/gdm-cell-renderer-timer.c
+++ b/gui/simple-greeter/gdm-cell-renderer-timer.c
@@ -108,19 +108,11 @@ gdm_cell_renderer_timer_get_size (GtkCellRenderer *cell,
}
if (width != NULL) {
- if (cell->width >= 0) {
- *width = cell->width;
- } else {
- *width = renderer->priv->value <= G_MINDOUBLE? 0 : 64;
- }
+ *width = cell->xpad * 2 + 24;
}
if (height != NULL) {
- if (cell->height >= 0) {
- *height = cell->height;
- } else {
- *height = renderer->priv->value <= G_MINDOUBLE? 0 : 64;
- }
+ *height = cell->ypad * 2 + 24;
}
}
--
1.6.5.rc2
From a87b05fac2c2de7cff80a183e397f33416bfc893 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 22 Oct 2009 17:45:13 -0400
Subject: [PATCH 2/2] Drop set_operator (SOURCE) in cell renderer
I'm not sure why I was doing it, when it looks
find using OVER, so I'm going to take it out.
---
gui/simple-greeter/gdm-cell-renderer-timer.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/gui/simple-greeter/gdm-cell-renderer-timer.c b/gui/simple-greeter/gdm-cell-renderer-timer.c
index 9453d7e..0fb404c 100644
--- a/gui/simple-greeter/gdm-cell-renderer-timer.c
+++ b/gui/simple-greeter/gdm-cell-renderer-timer.c
@@ -164,7 +164,6 @@ draw_timer (GdmCellRendererTimer *renderer,
cairo_arc (context, 0, 0, radius + 1, 0, 2 * G_PI);
cairo_fill (context);
- cairo_set_operator (context, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgb (context,
bg->red / 65535.0,
bg->green / 65535.0,
--
1.6.5.rc2

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
diff -up gdm-2.26.0/configure.ac.force-active-vt gdm-2.26.0/configure.ac
--- gdm-2.26.0/configure.ac.force-active-vt 2009-03-13 00:00:28.000000000 -0400
+++ gdm-2.26.0/configure.ac 2009-03-16 14:29:02.644213240 -0400
@@ -1231,6 +1231,23 @@ fi
AC_SUBST(GDM_XAUTH_DIR)
diff -up gdm-2.29.1/configure.ac.force-active-vt gdm-2.29.1/configure.ac
--- gdm-2.29.1/configure.ac.force-active-vt 2009-11-30 17:23:11.000000000 -0500
+++ gdm-2.29.1/configure.ac 2009-12-02 23:31:13.064009409 -0500
@@ -1254,6 +1254,23 @@ AC_SUBST(GDM_SCREENSHOT_DIR)
dnl ---------------------------------------------------------------------------
+dnl - Directory to spool events from other processes
@ -25,9 +25,9 @@ diff -up gdm-2.26.0/configure.ac.force-active-vt gdm-2.26.0/configure.ac
dnl - Finish
dnl ---------------------------------------------------------------------------
diff -up gdm-2.26.0/daemon/gdm-display.c.force-active-vt gdm-2.26.0/daemon/gdm-display.c
--- gdm-2.26.0/daemon/gdm-display.c.force-active-vt 2009-02-19 21:45:13.000000000 -0500
+++ gdm-2.26.0/daemon/gdm-display.c 2009-03-16 14:29:02.646213754 -0400
diff -up gdm-2.29.1/daemon/gdm-display.c.force-active-vt gdm-2.29.1/daemon/gdm-display.c
--- gdm-2.29.1/daemon/gdm-display.c.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/gdm-display.c 2009-12-02 23:31:13.065009323 -0500
@@ -65,7 +65,9 @@ struct GdmDisplayPrivate
gsize x11_cookie_size;
GdmDisplayAccessFile *access_file;
@ -47,7 +47,7 @@ diff -up gdm-2.26.0/daemon/gdm-display.c.force-active-vt gdm-2.26.0/daemon/gdm-d
PROP_SLAVE_COMMAND,
};
@@ -578,9 +581,10 @@ gdm_display_real_prepare (GdmDisplay *di
@@ -574,9 +577,10 @@ gdm_display_real_prepare (GdmDisplay *di
gdm_slave_proxy_set_log_path (display->priv->slave_proxy, log_path);
g_free (log_path);
@ -60,7 +60,7 @@ diff -up gdm-2.26.0/daemon/gdm-display.c.force-active-vt gdm-2.26.0/daemon/gdm-d
gdm_slave_proxy_set_command (display->priv->slave_proxy, command);
g_free (command);
@@ -831,6 +835,13 @@ _gdm_display_set_is_local (GdmDisplay
@@ -824,6 +828,13 @@ _gdm_display_set_is_local (GdmDisplay
}
static void
@ -74,7 +74,7 @@ diff -up gdm-2.26.0/daemon/gdm-display.c.force-active-vt gdm-2.26.0/daemon/gdm-d
_gdm_display_set_slave_command (GdmDisplay *display,
const char *command)
{
@@ -873,6 +884,9 @@ gdm_display_set_property (GObject
@@ -866,6 +877,9 @@ gdm_display_set_property (GObject
case PROP_IS_LOCAL:
_gdm_display_set_is_local (self, g_value_get_boolean (value));
break;
@ -84,7 +84,7 @@ diff -up gdm-2.26.0/daemon/gdm-display.c.force-active-vt gdm-2.26.0/daemon/gdm-d
case PROP_SLAVE_COMMAND:
_gdm_display_set_slave_command (self, g_value_get_string (value));
break;
@@ -921,6 +935,9 @@ gdm_display_get_property (GObject
@@ -914,6 +928,9 @@ gdm_display_get_property (GObject
case PROP_IS_LOCAL:
g_value_set_boolean (value, self->priv->is_local);
break;
@ -94,7 +94,7 @@ diff -up gdm-2.26.0/daemon/gdm-display.c.force-active-vt gdm-2.26.0/daemon/gdm-d
case PROP_SLAVE_COMMAND:
g_value_set_string (value, self->priv->slave_command);
break;
@@ -1091,6 +1108,13 @@ gdm_display_class_init (GdmDisplayClass
@@ -1084,6 +1101,13 @@ gdm_display_class_init (GdmDisplayClass
NULL,
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
@ -108,9 +108,9 @@ diff -up gdm-2.26.0/daemon/gdm-display.c.force-active-vt gdm-2.26.0/daemon/gdm-d
g_object_class_install_property (object_class,
PROP_SLAVE_COMMAND,
diff -up gdm-2.26.0/daemon/gdm-server.c.force-active-vt gdm-2.26.0/daemon/gdm-server.c
--- gdm-2.26.0/daemon/gdm-server.c.force-active-vt 2009-02-19 21:45:13.000000000 -0500
+++ gdm-2.26.0/daemon/gdm-server.c 2009-03-16 14:29:02.647212475 -0400
diff -up gdm-2.29.1/daemon/gdm-server.c.force-active-vt gdm-2.29.1/daemon/gdm-server.c
--- gdm-2.29.1/daemon/gdm-server.c.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/gdm-server.c 2009-12-02 23:31:13.066009518 -0500
@@ -34,6 +34,8 @@
#include <signal.h>
#include <sys/resource.h>
@ -187,9 +187,9 @@ diff -up gdm-2.26.0/daemon/gdm-server.c.force-active-vt gdm-2.26.0/daemon/gdm-se
static void
server_died (GdmServer *server)
{
diff -up gdm-2.26.0/daemon/gdm-server.h.force-active-vt gdm-2.26.0/daemon/gdm-server.h
--- gdm-2.26.0/daemon/gdm-server.h.force-active-vt 2009-02-19 21:45:13.000000000 -0500
+++ gdm-2.26.0/daemon/gdm-server.h 2009-03-16 14:29:02.649191269 -0400
diff -up gdm-2.29.1/daemon/gdm-server.h.force-active-vt gdm-2.29.1/daemon/gdm-server.h
--- gdm-2.29.1/daemon/gdm-server.h.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/gdm-server.h 2009-12-02 23:31:13.066009518 -0500
@@ -56,6 +56,7 @@ GType gdm_server_get_type
GdmServer * gdm_server_new (const char *display_id,
const char *auth_file);
@ -198,9 +198,9 @@ diff -up gdm-2.26.0/daemon/gdm-server.h.force-active-vt gdm-2.26.0/daemon/gdm-se
gboolean gdm_server_stop (GdmServer *server);
char * gdm_server_get_display_device (GdmServer *server);
diff -up gdm-2.26.0/daemon/gdm-simple-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-simple-slave.c
--- gdm-2.26.0/daemon/gdm-simple-slave.c.force-active-vt 2009-02-19 21:45:13.000000000 -0500
+++ gdm-2.26.0/daemon/gdm-simple-slave.c 2009-03-16 14:29:02.652215508 -0400
diff -up gdm-2.29.1/daemon/gdm-simple-slave.c.force-active-vt gdm-2.29.1/daemon/gdm-simple-slave.c
--- gdm-2.29.1/daemon/gdm-simple-slave.c.force-active-vt 2009-11-24 02:26:07.000000000 -0500
+++ gdm-2.29.1/daemon/gdm-simple-slave.c 2009-12-02 23:31:13.067013552 -0500
@@ -88,6 +88,7 @@ struct GdmSimpleSlavePrivate
enum {
@ -209,7 +209,7 @@ diff -up gdm-2.26.0/daemon/gdm-simple-slave.c.force-active-vt gdm-2.26.0/daemon/
};
static void gdm_simple_slave_class_init (GdmSimpleSlaveClass *klass);
@@ -1064,11 +1065,13 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
@@ -1075,11 +1076,13 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
char *display_name;
char *auth_file;
gboolean display_is_local;
@ -223,7 +223,7 @@ diff -up gdm-2.26.0/daemon/gdm-simple-slave.c.force-active-vt gdm-2.26.0/daemon/
NULL);
/* if this is local display start a server if one doesn't
@@ -1100,7 +1103,10 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
@@ -1111,7 +1114,10 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
G_CALLBACK (on_server_ready),
slave);
@ -235,7 +235,7 @@ diff -up gdm-2.26.0/daemon/gdm-simple-slave.c.force-active-vt gdm-2.26.0/daemon/
if (! res) {
g_warning (_("Could not start the X "
"server (your graphical environment) "
@@ -1248,12 +1254,14 @@ gdm_simple_slave_finalize (GObject *obje
@@ -1259,12 +1265,14 @@ gdm_simple_slave_finalize (GObject *obje
}
GdmSlave *
@ -251,9 +251,9 @@ diff -up gdm-2.26.0/daemon/gdm-simple-slave.c.force-active-vt gdm-2.26.0/daemon/
NULL);
return GDM_SLAVE (object);
diff -up gdm-2.26.0/daemon/gdm-simple-slave.h.force-active-vt gdm-2.26.0/daemon/gdm-simple-slave.h
--- gdm-2.26.0/daemon/gdm-simple-slave.h.force-active-vt 2009-02-19 21:45:13.000000000 -0500
+++ gdm-2.26.0/daemon/gdm-simple-slave.h 2009-03-16 14:29:02.655435299 -0400
diff -up gdm-2.29.1/daemon/gdm-simple-slave.h.force-active-vt gdm-2.29.1/daemon/gdm-simple-slave.h
--- gdm-2.29.1/daemon/gdm-simple-slave.h.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/gdm-simple-slave.h 2009-12-02 23:31:13.067013552 -0500
@@ -48,7 +48,8 @@ typedef struct
} GdmSimpleSlaveClass;
@ -264,9 +264,9 @@ diff -up gdm-2.26.0/daemon/gdm-simple-slave.h.force-active-vt gdm-2.26.0/daemon/
G_END_DECLS
diff -up gdm-2.26.0/daemon/gdm-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-slave.c
--- gdm-2.26.0/daemon/gdm-slave.c.force-active-vt 2009-02-19 21:45:13.000000000 -0500
+++ gdm-2.26.0/daemon/gdm-slave.c 2009-03-16 14:29:02.692436090 -0400
diff -up gdm-2.29.1/daemon/gdm-slave.c.force-active-vt gdm-2.29.1/daemon/gdm-slave.c
--- gdm-2.29.1/daemon/gdm-slave.c.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/gdm-slave.c 2009-12-02 23:31:13.068018007 -0500
@@ -83,6 +83,7 @@ struct GdmSlavePrivate
char *display_hostname;
gboolean display_is_local;
@ -275,7 +275,7 @@ diff -up gdm-2.26.0/daemon/gdm-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-sla
char *display_seat_id;
char *display_x11_authority_file;
char *parent_display_name;
@@ -99,6 +100,7 @@ enum {
@@ -101,6 +102,7 @@ enum {
PROP_DISPLAY_NUMBER,
PROP_DISPLAY_HOSTNAME,
PROP_DISPLAY_IS_LOCAL,
@ -283,7 +283,7 @@ diff -up gdm-2.26.0/daemon/gdm-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-sla
PROP_DISPLAY_SEAT_ID,
PROP_DISPLAY_X11_AUTHORITY_FILE
};
@@ -1164,6 +1166,13 @@ _gdm_slave_set_display_is_local (GdmSlav
@@ -1332,6 +1334,13 @@ _gdm_slave_set_display_is_local (GdmSlav
}
static void
@ -297,7 +297,7 @@ diff -up gdm-2.26.0/daemon/gdm-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-sla
gdm_slave_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -1195,6 +1204,9 @@ gdm_slave_set_property (GObject *ob
@@ -1363,6 +1372,9 @@ gdm_slave_set_property (GObject *ob
case PROP_DISPLAY_IS_LOCAL:
_gdm_slave_set_display_is_local (self, g_value_get_boolean (value));
break;
@ -307,7 +307,7 @@ diff -up gdm-2.26.0/daemon/gdm-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-sla
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1233,6 +1245,9 @@ gdm_slave_get_property (GObject *obje
@@ -1401,6 +1413,9 @@ gdm_slave_get_property (GObject *obje
case PROP_DISPLAY_IS_LOCAL:
g_value_set_boolean (value, self->priv->display_is_local);
break;
@ -317,7 +317,7 @@ diff -up gdm-2.26.0/daemon/gdm-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-sla
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1358,6 +1373,14 @@ gdm_slave_class_init (GdmSlaveClass *kla
@@ -1526,6 +1541,14 @@ gdm_slave_class_init (GdmSlaveClass *kla
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
@ -332,9 +332,9 @@ diff -up gdm-2.26.0/daemon/gdm-slave.c.force-active-vt gdm-2.26.0/daemon/gdm-sla
signals [STOPPED] =
g_signal_new ("stopped",
G_TYPE_FROM_CLASS (object_class),
diff -up gdm-2.26.0/daemon/gdm-static-display.c.force-active-vt gdm-2.26.0/daemon/gdm-static-display.c
--- gdm-2.26.0/daemon/gdm-static-display.c.force-active-vt 2009-03-11 11:00:52.000000000 -0400
+++ gdm-2.26.0/daemon/gdm-static-display.c 2009-03-16 14:29:02.693447871 -0400
diff -up gdm-2.29.1/daemon/gdm-static-display.c.force-active-vt gdm-2.29.1/daemon/gdm-static-display.c
--- gdm-2.29.1/daemon/gdm-static-display.c.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/gdm-static-display.c 2009-12-02 23:31:13.068018007 -0500
@@ -86,10 +86,27 @@ gdm_static_display_remove_user_authoriza
}
@ -363,34 +363,33 @@ diff -up gdm-2.26.0/daemon/gdm-static-display.c.force-active-vt gdm-2.26.0/daemo
GDM_DISPLAY_CLASS (gdm_static_display_parent_class)->manage (display);
return TRUE;
diff -up gdm-2.26.0/daemon/Makefile.am.force-active-vt gdm-2.26.0/daemon/Makefile.am
--- gdm-2.26.0/daemon/Makefile.am.force-active-vt 2009-02-19 21:45:14.000000000 -0500
+++ gdm-2.26.0/daemon/Makefile.am 2009-03-16 14:29:58.020476408 -0400
diff -up gdm-2.29.1/daemon/Makefile.am.force-active-vt gdm-2.29.1/daemon/Makefile.am
--- gdm-2.29.1/daemon/Makefile.am.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/Makefile.am 2009-12-02 23:31:13.069017990 -0500
@@ -14,6 +14,7 @@ AM_CPPFLAGS = \
-DLOGDIR=\"$(logdir)\" \
-DSBINDIR=\"$(sbindir)\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
+ -DGDM_SPOOL_DIR=\"$(GDM_SPOOL_DIR)\" \
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
-DGDM_SESSION_DEFAULT_PATH=\"$(GDM_SESSION_DEFAULT_PATH)\" \
$(DISABLE_DEPRECATED_CFLAGS) \
diff -up gdm-2.26.0/daemon/simple-slave-main.c.force-active-vt gdm-2.26.0/daemon/simple-slave-main.c
--- gdm-2.26.0/daemon/simple-slave-main.c.force-active-vt 2009-03-16 11:59:33.000000000 -0400
+++ gdm-2.26.0/daemon/simple-slave-main.c 2009-03-16 14:29:02.697437865 -0400
@@ -174,10 +174,12 @@ main (int argc,
-DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\" \
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
diff -up gdm-2.29.1/daemon/simple-slave-main.c.force-active-vt gdm-2.29.1/daemon/simple-slave-main.c
--- gdm-2.29.1/daemon/simple-slave-main.c.force-active-vt 2009-11-16 17:37:43.000000000 -0500
+++ gdm-2.29.1/daemon/simple-slave-main.c 2009-12-02 23:31:54.674210044 -0500
@@ -178,9 +178,11 @@ main (int argc,
DBusGConnection *connection;
GdmSlave *slave;
static char *display_id = NULL;
static gboolean debug = FALSE;
+ static gboolean force_active_vt = FALSE;
GdmSignalHandler *signal_handler;
static GOptionEntry entries [] = {
{ "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
{ "display-id", 0, 0, G_OPTION_ARG_STRING, &display_id, N_("Display ID"), N_("id") },
{ "display-id", 0, 0, G_OPTION_ARG_STRING, &display_id, N_("Display ID"), N_("ID") },
+ { "force-active-vt", 0, 0, G_OPTION_ARG_NONE, &force_active_vt, N_("Force X to start on active vt"), NULL },
{ NULL }
};
@@ -245,7 +247,7 @@ main (int argc,
@@ -248,7 +250,7 @@ main (int argc,
gdm_signal_handler_add (signal_handler, SIGUSR1, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGUSR2, signal_cb, NULL);
@ -399,27 +398,27 @@ diff -up gdm-2.26.0/daemon/simple-slave-main.c.force-active-vt gdm-2.26.0/daemon
if (slave == NULL) {
goto out;
}
diff -up gdm-2.26.0/data/Makefile.am.force-active-vt gdm-2.26.0/data/Makefile.am
--- gdm-2.26.0/data/Makefile.am.force-active-vt 2009-02-19 21:45:14.000000000 -0500
+++ gdm-2.26.0/data/Makefile.am 2009-03-16 14:30:39.953441112 -0400
diff -up gdm-2.29.1/data/Makefile.am.force-active-vt gdm-2.29.1/data/Makefile.am
--- gdm-2.29.1/data/Makefile.am.force-active-vt 2009-11-16 19:45:22.000000000 -0500
+++ gdm-2.29.1/data/Makefile.am 2009-12-02 23:31:13.070023842 -0500
@@ -13,6 +13,7 @@ predir = $(gdmconfdir)/PreSession
postlogindir = $(gdmconfdir)/PostLogin
workingdir = $(GDM_WORKING_DIR)
xauthdir = $(GDM_XAUTH_DIR)
+spooldir = $(GDM_SPOOL_DIR)
screenshotdir = $(GDM_SCREENSHOT_DIR)
cachedir = $(localstatedir)/cache/gdm
Xsession: $(srcdir)/Xsession.in
sed -e 's,[@]XSESSION_SHELL[@],$(XSESSION_SHELL),g' \
@@ -122,6 +123,7 @@ uninstall-hook:
-rf \
@@ -125,6 +126,7 @@ uninstall-hook:
$(DESTDIR)$(workingdir)/.gconf.mandatory \
$(DESTDIR)$(screenshotdir) \
$(DESTDIR)$(xauthdir)
+ $(DESTDIR)$(spooldir)
install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.path
if test '!' -d $(DESTDIR)$(gdmconfdir); then \
@@ -209,6 +211,12 @@ install-data-hook: gdm.conf-custom Xsess
chown root:gdm $(DESTDIR)$(workingdir) || : ; \
@@ -224,6 +226,12 @@ install-data-hook: gdm.conf-custom Xsess
chown root:gdm $(DESTDIR)$(cachedir) || : ; \
fi
+ if test '!' -d $(DESTDIR)$(spooldir); then \

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.29.1
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@ -92,7 +92,7 @@ BuildRequires: DeviceKit-power-devel >= 008
Provides: service(graphical-login)
Requires: audit-libs >= %{libauditver}
Patch2: gdm-2.26.0-force-active-vt.patch
Patch2: gdm-2.29.1-force-active-vt.patch
Patch3: gdm-2.23.92-save-root-window.patch
# uses /etc/sysconfig/keyboard and is thus not directly upstreamable
@ -100,15 +100,6 @@ Patch3: gdm-2.23.92-save-root-window.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=572765
Patch13: gdm-system-keyboard.patch
Patch20: gdm-2.28.1-move-shutdown-functions.patch
Patch21: fix-clock.patch
Patch22: fix-timer.patch
Patch23: fix-na-tray.patch
Patch24: fix-computer-info.patch
Patch25: fix-run-dir-permissions.patch
Patch26: make-user-list-animation-smoother.patch
Patch27: 0001-Don-t-show-lock-screen-option-if-locked-down.patch
Patch96: gdm-multistack.patch
# Fedora-specific
Patch97: gdm-bubble-location.patch
@ -153,16 +144,6 @@ The GDM fingerprint plugin provides functionality necessary to use a fingerprint
%patch2 -p1 -b .force-active-vt
%patch3 -p1 -b .save-root-window
%patch13 -p1 -b .system-keyboard
%patch20 -p1 -b .move-shutdown-functions
%patch21 -p1 -b .fix-clock
%patch22 -p1 -b .fix-timer
%patch23 -p1 -b .fix-na-tray
%patch24 -p1 -b .fix-computer-info
%patch25 -p1 -b .fix-run-dir-permission
%patch26 -p1 -b .make-user-list-animation-smoother
%patch27 -p1 -b .dont-show-lock-screen-if-locked-down
%patch96 -p1 -b .multistack
%patch97 -p1 -b .bubble-location
%patch98 -p1 -b .tray-padding
@ -419,6 +400,10 @@ fi
%{_libdir}/gdm/simple-greeter/plugins/fingerprint.so
%changelog
* Thu Dec 03 2009 Ray Strode <rstrode@redhat.com> 2.29.1-2
- Drop upstreamed patches
- rebase multi-stack patch
* Tue Dec 01 2009 Bastien Nocera <bnocera@redhat.com> 2.29.1-1
- Update to 2.29.1

View File

@ -1,408 +0,0 @@
From 7980049944d064e803522aca8241256a62e90925 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 30 Oct 2009 11:18:13 -0400
Subject: [PATCH 1/6] Fix typo in chooser grow code
---
gui/simple-greeter/gdm-chooser-widget.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index cbd5072..9347eee 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -894,7 +894,7 @@ start_grow_animation (GdmChooserWidget *widget)
height = get_height_of_screen (widget);
}
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
- widget->priv->height_when_grown,
+ height,
(GdmScrollableWidgetSlideStepFunc)
on_grow_animation_step, widget,
(GdmScrollableWidgetSlideDoneFunc)
--
1.6.5.1
From e2cde131a24e2933588bed8c741ca14bb007c6eb Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 30 Oct 2009 12:13:32 -0400
Subject: [PATCH 2/6] Don't start grow animation until chooser is loaded
This makes it smoother when first starting up
---
gui/simple-greeter/gdm-chooser-widget.c | 37 ++----------------------------
1 files changed, 3 insertions(+), 34 deletions(-)
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index 9347eee..1147104 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -92,7 +92,6 @@ struct GdmChooserWidgetPrivate
guint32 should_hide_inactive_items : 1;
guint32 emit_activated_after_resize_animation : 1;
- guint32 was_fully_grown : 1;
GdmChooserWidgetPosition separator_position;
GdmChooserWidgetState state;
@@ -807,29 +806,12 @@ on_grow_animation_complete (GdmScrollableWidget *scrollable_widget,
{
g_assert (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWING);
widget->priv->state = GDM_CHOOSER_WIDGET_STATE_GROWN;
- widget->priv->was_fully_grown = TRUE;
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (widget->priv->items_view), TRUE);
_grab_focus (GTK_WIDGET (widget));
}
static int
-get_height_of_screen (GdmChooserWidget *widget)
-{
- GdkScreen *screen;
- GdkRectangle area;
- int monitor;
-
- screen = gtk_widget_get_screen (GTK_WIDGET (widget));
-
- monitor = gdk_screen_get_monitor_at_window (screen,
- gdk_screen_get_root_window (screen));
- gdk_screen_get_monitor_geometry (screen, monitor, &area);
-
- return area.height;
-}
-
-static int
get_number_of_on_screen_rows (GdmChooserWidget *widget)
{
GtkTreePath *start_path;
@@ -876,7 +858,6 @@ start_grow_animation (GdmChooserWidget *widget)
{
int number_of_visible_rows;
int number_of_rows;
- int height;
number_of_visible_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->model_sorter), NULL);
number_of_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->list_store), NULL);
@@ -888,13 +869,8 @@ start_grow_animation (GdmChooserWidget *widget)
set_inactive_items_visible (widget, TRUE);
- if (widget->priv->was_fully_grown) {
- height = widget->priv->height_when_grown;
- } else {
- height = get_height_of_screen (widget);
- }
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
- height,
+ widget->priv->height_when_grown,
(GdmScrollableWidgetSlideStepFunc)
on_grow_animation_step, widget,
(GdmScrollableWidgetSlideDoneFunc)
@@ -912,7 +888,6 @@ skip_resize_animation (GdmChooserWidget *widget)
set_inactive_items_visible (GDM_CHOOSER_WIDGET (widget), TRUE);
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (widget->priv->items_view), TRUE);
widget->priv->state = GDM_CHOOSER_WIDGET_STATE_GROWN;
- widget->priv->was_fully_grown = FALSE;
_grab_focus (GTK_WIDGET (widget));
}
}
@@ -922,7 +897,6 @@ gdm_chooser_widget_grow (GdmChooserWidget *widget)
{
if (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_SHRINKING) {
gdm_scrollable_widget_stop_sliding (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget));
- widget->priv->was_fully_grown = FALSE;
}
gtk_alignment_set (GTK_ALIGNMENT (widget->priv->frame_alignment),
@@ -1233,9 +1207,7 @@ gdm_chooser_widget_size_allocate (GtkWidget *widget,
chooser_widget = GDM_CHOOSER_WIDGET (widget);
if (chooser_widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWN) {
- if (chooser_widget->priv->was_fully_grown) {
- chooser_widget->priv->height_when_grown = allocation->height;
- }
+ chooser_widget->priv->height_when_grown = allocation->height;
}
}
@@ -1801,8 +1773,6 @@ gdm_chooser_widget_init (GdmChooserWidget *widget)
*/
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
- widget->priv->height_when_grown = get_height_of_screen (widget);
-
gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 0, 0);
add_frame (widget);
@@ -1935,9 +1905,7 @@ gdm_chooser_widget_init (GdmChooserWidget *widget)
gtk_tree_row_reference_free);
add_separator (widget);
-
queue_column_visibility_update (widget);
- gdm_chooser_widget_grow (widget);
}
static void
@@ -2544,5 +2512,6 @@ gdm_chooser_widget_propagate_pending_key_events (GdmChooserWidget *widget)
void
gdm_chooser_widget_loaded (GdmChooserWidget *widget)
{
+ gdm_chooser_widget_grow (widget);
g_signal_emit (widget, signals[LOADED], 0);
}
--
1.6.5.1
From 3f707bba808b3484be7380a11aebfadb2bc98ab6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 30 Oct 2009 14:41:54 -0400
Subject: [PATCH 3/6] Hide user list frame when list is empty.
---
gui/simple-greeter/gdm-chooser-widget.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index 1147104..4124195 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -600,9 +600,9 @@ static void
update_chooser_visibility (GdmChooserWidget *widget)
{
if (gdm_chooser_widget_get_number_of_items (widget) > 0) {
- gtk_widget_show (widget->priv->scrollable_widget);
+ gtk_widget_show (widget->priv->frame);
} else {
- gtk_widget_hide (widget->priv->scrollable_widget);
+ gtk_widget_hide (widget->priv->frame);
}
g_object_notify (G_OBJECT (widget), "list-visible");
}
--
1.6.5.1
From 6197ec180d369899bf4b87c5e8adaed62ed3fdeb Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 30 Oct 2009 14:52:04 -0400
Subject: [PATCH 4/6] Dynamically slide destination from step function
This lets us add items or swift directions while the animation is going.
---
gui/simple-greeter/gdm-chooser-widget.c | 10 +++++-----
gui/simple-greeter/gdm-scrollable-widget.c | 19 ++++++++++++++++++-
gui/simple-greeter/gdm-scrollable-widget.h | 1 +
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index 4124195..4df03a6 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -97,7 +97,6 @@ struct GdmChooserWidgetPrivate
GdmChooserWidgetState state;
double active_row_normalized_position;
- int height_when_grown;
};
enum {
@@ -552,6 +551,7 @@ set_frame_text (GdmChooserWidget *widget,
static void
on_shrink_animation_step (GdmScrollableWidget *scrollable_widget,
double progress,
+ int *new_height,
GdmChooserWidget *widget)
{
GtkTreePath *active_row_path;
@@ -839,6 +839,7 @@ get_number_of_on_screen_rows (GdmChooserWidget *widget)
static void
on_grow_animation_step (GdmScrollableWidget *scrollable_widget,
double progress,
+ int *new_height,
GdmChooserWidget *widget)
{
int number_of_visible_rows;
@@ -851,6 +852,8 @@ on_grow_animation_step (GdmScrollableWidget *scrollable_widget,
gdm_scrollable_widget_stop_sliding (scrollable_widget);
return;
}
+
+ *new_height = GTK_BIN (scrollable_widget)->child->requisition.height;
}
static void
@@ -870,7 +873,7 @@ start_grow_animation (GdmChooserWidget *widget)
set_inactive_items_visible (widget, TRUE);
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
- widget->priv->height_when_grown,
+ GTK_BIN (widget->priv->scrollable_widget)->child->requisition.height,
(GdmScrollableWidgetSlideStepFunc)
on_grow_animation_step, widget,
(GdmScrollableWidgetSlideDoneFunc)
@@ -1206,9 +1209,6 @@ gdm_chooser_widget_size_allocate (GtkWidget *widget,
chooser_widget = GDM_CHOOSER_WIDGET (widget);
- if (chooser_widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWN) {
- chooser_widget->priv->height_when_grown = allocation->height;
- }
}
static gboolean
diff --git a/gui/simple-greeter/gdm-scrollable-widget.c b/gui/simple-greeter/gdm-scrollable-widget.c
index 2c0407d..6d9dc83 100644
--- a/gui/simple-greeter/gdm-scrollable-widget.c
+++ b/gui/simple-greeter/gdm-scrollable-widget.c
@@ -132,9 +132,26 @@ on_animation_tick (GdmScrollableWidgetAnimation *animation,
gtk_widget_set_size_request (animation->widget, width, height);
if (animation->step_func != NULL) {
+ GdmTimer *timer;
+
+ height = animation->desired_height;
+
+ height -= animation->widget->style->ythickness * 2;
+ height -= GTK_CONTAINER (animation->widget)->border_width * 2;
+
+ timer = g_object_ref (animation->timer);
animation->step_func (GDM_SCROLLABLE_WIDGET (animation->widget),
progress,
+ &height,
animation->step_func_user_data);
+
+ if (gdm_timer_is_started (timer)) {
+ height += animation->widget->style->ythickness * 2;
+ height += GTK_CONTAINER (animation->widget)->border_width * 2;
+
+ animation->desired_height = height;
+ }
+ g_object_unref (timer);
}
}
@@ -708,7 +725,7 @@ gdm_scrollable_widget_slide_to_height (GdmScrollableWidget *scrollable_widget,
if (!input_redirected || gdm_scrollable_widget_animations_are_disabled (scrollable_widget)) {
if (step_func != NULL) {
- step_func (scrollable_widget, 0.0, step_user_data);
+ step_func (scrollable_widget, 0.0, &height, step_user_data);
}
if (done_func != NULL) {
diff --git a/gui/simple-greeter/gdm-scrollable-widget.h b/gui/simple-greeter/gdm-scrollable-widget.h
index 9b8877e..2241cb1 100644
--- a/gui/simple-greeter/gdm-scrollable-widget.h
+++ b/gui/simple-greeter/gdm-scrollable-widget.h
@@ -40,6 +40,7 @@ typedef struct GdmScrollableWidget GdmScrollableWidget;
typedef struct GdmScrollableWidgetPrivate GdmScrollableWidgetPrivate;
typedef void (* GdmScrollableWidgetSlideStepFunc) (GdmScrollableWidget *scrollable_widget,
double progress,
+ int *new_height,
gpointer *user_data);
typedef void (* GdmScrollableWidgetSlideDoneFunc) (GdmScrollableWidget *scrollable_widget,
gpointer *user_data);
--
1.6.5.1
From a31d6dd70213fd3ab8572da2923b99fcbe5449a6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 30 Oct 2009 14:47:45 -0400
Subject: [PATCH 5/6] Drop checks for growing too far
We're now very exact about where to grow so we don't need it.
---
gui/simple-greeter/gdm-chooser-widget.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index 4df03a6..6c29d23 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -848,28 +848,12 @@ on_grow_animation_step (GdmScrollableWidget *scrollable_widget,
number_of_visible_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->model_sorter), NULL);
number_of_on_screen_rows = get_number_of_on_screen_rows (widget);
- if (number_of_on_screen_rows >= number_of_visible_rows) {
- gdm_scrollable_widget_stop_sliding (scrollable_widget);
- return;
- }
-
*new_height = GTK_BIN (scrollable_widget)->child->requisition.height;
}
static void
start_grow_animation (GdmChooserWidget *widget)
{
- int number_of_visible_rows;
- int number_of_rows;
-
- number_of_visible_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->model_sorter), NULL);
- number_of_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (widget->priv->list_store), NULL);
-
- if (number_of_visible_rows >= number_of_rows) {
- on_grow_animation_complete (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget), widget);
- return;
- }
-
set_inactive_items_visible (widget, TRUE);
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
--
1.6.5.1
From f685f9fe038d891026fce69a47a7ab7c3e438d37 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 30 Oct 2009 16:44:29 -0400
Subject: [PATCH 6/6] Compute needs-scrollbar logic differently
This way is a little clearer to read and seems to work
around a bug where the scrollbar gets shown briefly at
the end of an animation.
---
gui/simple-greeter/gdm-scrollable-widget.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/gui/simple-greeter/gdm-scrollable-widget.c b/gui/simple-greeter/gdm-scrollable-widget.c
index 6d9dc83..d55013d 100644
--- a/gui/simple-greeter/gdm-scrollable-widget.c
+++ b/gui/simple-greeter/gdm-scrollable-widget.c
@@ -252,7 +252,7 @@ gdm_scrollable_widget_animation_stop (GdmScrollableWidgetAnimation *animation)
static gboolean
gdm_scrollable_widget_needs_scrollbar (GdmScrollableWidget *widget)
{
- GtkAdjustment *adjustment;
+ gboolean needs_scrollbar;
if (widget->priv->scrollbar == NULL) {
return FALSE;
@@ -266,9 +266,19 @@ gdm_scrollable_widget_needs_scrollbar (GdmScrollableWidget *widget)
return FALSE;
}
- adjustment = gtk_range_get_adjustment (GTK_RANGE (widget->priv->scrollbar));
+ if (GTK_BIN (widget)->child != NULL) {
+ GtkRequisition child_requisition;
+ int available_height;
+
+ gtk_widget_get_child_requisition (GTK_BIN (widget)->child,
+ &child_requisition);
+ available_height = GTK_WIDGET (widget)->allocation.height;
+ needs_scrollbar = child_requisition.height > available_height;
+ } else {
+ needs_scrollbar = FALSE;
+ }
- return adjustment->upper - adjustment->lower > adjustment->page_size;
+ return needs_scrollbar;
}
static void
--
1.6.5.1