summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-02-16 11:27:10 -0500
committerRay Strode <rstrode@redhat.com>2015-02-16 22:06:24 -0500
commit3524ca38892c6104e2ca63afd84411fc953336bf (patch)
treedcd3c9d0dc5efb8350d5d43c56a424241048aa81
parent1f40fc59e1cd7f540e4da9de7d3f1b0116e7d066 (diff)
downloadgdm-3524ca38892c6104e2ca63afd84411fc953336bf.tar.gz
local-display-factory: drop some superfluous code
The store_display function takes a display number as an argument, it then uses that display number to reserve a slot in the "used display numbers" hash table. There's no reason for it to do this though, because the slot is already reserved when the next available display number is looked up in take_next_display_number. This commit drops the superfluous code.
-rw-r--r--daemon/gdm-local-display-factory.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index bf5a220a..d49bf25e 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -177,7 +177,6 @@ on_display_disposed (GdmLocalDisplayFactory *factory,
static void
store_display (GdmLocalDisplayFactory *factory,
- guint32 num,
GdmDisplay *display)
{
GdmDisplayStore *store;
@@ -189,9 +188,6 @@ store_display (GdmLocalDisplayFactory *factory,
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
gdm_display_store_add (store, display);
-
- /* now fill our reserved spot */
- g_hash_table_insert (factory->priv->used_display_numbers, GUINT_TO_POINTER (num), NULL);
}
static const char *
@@ -242,7 +238,7 @@ gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *fact
"allow-timed-login", FALSE,
NULL);
- store_display (factory, num, display);
+ store_display (factory, display);
if (! gdm_display_manage (display)) {
display = NULL;
@@ -377,7 +373,7 @@ create_display (GdmLocalDisplayFactory *factory,
g_object_set (display, "seat-id", seat_id, NULL);
g_object_set (display, "is-initial", initial, NULL);
- store_display (factory, num, display);
+ store_display (factory, display);
/* let store own the ref */
g_object_unref (display);