Commit 5d4fb658 authored by Ray Strode's avatar Ray Strode

Revert some commits

I had some inprogress changes in my local tree when when
git bz applying the patches on bug 618047.

Those unfinished changes got interleaved into the commits,
creating a bit of a mess.

Also, bug 618047 has been reopened.

This commit reverts those changes for now until.
parent b7d107a0
......@@ -194,14 +194,6 @@ AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
LIBGDMGREETER_LIBS="$SIMPLE_GREETER_LIBS"
AC_SUBST(LIBGDMGREETER_LIBS)
LIBGDMGREETER_CFLAGS="$SIMPLE_GREETER_CFLAGS"
AC_SUBST(LIBGDMGREETER_CFLAGS)
GOBJECT_INTROSPECTION_CHECK([0.9.12])
LIBGDMGREETER_GIR_INCLUDES="GLib-2.0 GObject-2.0 DBusGLib-1.0"
AC_SUBST(LIBGDMGREETER_GIR_INCLUDES)
dnl ---------------------------------------------------------------------------
dnl - Configuration file stuff
dnl ---------------------------------------------------------------------------
......@@ -276,11 +268,6 @@ AC_ARG_WITH(at-spi-registryd-directory,
AT_SPI_REGISTRYD_DIR=$with_at_spi_registryd_directory
AC_SUBST(AT_SPI_REGISTRYD_DIR)
AC_ARG_WITH(vt-switch-workaround,
AS_HELP_STRING([--with-vt-switch-workaround],
[Try to workaround missing -novtswitch option for X @<:@default=nor@:>@])],,
[with_vt_switch_workaround="no"])
# Allow configuration of default PATH
#
withval=""
......@@ -927,14 +914,6 @@ fi
AM_CONDITIONAL(WITH_CONSOLE_KIT, test x$use_console_kit = xyes)
AC_SUBST(WITH_CONSOLE_KIT)
dnl ---------------------------------------------------------------------------
dnl - Check for vt switch support
dnl ---------------------------------------------------------------------------
if test "x$with_vt_switch_workaround" != "xno" ; then
AC_DEFINE(WITH_VT_SWITCH_WORKAROUND, 1, [Define to enable workaround for missing -novtswitch feature])
fi
dnl ---------------------------------------------------------------------------
dnl - Check for D-Bus
dnl ---------------------------------------------------------------------------
......@@ -1442,8 +1421,6 @@ Makefile
daemon/Makefile
docs/Makefile
gui/Makefile
gui/libgdmgreeter/Makefile
gui/libgdmgreeter/gdmgreeter.pc
gui/simple-greeter/Makefile
gui/simple-greeter/libgdmsimplegreeter/Makefile
gui/simple-greeter/libgdmsimplegreeter/gdmsimplegreeter.pc
......
......@@ -66,7 +66,6 @@ struct GdmDisplayPrivate
GdmDisplayAccessFile *access_file;
gboolean is_local;
gboolean switch_on_finish;
guint finish_idle_id;
GdmSlaveProxy *slave_proxy;
......@@ -85,7 +84,6 @@ enum {
PROP_X11_COOKIE,
PROP_X11_AUTHORITY_FILE,
PROP_IS_LOCAL,
PROP_SWITCH_ON_FINISH,
PROP_SLAVE_COMMAND,
};
......@@ -136,14 +134,6 @@ gdm_display_get_status (GdmDisplay *display)
return display->priv->status;
}
gboolean
gdm_display_get_switch_on_finish (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), 0);
return display->priv->switch_on_finish;
}
static GdmDisplayAccessFile *
_create_access_file_for_user (GdmDisplay *display,
const char *username,
......@@ -833,30 +823,6 @@ _gdm_display_set_is_local (GdmDisplay *display,
display->priv->is_local = is_local;
}
static void
_gdm_display_set_switch_on_finish (GdmDisplay *display,
gboolean switch_on_finish)
{
display->priv->switch_on_finish = switch_on_finish;
}
gboolean
gdm_display_set_switch_on_finish (GdmDisplay *display,
gboolean switch_display,
GError **error)
{
gboolean ret = TRUE;
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
g_debug ("GdmDisplay: Setting display to %sswitch to login screen on finish",
switch_display? "" : "not ");
_gdm_display_set_switch_on_finish (display, switch_display);
return ret;
}
static void
_gdm_display_set_slave_command (GdmDisplay *display,
const char *command)
......@@ -900,9 +866,6 @@ gdm_display_set_property (GObject *object,
case PROP_IS_LOCAL:
_gdm_display_set_is_local (self, g_value_get_boolean (value));
break;
case PROP_SWITCH_ON_FINISH:
_gdm_display_set_switch_on_finish (self, g_value_get_boolean (value));
break;
case PROP_SLAVE_COMMAND:
_gdm_display_set_slave_command (self, g_value_get_string (value));
break;
......@@ -951,9 +914,6 @@ gdm_display_get_property (GObject *object,
case PROP_IS_LOCAL:
g_value_set_boolean (value, self->priv->is_local);
break;
case PROP_SWITCH_ON_FINISH:
g_value_set_boolean (value, self->priv->switch_on_finish);
break;
case PROP_SLAVE_COMMAND:
g_value_set_string (value, self->priv->slave_command);
break;
......@@ -1125,14 +1085,6 @@ gdm_display_class_init (GdmDisplayClass *klass)
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_SWITCH_ON_FINISH,
g_param_spec_boolean ("switch-on-finish",
NULL,
NULL,
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_SLAVE_COMMAND,
g_param_spec_string ("slave-command",
......
......@@ -88,7 +88,6 @@ GQuark gdm_display_error_quark (void);
GType gdm_display_get_type (void);
int gdm_display_get_status (GdmDisplay *display);
gboolean gdm_display_get_switch_on_finish (GdmDisplay *display);
time_t gdm_display_get_creation_time (GdmDisplay *display);
char * gdm_display_get_user_auth (GdmDisplay *display);
......@@ -141,9 +140,6 @@ gboolean gdm_display_remove_user_authorization (GdmDisplay *disp
gboolean gdm_display_set_slave_bus_name (GdmDisplay *display,
const char *name,
GError **error);
gboolean gdm_display_set_switch_on_finish (GdmDisplay *display,
gboolean switch_display,
GError **error);
G_END_DECLS
......
......@@ -35,9 +35,6 @@
<method name="SetSlaveBusName">
<arg name="name" direction="in" type="s"/>
</method>
<method name="SetSwitchOnFinish">
<arg name="switch_display" direction="in" type="b"/>
</method>
<method name="GetTimedLoginDetails">
<arg name="enabled" direction="out" type="b"/>
<arg name="username" direction="out" type="s"/>
......
......@@ -64,8 +64,7 @@ static void gdm_local_display_factory_class_init (GdmLocalDisplayFactoryC
static void gdm_local_display_factory_init (GdmLocalDisplayFactory *factory);
static void gdm_local_display_factory_finalize (GObject *object);
static GdmDisplay *create_display (GdmLocalDisplayFactory *factory,
GType type);
static GdmDisplay *create_display (GdmLocalDisplayFactory *factory);
static gpointer local_display_factory_object = NULL;
......@@ -198,7 +197,21 @@ gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *fact
ret = FALSE;
display = create_display (factory, GDM_TYPE_TRANSIENT_DISPLAY);
num = take_next_display_number (factory);
g_debug ("GdmLocalDisplayFactory: Creating transient display %d", num);
display = gdm_transient_display_new (num);
/* FIXME: don't hardcode seat1? */
g_object_set (display, "seat-id", CK_SEAT1_PATH, NULL);
store_display (factory, num, display);
if (! gdm_display_manage (display)) {
display = NULL;
goto out;
}
if (! gdm_display_get_id (display, id, NULL)) {
display = NULL;
......@@ -207,6 +220,9 @@ gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *fact
ret = TRUE;
out:
/* ref either held by store or not at all */
g_object_unref (display);
return ret;
}
......@@ -258,22 +274,13 @@ gdm_local_display_factory_create_product_display (GdmLocalDisplayFactory *factor
}
static void
switch_to_login_session (GdmLocalDisplayFactory *factory)
{
/* FIXME: look for existing login session before starting a new one */
create_display (factory, GDM_TYPE_TRANSIENT_DISPLAY);
}
static void
on_display_status_changed (GdmDisplay *display,
GParamSpec *arg1,
GdmLocalDisplayFactory *factory)
on_static_display_status_changed (GdmDisplay *display,
GParamSpec *arg1,
GdmLocalDisplayFactory *factory)
{
int status;
gboolean switch_on_finish;
GdmDisplayStore *store;
int num;
GType type;
num = -1;
gdm_display_get_x11_display_number (display, &num, NULL);
......@@ -282,8 +289,6 @@ on_display_status_changed (GdmDisplay *display,
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
status = gdm_display_get_status (display);
switch_on_finish = gdm_display_get_switch_on_finish (display);
type = G_OBJECT_TYPE (display);
g_debug ("GdmLocalDisplayFactory: static display status changed: %d", status);
switch (status) {
......@@ -294,12 +299,7 @@ on_display_status_changed (GdmDisplay *display,
gdm_display_store_remove (store, display);
/* reset num failures */
factory->priv->num_failures = 0;
if (switch_on_finish) {
switch_to_login_session (factory);
} else if (type == GDM_TYPE_STATIC_DISPLAY) {
create_display (factory, type);
}
create_display (factory);
break;
case GDM_DISPLAY_FAILED:
/* leave the display number in factory->priv->displays
......@@ -312,7 +312,7 @@ on_display_status_changed (GdmDisplay *display,
/* FIXME: should monitor hardware changes to
try again when seats change */
} else {
create_display (factory, type);
create_display (factory);
}
break;
case GDM_DISPLAY_UNMANAGED:
......@@ -328,26 +328,25 @@ on_display_status_changed (GdmDisplay *display,
}
static GdmDisplay *
create_display (GdmLocalDisplayFactory *factory,
GType type)
create_display (GdmLocalDisplayFactory *factory)
{
GdmDisplay *display;
guint32 num;
num = take_next_display_number (factory);
if (type == GDM_TYPE_STATIC_DISPLAY) {
display = gdm_static_display_new (num);
} else if (type == GDM_TYPE_TRANSIENT_DISPLAY) {
display = gdm_transient_display_new (num);
}
#if 0
display = gdm_static_factory_display_new (num);
#else
display = gdm_static_display_new (num);
#endif
/* FIXME: don't hardcode seat1? */
g_object_set (display, "seat-id", CK_SEAT1_PATH, NULL);
g_signal_connect (display,
"notify::status",
G_CALLBACK (on_display_status_changed),
G_CALLBACK (on_static_display_status_changed),
factory);
store_display (factory, num, display);
......@@ -374,7 +373,7 @@ gdm_local_display_factory_start (GdmDisplayFactory *base_factory)
ret = TRUE;
/* FIXME: use seat configuration */
display = create_display (factory, GDM_TYPE_STATIC_DISPLAY);
display = create_display (factory);
if (display == NULL) {
ret = FALSE;
}
......
......@@ -52,12 +52,6 @@
extern char **environ;
#ifdef WITH_VT_SWITCH_WORKAROUND
#define X_SERVER_COMMAND_LINE X_SERVER " -br -verbose -logverbose 7"
#else
#define X_SERVER_COMMAND_LINE X_SERVER " -br -verbose -logverbose 7 -novtswitch"
#endif
#define GDM_SERVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_SERVER, GdmServerPrivate))
/* These are the servstat values, also used as server
......@@ -933,7 +927,7 @@ gdm_server_init (GdmServer *server)
server->priv = GDM_SERVER_GET_PRIVATE (server);
server->priv->pid = -1;
server->priv->command = g_strdup (X_SERVER_COMMAND_LINE);
server->priv->command = g_strdup (X_SERVER " -br -verbose -logverbose 7");
server->priv->log_dir = g_strdup (LOGDIR);
add_ready_handler (server);
......
......@@ -463,17 +463,12 @@ start_session_timeout (GdmSimpleSlave *slave)
if (migrated) {
destroy_session (slave);
#ifdef WITH_VT_SWITCH_WORKAROUND
/* If the X server doesn't support -novtswitch, then when the
* user logs out from their session later, they're going to get thrown
* back to the VT the greeter is currently running on. We keep the
* greeter alive here, so when that happens the user doesn't see
* a blank VT or some confusing thing.
*/
/* We don't stop the slave here because
when Xorg exits it switches to the VT it was
started from. That interferes with fast
user switching. */
queue_greeter_reset (slave);
#else
gdm_slave_stopped (GDM_SLAVE (slave));
#endif
goto out;
}
......
......@@ -1438,31 +1438,6 @@ session_unlock (GdmSlave *slave,
return TRUE;
}
static void
set_switch_display_on_finish (GdmSlave *slave,
gboolean switch_display)
{
gboolean res;
GError *error;
error = NULL;
res = dbus_g_proxy_call (slave->priv->display_proxy,
"SetSwitchOnFinish",
&error,
G_TYPE_BOOLEAN, switch_display,
G_TYPE_INVALID,
G_TYPE_INVALID);
if (! res) {
if (error != NULL) {
g_warning ("Failed to set respawn on parent display: %s", error->message);
g_error_free (error);
} else {
g_warning ("Failed to set respawn on parent display");
}
}
}
gboolean
gdm_slave_switch_to_user_session (GdmSlave *slave,
const char *username)
......@@ -1493,11 +1468,6 @@ gdm_slave_switch_to_user_session (GdmSlave *slave,
g_debug ("GdmSlave: unable to unlock session: %s", ssid_to_activate);
}
/* Since we're switching to a new display, make sure we don't switch again when
* this display finishes.
*/
set_switch_display_on_finish (slave, FALSE);
ret = TRUE;
out:
......
......@@ -159,7 +159,6 @@ gdm_transient_display_new (int display_number)
object = g_object_new (GDM_TYPE_TRANSIENT_DISPLAY,
"x11-display-number", display_number,
"x11-display-name", x11_display,
"switch-on-finish", TRUE,
NULL);
g_free (x11_display);
......
NULL =
SUBDIRS = \
libgdmgreeter \
simple-greeter \
$(NULL)
......
END_OF_LIST =
BUILT_SOURCES = $(END_OF_LIST)
CLEANFILES = $(END_OF_LIST)
AM_CPPFLAGS = \
-I. \
-I.. \
-DG_LOG_DOMAIN=\"GdmGreeter\" \
$(END_OF_LIST)
lib_LTLIBRARIES = \
libgdmgreeter.la \
$(END_OF_LIST)
libgdmgreeterdir = $(includedir)/gdm/greeter
libgdmgreeter_HEADERS = \
gdm-greeter-client.h \
$(END_OF_LIST)
libgdmgreeter_la_CFLAGS = \
$(LIBGDMGREETER_CFLAGS) \
$(END_OF_LIST)
libgdmgreeter_la_LDFLAGS = \
-export-symbols-regex '^[^_].*' \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-no-undefined \
$(END_OF_LIST)
libgdmgreeter_la_LIBADD = \
$(LIBGDMGREETER_LIBS) \
$(END_OF_LIST)
libgdmgreeter_la_SOURCES = \
$(libgdmgreeter_HEADERS) \
gdm-greeter-client.c \
$(END_OF_LIST)
pkgconfigdir = $(libdir)/pkgconfig
dist_pkgconfig_DATA = gdmgreeter.pc
-include $(INTROSPECTION_MAKEFILE)
if HAVE_INTROSPECTION
girdir = $(datadir)/gir-1.0
gir_DATA = GdmGreeter-1.0.gir
typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = $(gir_DATA:.gir=.typelib)
INTROSPECTION_GIRS = $(gir_DATA)
GdmGreeter-1.0.gir: \
$(INTROSPECTION_SCANNER) \
libgdmgreeter.la \
Makefile \
$(END_OF_LIST)
GdmGreeter_1_0_gir_SCANNERFLAGS = \
--warn-all \
--namespace=GdmGreeter \
--identifier-prefix GdmGreeter \
$(libgdmgreeter_la_CFLAGS) \
$(END_OF_LIST)
GdmGreeter_1_0_gir_INCLUDES = $(LIBGDMGREETER_GIR_INCLUDES)
GdmGreeter_1_0_gir_LIBS = libgdmgreeter.la
GdmGreeter_1_0_gir_FILES = \
$(filter-out %-private.h, $(libgdmgreeter_la_SOURCES)) \
$(BUILT_SOURCES) \
$(END_OF_LIST)
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif
MAINTAINERCLEANFILES = Makefile.in
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __GDM_GREETER_CLIENT_H
#define __GDM_GREETER_CLIENT_H
#include <glib-object.h>
G_BEGIN_DECLS
#define GDM_TYPE_GREETER_CLIENT (gdm_greeter_client_get_type ())
#define GDM_GREETER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_GREETER_CLIENT, GdmGreeterClient))
#define GDM_GREETER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_GREETER_CLIENT, GdmGreeterClientClass))
#define GDM_IS_GREETER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_GREETER_CLIENT))
#define GDM_IS_GREETER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_GREETER_CLIENT))
#define GDM_GREETER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_GREETER_CLIENT, GdmGreeterClientClass))
typedef struct GdmGreeterClientPrivate GdmGreeterClientPrivate;
typedef struct
{
GObject parent;
GdmGreeterClientPrivate *priv;
} GdmGreeterClient;
typedef struct
{
GObjectClass parent_class;
void (* info_query) (GdmGreeterClient *client,
const char *service_name,
const char *query_text);
void (* secret_info_query) (GdmGreeterClient *client,
const char *service_name,
const char *query_text);
void (* info) (GdmGreeterClient *client,
const char *service_name,
const char *info);
void (* problem) (GdmGreeterClient *client,
const char *service_name,
const char *problem);
void (* service_unavailable) (GdmGreeterClient *client,
const char *service_name);
void (* ready) (GdmGreeterClient *client,
const char *service_name);
void (* conversation_stopped) (GdmGreeterClient *client,
const char *service_name);
void (* reset) (GdmGreeterClient *client);
void (* authentication_failed) (GdmGreeterClient *client);
void (* selected_user_changed) (GdmGreeterClient *client,
const char *username);
void (* timed_login_requested) (GdmGreeterClient *client,
const char *username,
int delay);
void (* session_opened) (GdmGreeterClient *client,
const char *service_name);
} GdmGreeterClientClass;
#define GDM_GREETER_CLIENT_ERROR (gdm_greeter_client_error_quark ())
typedef enum _GdmGreeterClientError {
GDM_GREETER_CLIENT_ERROR_GENERIC = 0,
} GdmGreeterClientError;
GType gdm_greeter_client_get_type (void);
GQuark gdm_greeter_client_error_quark (void);
GdmGreeterClient * gdm_greeter_client_new (void);
gboolean gdm_greeter_client_connect (GdmGreeterClient *client,
GError **error);
gboolean gdm_greeter_client_get_display_is_local (GdmGreeterClient *client);
void gdm_greeter_client_call_start_conversation (GdmGreeterClient *client,
const char *service_name);
void gdm_greeter_client_call_begin_auto_login (GdmGreeterClient *client,
const char *username);
void gdm_greeter_client_call_begin_verification (GdmGreeterClient *client,
const char *service_name);
void gdm_greeter_client_call_begin_verification_for_user (GdmGreeterClient *client,
const char *service_name,
const char *username);
void gdm_greeter_client_call_cancel (GdmGreeterClient *client);
void gdm_greeter_client_call_disconnect (GdmGreeterClient *client);
void gdm_greeter_client_call_select_hostname (GdmGreeterClient *client,
const char *text);
void gdm_greeter_client_call_select_user (GdmGreeterClient *client,
const char *text);
void gdm_greeter_client_call_select_language (GdmGreeterClient *client,
const char *text);
void gdm_greeter_client_call_select_session (GdmGreeterClient *client,
const char *text);
void gdm_greeter_client_call_answer_query (GdmGreeterClient *client,
const char *service_name,
const char *text);
void gdm_greeter_client_call_start_session_when_ready (GdmGreeterClient *client,
const char *service_name,
gboolean should_start_session);
G_END_DECLS
#endif /* __GDM_GREETER_CLIENT_H */
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: GDM Greeter Library
Description: Client Library for communicating with GDM greeter server
Version: @VERSION@
Libs: -L${libdir} -lgdmgreeter
Cflags: -I${includedir}/gdm/greeter
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment