user_combobox200Falsecenter12Trueuser_lis"
"tstore1210"
"prompt_entryTrueTrue\342\200\242Enter your username11prompt_entry200TrueTrue12True"
"False\342\200\242FalseFalseEnter your password12TrueTrue0greeter_infobarFalseFalseendFalseFalse-1FalseTrue"
"False[message]TrueTrue0
FalseTrue-1
FalseTrue1buttonbox_frameTrueFalse<"
"property name=\"label_xalign\">0noneTrueFalse242424"
"Cancelcancel_buttonTrueTrueFalseFalseTrue0<"
"/property>Log Inlogin_buttonTrueTrueFalseFalseTrueend1False"
"property>True2"
};
static const unsigned lightdm_gtk_greeter_ui_length = 18801u;
lightdm-gtk-greeter-2.0.1/src/greetermenubar.h 0000664 0001750 0001750 00000001744 12527242647 016273 0000000 0000000 #ifndef GREETER_MENU_BAR_H
#define GREETER_MENU_BAR_H
#include
#include
G_BEGIN_DECLS
#define GREETER_MENU_BAR_TYPE (greeter_menu_bar_get_type())
#define GREETER_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GREETER_MENU_BAR_TYPE, GreeterMenuBar))
#define GREETER_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GREETER_MENU_BAR_TYPE, GreeterMenuBarClass))
#define GREETER_IS_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GREETER_MENU_BAR_TYPE))
#define GREETER_IS_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GREETER_MENU_BAR_TYPE))
typedef struct _GreeterMenuBar GreeterMenuBar;
typedef struct _GreeterMenuBarClass GreeterMenuBarClass;
struct _GreeterMenuBar
{
GtkMenuBar parent_instance;
};
struct _GreeterMenuBarClass
{
GtkMenuBarClass parent_class;
};
GType greeter_menu_bar_get_type(void) G_GNUC_CONST;
GtkWidget *greeter_menu_bar_new(void);
G_END_DECLS
#endif /* GREETER_MENU_BAR_H */
lightdm-gtk-greeter-2.0.1/src/greeterbackground.c 0000664 0001750 0001750 00000165437 12527242647 016766 0000000 0000000
#include
#include
#include
#include
#include
#include
#include
#include "greeterbackground.h"
typedef enum
{
/* Broken/uninitialized configuration */
BACKGROUND_TYPE_INVALID,
/* Do not use this monitor */
BACKGROUND_TYPE_SKIP,
/* Do not override window background */
BACKGROUND_TYPE_DEFAULT,
/* Solid color */
BACKGROUND_TYPE_COLOR,
/* Path to image and scaling mode */
BACKGROUND_TYPE_IMAGE
/* Maybe other types (e.g. gradient) */
} BackgroundType;
static const gchar* BACKGROUND_TYPE_SKIP_VALUE = "#skip";
static const gchar* BACKGROUND_TYPE_DEFAULT_VALUE = "#default";
typedef enum
{
/* It is not really useful, used for debugging */
SCALING_MODE_SOURCE,
/* Default mode for values without mode prefix */
SCALING_MODE_ZOOMED,
SCALING_MODE_STRETCHED
} ScalingMode;
static const gchar* SCALING_MODE_PREFIXES[] = {"#source:", "#zoomed:", "#stretched:", NULL};
typedef gdouble (*TransitionFunction)(gdouble x);
typedef void (*TransitionDraw)(gconstpointer monitor, cairo_t* cr);
/* Background configuration (parsed from background=... option).
Used to fill */
typedef struct
{
BackgroundType type;
union
{
GdkRGBA color;
struct
{
gchar *path;
ScalingMode mode;
} image;
} options;
} BackgroundConfig;
/* Transition configuration
Used as part of and */
typedef struct
{
/* Transition duration, in ms */
glong duration;
TransitionFunction func;
/* Function to draw monitor background */
TransitionDraw draw;
} TransitionConfig;
/* Store monitor configuration */
typedef struct
{
BackgroundConfig bg;
gboolean user_bg;
gboolean laptop;
TransitionConfig transition;
} MonitorConfig;
/* Actual drawing information attached to monitor.
* Used to separate configured monitor background and user background. */
typedef struct
{
gint ref_count;
BackgroundType type;
union
{
GdkPixbuf* image;
GdkRGBA color;
} options;
} Background;
typedef struct
{
GreeterBackground* object;
gint number;
gchar* name;
GdkRectangle geometry;
GtkWindow* window;
gulong window_draw_handler_id;
/* Configured background */
Background* background_configured;
/* Current monitor background: &background_configured or &background_custom
* Monitors with type = BACKGROUND_TYPE_SKIP have background = NULL */
Background* background;
struct
{
TransitionConfig config;
/* Old background, stage == 0.0 */
Background* from;
/* New background, stage == 1.0 */
Background* to;
guint timer_id;
gint64 started;
/* Current stage */
gdouble stage;
} transition;
} Monitor;
static const Monitor INVALID_MONITOR_STRUCT = {0};
struct _GreeterBackground
{
GObject parent_instance;
struct _GreeterBackgroundPrivate* priv;
};
struct _GreeterBackgroundClass
{
GObjectClass parent_class;
};
typedef struct _GreeterBackgroundPrivate GreeterBackgroundPrivate;
struct _GreeterBackgroundPrivate
{
GdkScreen* screen;
gulong screen_monitors_changed_handler_id;
/* Widget to display on active monitor */
GtkWidget* child;
/* List of groups for greeter screens windows */
GSList* accel_groups;
/* Mapping monitor name to its config */
GHashTable* configs;
/* Default config for unlisted monitors */
MonitorConfig* default_config;
/* Array of configured monitors for current screen */
Monitor* monitors;
gsize monitors_size;
/* Name => , "Number" => */
GHashTable* monitors_map;
GList* active_monitors_config;
const Monitor* active_monitor;
/* List of monitors with user-background=true*/
GSList* customized_monitors;
/* List of monitors with laptop=true */
GSList* laptop_monitors;
/* DBus proxy to catch lid state changing */
GDBusProxy* laptop_upower_proxy;
/* Cached lid state */
gboolean laptop_lid_closed;
/* Use cursor position to determinate current active monitor (dynamic) */
gboolean follow_cursor;
/* Use cursor position to determinate initial active monitor */
gboolean follow_cursor_to_init;
};
enum
{
BACKGROUND_SIGNAL_ACTIVE_MONITOR_CHANGED,
BACKGROUND_SIGNAL_LAST
};
static guint background_signals[BACKGROUND_SIGNAL_LAST] = {0};
static const gchar* DBUS_UPOWER_NAME = "org.freedesktop.UPower";
static const gchar* DBUS_UPOWER_PATH = "/org/freedesktop/UPower";
static const gchar* DBUS_UPOWER_INTERFACE = "org.freedesktop.UPower";
static const gchar* DBUS_UPOWER_PROP_LID_IS_PRESENT = "LidIsPresent";
static const gchar* DBUS_UPOWER_PROP_LID_IS_CLOSED = "LidIsClosed";
static const gchar* ACTIVE_MONITOR_CURSOR_TAG = "#cursor";
G_DEFINE_TYPE_WITH_PRIVATE(GreeterBackground, greeter_background, G_TYPE_OBJECT);
void greeter_background_set_active_monitor_config (GreeterBackground* background,
const gchar* value);
void greeter_background_set_monitor_config (GreeterBackground* background,
const gchar* name,
const gchar* bg, /* NULL to use fallback value */
gint user_bg, /* -1 to use fallback value */
gint laptop, /* -1 to use fallback value */
gint transition_duration, /* -1 to use fallback value */
TransitionType transition_type); /* NULL to use fallback value */
void greeter_background_remove_monitor_config (GreeterBackground* background,
const gchar* name);
gchar** greeter_background_get_configured_monitors (GreeterBackground* background);
void greeter_background_connect (GreeterBackground* background,
GdkScreen* screen);
void greeter_background_disconnect (GreeterBackground* background);
static gboolean greeter_background_find_monitor_data(GreeterBackground* background,
GHashTable* table,
const Monitor* monitor,
gpointer* data);
static void greeter_background_set_active_monitor (GreeterBackground* background,
const Monitor* active);
static void greeter_background_get_cursor_position (GreeterBackground* background,
gint* x, gint* y);
static void greeter_background_set_cursor_position (GreeterBackground* background,
gint x, gint y);
static void greeter_background_try_init_dbus (GreeterBackground* background);
static void greeter_background_stop_dbus (GreeterBackground* background);
static gboolean greeter_background_monitor_enabled (GreeterBackground* background,
const Monitor* monitor);
static void greeter_background_dbus_changed_cb (GDBusProxy* proxy,
GVariant* changed_properties,
const gchar* const* invalidated_properties,
GreeterBackground* background);
static void greeter_background_monitors_changed_cb (GdkScreen* screen,
GreeterBackground* background);
static void greeter_background_child_destroyed_cb (GtkWidget* child,
GreeterBackground* background);
/* struct BackgroundConfig */
static gboolean background_config_initialize (BackgroundConfig* config,
const gchar* value);
static void background_config_finalize (BackgroundConfig* config);
static void background_config_copy (const BackgroundConfig* source,
BackgroundConfig* dest);
/* struct MonitorConfig */
static void monitor_config_free (MonitorConfig* config);
/* Copy source config to dest, return dest. Allocate memory if dest == NULL. */
static MonitorConfig* monitor_config_copy (const MonitorConfig* source,
MonitorConfig* dest);
/* struct Background */
static Background* background_new (const BackgroundConfig* config,
const Monitor* monitor,
GHashTable* images_cache);
static Background* background_ref (Background* bg);
static void background_unref (Background** bg);
static void background_finalize (Background* bg);
/* struct Monitor */
static void monitor_finalize (Monitor* info);
static void monitor_set_background (Monitor* monitor,
Background* background);
static void monitor_start_transition (Monitor* monitor,
Background* from,
Background* to);
static void monitor_stop_transition (Monitor* monitor);
static gboolean monitor_transition_cb (GtkWidget *widget,
GdkFrameClock* frame_clock,
Monitor* monitor);
static void monitor_transition_draw_alpha (const Monitor* monitor,
cairo_t* cr);
static void monitor_draw_background (const Monitor* monitor,
const Background* background,
cairo_t* cr);
static gboolean monitor_window_draw_cb (GtkWidget* widget,
cairo_t* cr,
const Monitor* monitor);
static gboolean monitor_window_enter_notify_cb (GtkWidget* widget,
GdkEventCrossing* event,
const Monitor* monitor);
static GdkPixbuf* scale_image_file (const gchar* path,
ScalingMode mode,
gint width, gint height,
GHashTable* cache);
static GdkPixbuf* scale_image (GdkPixbuf* source,
ScalingMode mode,
gint width, gint height);
static cairo_surface_t* create_root_surface (GdkScreen* screen);
static void set_root_pixmap_id (GdkScreen* screen,
Display* display,
Pixmap xpixmap);
static void set_surface_as_root (GdkScreen* screen,
cairo_surface_t* surface);
static gdouble transition_func_linear (gdouble x);
static gdouble transition_func_ease_in_out (gdouble x);
/* Implemented in lightdm-gtk-greeter.c */
gpointer greeter_save_focus(GtkWidget* widget);
void greeter_restore_focus(const gpointer saved_data);
static const MonitorConfig DEFAULT_MONITOR_CONFIG =
{
.bg =
{
.type = BACKGROUND_TYPE_COLOR,
.options =
{
.color = {.red = 0.0, .green = 0.0, .blue = 0.0, .alpha = 1.0}
}
},
.user_bg = TRUE,
.laptop = FALSE,
.transition =
{
.duration = 500,
.func = transition_func_ease_in_out,
.draw = (TransitionDraw)monitor_transition_draw_alpha
}
};
/* Implementation */
static void
greeter_background_class_init(GreeterBackgroundClass* klass)
{
GObjectClass* gobject_class = G_OBJECT_CLASS(klass);
background_signals[BACKGROUND_SIGNAL_ACTIVE_MONITOR_CHANGED] =
g_signal_new("active-monitor-changed",
G_TYPE_FROM_CLASS(gobject_class),
G_SIGNAL_RUN_FIRST,
0, /* class_offset */
NULL /* accumulator */, NULL /* accu_data */,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
static void
greeter_background_init(GreeterBackground* self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, GREETER_BACKGROUND_TYPE, GreeterBackgroundPrivate);
self->priv->screen = NULL;
self->priv->screen_monitors_changed_handler_id = 0;
self->priv->accel_groups = NULL;
self->priv->configs = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)monitor_config_free);
self->priv->default_config = monitor_config_copy(&DEFAULT_MONITOR_CONFIG, NULL);
self->priv->monitors = NULL;
self->priv->monitors_size = 0;
self->priv->monitors_map = NULL;
self->priv->customized_monitors = NULL;
self->priv->active_monitors_config = NULL;
self->priv->active_monitor = NULL;
self->priv->laptop_monitors = NULL;
self->priv->laptop_upower_proxy = NULL;
self->priv->laptop_lid_closed = FALSE;
}
GreeterBackground*
greeter_background_new(GtkWidget* child)
{
g_return_val_if_fail(child != NULL, NULL);
GreeterBackground* background = GREETER_BACKGROUND(g_object_new(greeter_background_get_type(), NULL));
background->priv->child = child;
g_signal_connect(background->priv->child, "destroy", G_CALLBACK(greeter_background_child_destroyed_cb), background);
return background;
}
void
greeter_background_set_active_monitor_config(GreeterBackground* background,
const gchar* value)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
g_list_free_full(priv->active_monitors_config, g_free);
priv->active_monitors_config = NULL;
priv->follow_cursor = FALSE;
priv->follow_cursor_to_init = FALSE;
if(!value || !*value)
return;
gchar** iter;
gchar** values = g_strsplit(value, ";", -1);
for(iter = values; *iter; ++iter)
{
const gchar* value = *iter;
if(g_strcmp0(value, ACTIVE_MONITOR_CURSOR_TAG) == 0)
{
priv->follow_cursor = TRUE;
priv->follow_cursor_to_init = (priv->active_monitors_config == NULL);
}
else
priv->active_monitors_config = g_list_prepend(priv->active_monitors_config, g_strdup(value));
}
g_strfreev(values);
priv->active_monitors_config = g_list_reverse(priv->active_monitors_config);
}
void
greeter_background_set_monitor_config(GreeterBackground* background,
const gchar* name,
const gchar* bg,
gint user_bg,
gint laptop,
gint transition_duration,
TransitionType transition_type)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
MonitorConfig* config = g_new0(MonitorConfig, 1);
const MonitorConfig* FALLBACK = (g_strcmp0(name, GREETER_BACKGROUND_DEFAULT) == 0) ? &DEFAULT_MONITOR_CONFIG : priv->default_config;
if(!background_config_initialize(&config->bg, bg))
background_config_copy(&FALLBACK->bg, &config->bg);
config->user_bg = user_bg >= 0 ? user_bg : FALLBACK->user_bg;
config->laptop = laptop >= 0 ? laptop : FALLBACK->laptop;
config->transition.duration = transition_duration >= 0 ? transition_duration : FALLBACK->transition.duration;
config->transition.draw = FALLBACK->transition.draw;
switch(transition_type)
{
case TRANSITION_TYPE_NONE:
config->transition.func = NULL; break;
case TRANSITION_TYPE_LINEAR:
config->transition.func = transition_func_linear; break;
case TRANSITION_TYPE_EASE_IN_OUT:
config->transition.func = transition_func_ease_in_out; break;
default:
config->transition.func = FALLBACK->transition.func;
}
if(FALLBACK == priv->default_config)
g_hash_table_insert(priv->configs, g_strdup(name), config);
else
{
if(priv->default_config)
monitor_config_free(priv->default_config);
priv->default_config = config;
}
}
void
greeter_background_remove_monitor_config(GreeterBackground* background,
const gchar* name)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
g_hash_table_remove(background->priv->configs, name);
}
gchar**
greeter_background_get_configured_monitors(GreeterBackground* background)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
gint n = g_hash_table_size(priv->configs);
gchar** names = g_new(gchar*, n + 1);
names[n--] = NULL;
gpointer key;
GHashTableIter iter;
g_hash_table_iter_init(&iter, priv->configs);
while(g_hash_table_iter_next(&iter, &key, NULL))
names[n--] = g_strdup(key);
return names;
}
void
greeter_background_connect(GreeterBackground* background,
GdkScreen* screen)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
g_return_if_fail(GDK_IS_SCREEN(screen));
g_debug("[Background] Connecting to screen: %p (%dx%dpx, %dx%dmm)", screen,
gdk_screen_get_width(screen), gdk_screen_get_height(screen),
gdk_screen_get_width_mm(screen), gdk_screen_get_height_mm(screen));
GreeterBackgroundPrivate* priv = background->priv;
gpointer saved_focus = NULL;
if(priv->screen)
{
if (priv->active_monitor)
saved_focus = greeter_save_focus(priv->child);
greeter_background_disconnect(background);
}
priv->screen = screen;
priv->monitors_size = gdk_screen_get_n_monitors(screen);
priv->monitors = g_new0(Monitor, priv->monitors_size);
priv->monitors_map = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
g_debug("[Background] Monitors found: %" G_GSIZE_FORMAT, priv->monitors_size);
/* Used to track situation when all monitors marked as "#skip" */
Monitor* first_not_skipped_monitor = NULL;
GHashTable* images_cache = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
cairo_region_t *screen_region = cairo_region_create();
gint i;
for(i = 0; i < priv->monitors_size; ++i)
{
const MonitorConfig* config;
Monitor* monitor = &priv->monitors[i];
monitor->object = background;
monitor->name = g_strdup(gdk_screen_get_monitor_plug_name(screen, i));
monitor->number = i;
const gchar* printable_name = monitor->name ? monitor->name : "";
gdk_screen_get_monitor_geometry(screen, i, &monitor->geometry);
g_debug("[Background] Monitor: %s #%d (%dx%d at %dx%d)%s", printable_name, i,
monitor->geometry.width, monitor->geometry.height,
monitor->geometry.x, monitor->geometry.y,
(i == gdk_screen_get_primary_monitor(screen)) ? " primary" : "");
if(!greeter_background_find_monitor_data(background, priv->configs, monitor, (gpointer*)&config))
{
g_debug("[Background] No configuration options for monitor %s #%d, using default", printable_name, i);
config = priv->default_config;
}
/* Force last skipped monitor to be active monitor, if there is no other choice */
if(config->bg.type == BACKGROUND_TYPE_SKIP)
{
if(i < priv->monitors_size - 1 || first_not_skipped_monitor)
{
g_debug("[Background] Skipping monitor %s #%d", printable_name, i);
continue;
}
g_debug("[Background] Monitor %s #%d can not be skipped, using default configuration for it", printable_name, i);
if(priv->default_config->bg.type != BACKGROUND_TYPE_SKIP)
config = priv->default_config;
else
config = &DEFAULT_MONITOR_CONFIG;
}
/* Simple check to skip fully overlapped monitors.
Actually, it's can track only monitors in "mirrors" mode. Nothing more. */
if(cairo_region_contains_rectangle(screen_region, &monitor->geometry) == CAIRO_REGION_OVERLAP_IN)
{
g_debug("[Background] Skipping monitor %s #%d, its area is already used by other monitors", printable_name, i);
continue;
}
cairo_region_union_rectangle(screen_region, &monitor->geometry);
if(!first_not_skipped_monitor)
first_not_skipped_monitor = monitor;
monitor->window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
gtk_window_set_type_hint(monitor->window, GDK_WINDOW_TYPE_HINT_DESKTOP);
gtk_window_set_keep_below(monitor->window, TRUE);
gtk_window_set_resizable(monitor->window, FALSE);
gtk_widget_set_app_paintable(GTK_WIDGET(monitor->window), TRUE);
gtk_window_set_screen(monitor->window, screen);
gtk_widget_set_size_request(GTK_WIDGET(monitor->window), monitor->geometry.width, monitor->geometry.height);
gtk_window_move(monitor->window, monitor->geometry.x, monitor->geometry.y);
gtk_widget_show(GTK_WIDGET(monitor->window));
monitor->window_draw_handler_id = g_signal_connect(G_OBJECT(monitor->window), "draw",
G_CALLBACK(monitor_window_draw_cb),
monitor);
gchar* window_name = monitor->name ? g_strdup_printf("monitor-%s", monitor->name) : g_strdup_printf("monitor-%d", i);
gtk_widget_set_name(GTK_WIDGET(monitor->window), window_name);
gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(monitor->window)), "lightdm-gtk-greeter");
g_free(window_name);
GSList* item;
for(item = priv->accel_groups; item != NULL; item = g_slist_next(item))
gtk_window_add_accel_group(monitor->window, item->data);
g_signal_connect(G_OBJECT(monitor->window), "enter-notify-event",
G_CALLBACK(monitor_window_enter_notify_cb), monitor);
if(config->user_bg)
priv->customized_monitors = g_slist_prepend(priv->customized_monitors, monitor);
if(config->laptop)
priv->laptop_monitors = g_slist_prepend(priv->laptop_monitors, monitor);
monitor->background_configured = background_new(&config->bg, monitor, images_cache);
if(!monitor->background_configured)
monitor->background_configured = background_new(&DEFAULT_MONITOR_CONFIG.bg, monitor, images_cache);
monitor_set_background(monitor, monitor->background_configured);
if(config->transition.duration && config->transition.func)
monitor->transition.config = config->transition;
if(monitor->name)
g_hash_table_insert(priv->monitors_map, g_strdup(monitor->name), monitor);
g_hash_table_insert(priv->monitors_map, g_strdup_printf("%d", i), monitor);
}
g_hash_table_unref(images_cache);
if(priv->laptop_monitors && !priv->laptop_upower_proxy)
greeter_background_try_init_dbus(background);
else if(!priv->laptop_monitors)
greeter_background_stop_dbus(background);
if(priv->follow_cursor_to_init)
{
gint x, y;
greeter_background_get_cursor_position(background, &x, &y);
for(i = 0; i < priv->monitors_size && !priv->active_monitor; ++i)
{
const Monitor* monitor = &priv->monitors[i];
if(greeter_background_monitor_enabled(background, monitor) &&
x >= monitor->geometry.x && x < monitor->geometry.x + monitor->geometry.width &&
y >= monitor->geometry.y && y < monitor->geometry.y + monitor->geometry.height)
{
g_debug("[Background] Pointer position will be used to set active monitor: %dx%d", x, y);
greeter_background_set_active_monitor(background, monitor);
break;
}
}
}
if(!priv->active_monitor)
greeter_background_set_active_monitor(background, NULL);
if(saved_focus)
{
greeter_restore_focus(saved_focus);
g_free(saved_focus);
}
priv->screen_monitors_changed_handler_id = g_signal_connect(G_OBJECT(screen), "monitors-changed",
G_CALLBACK(greeter_background_monitors_changed_cb),
background);
}
void
greeter_background_disconnect(GreeterBackground* background)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
if(priv->screen_monitors_changed_handler_id)
g_signal_handler_disconnect(priv->screen, priv->screen_monitors_changed_handler_id);
priv->screen_monitors_changed_handler_id = 0;
priv->screen = NULL;
priv->active_monitor = NULL;
gint i;
for(i = 0; i < priv->monitors_size; ++i)
monitor_finalize(&priv->monitors[i]);
g_free(priv->monitors);
priv->monitors = NULL;
priv->monitors_size = 0;
g_hash_table_unref(priv->monitors_map);
priv->monitors_map = NULL;
g_slist_free(priv->customized_monitors);
priv->customized_monitors = NULL;
g_slist_free(priv->laptop_monitors);
priv->laptop_monitors = NULL;
}
/* Moved to separate function to simplify needless and unnecessary syntax expansion in future (regex) */
static gboolean
greeter_background_find_monitor_data(GreeterBackground* background,
GHashTable* table,
const Monitor* monitor,
gpointer* data)
{
if(!monitor->name || !g_hash_table_lookup_extended(table, monitor->name, NULL, data))
{
gchar* num_str = g_strdup_printf("%d", monitor->number);
gboolean result = g_hash_table_lookup_extended(table, num_str, NULL, data);
g_free(num_str);
return result;
}
return TRUE;
}
static void
greeter_background_set_active_monitor(GreeterBackground* background,
const Monitor* active)
{
GreeterBackgroundPrivate* priv = background->priv;
if(active && !active->background)
{
if(priv->active_monitor)
return;
active = NULL;
}
/* Auto */
if(!active)
{
/* Normal way: at least one configured active monitor is not disabled */
GList* iter;
for(iter = priv->active_monitors_config; iter && !active; iter = g_list_next(iter))
{
const Monitor* monitor = g_hash_table_lookup(priv->monitors_map, iter->data);
if(monitor && monitor->background && greeter_background_monitor_enabled(background, monitor))
active = monitor;
if(active)
g_debug("[Background] Active monitor is not specified, using first enabled monitor from 'active-monitor' list");
}
/* All monitors listed in active-monitor-config are disabled (or option is empty) */
/* Using primary monitor */
if(!active)
{
gint num = gdk_screen_get_primary_monitor(priv->screen);
g_return_if_fail(num < priv->monitors_size);
active = &priv->monitors[num];
if(!active->background || !greeter_background_monitor_enabled(background, active))
active = NULL;
if(active)
g_debug("[Background] Active monitor is not specified, using primary monitor");
}
/* Fallback: first enabled and/or not skipped monitor (screen always have one) */
if(!active)
{
gint i;
const Monitor* first_not_skipped = NULL;
for(i = 0; i < priv->monitors_size && !active; ++i)
{
const Monitor* monitor = &priv->monitors[i];
if(!monitor->background)
continue;
if(greeter_background_monitor_enabled(background, monitor))
active = monitor;
if(!first_not_skipped)
first_not_skipped = active;
}
if(!active)
active = first_not_skipped;
if(active)
g_debug("[Background] Active monitor is not specified, using first enabled monitor");
}
if(!active && priv->laptop_monitors)
{
active = priv->laptop_monitors->data;
g_debug("[Background] Active monitor is not specified, using laptop monitor");
}
}
if(!active)
{
if(priv->active_monitor)
g_warning("[Background] Active monitor is not specified, failed to identify. Active monitor stays the same: %s #%d",
priv->active_monitor->name, priv->active_monitor->number);
else
g_warning("[Background] Active monitor is not specified, failed to identify. Active monitor stays the same: ");
return;
}
if(active == priv->active_monitor)
return;
priv->active_monitor = active;
g_return_if_fail(priv->active_monitor != NULL);
if(priv->child)
{
GtkWidget* old_parent = gtk_widget_get_parent(priv->child);
gpointer focus = greeter_save_focus(priv->child);
if(old_parent)
gtk_widget_reparent(priv->child, GTK_WIDGET(active->window));
else
gtk_container_add(GTK_CONTAINER(active->window), priv->child);
gtk_window_present(active->window);
greeter_restore_focus(focus);
g_free(focus);
}
else
g_warning("[Background] Child widget is destroyed or not defined");
g_debug("[Background] Active monitor changed to: %s #%d", active->name, active->number);
g_signal_emit(background, background_signals[BACKGROUND_SIGNAL_ACTIVE_MONITOR_CHANGED], 0);
gint x, y;
greeter_background_get_cursor_position(background, &x, &y);
/* Do not center cursor if it is already inside active monitor */
if(x < active->geometry.x || x >= active->geometry.x + active->geometry.width ||
y < active->geometry.y || y >= active->geometry.y + active->geometry.height)
greeter_background_set_cursor_position(background,
active->geometry.x + active->geometry.width/2,
active->geometry.y + active->geometry.height/2);
}
static void
greeter_background_get_cursor_position(GreeterBackground* background,
gint* x, gint* y)
{
GreeterBackgroundPrivate* priv = background->priv;
GdkDisplay* display = gdk_screen_get_display(priv->screen);
GdkDeviceManager* device_manager = gdk_display_get_device_manager(display);
GdkDevice* device = gdk_device_manager_get_client_pointer(device_manager);
gdk_device_get_position(device, NULL, x, y);
}
static void
greeter_background_set_cursor_position(GreeterBackground* background,
gint x, gint y)
{
GreeterBackgroundPrivate* priv = background->priv;
GdkDisplay* display = gdk_screen_get_display(priv->screen);
GdkDeviceManager* device_manager = gdk_display_get_device_manager(display);
gdk_device_warp(gdk_device_manager_get_client_pointer(device_manager), priv->screen, x, y);
}
static void
greeter_background_try_init_dbus(GreeterBackground* background)
{
g_debug("[Background] Creating DBus proxy");
GError* error = NULL;
GreeterBackgroundPrivate* priv = background->priv;
if(priv->laptop_upower_proxy)
greeter_background_stop_dbus(background);
priv->laptop_upower_proxy = g_dbus_proxy_new_for_bus_sync(
G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
NULL, /* interface info */
DBUS_UPOWER_NAME,
DBUS_UPOWER_PATH,
DBUS_UPOWER_INTERFACE,
NULL, /* cancellable */
&error);
if(!priv->laptop_upower_proxy)
{
if(error)
g_warning("[Background] Failed to create dbus proxy: %s", error->message);
g_clear_error(&error);
return;
}
GVariant* variant = g_dbus_proxy_get_cached_property(priv->laptop_upower_proxy, DBUS_UPOWER_PROP_LID_IS_PRESENT);
gboolean lid_present = g_variant_get_boolean(variant);
g_variant_unref(variant);
g_debug("[Background] UPower.%s property value: %d", DBUS_UPOWER_PROP_LID_IS_PRESENT, lid_present);
if(!lid_present)
greeter_background_stop_dbus(background);
else
{
variant = g_dbus_proxy_get_cached_property(priv->laptop_upower_proxy, DBUS_UPOWER_PROP_LID_IS_CLOSED);
priv->laptop_lid_closed = g_variant_get_boolean(variant);
g_variant_unref(variant);
g_signal_connect(priv->laptop_upower_proxy, "g-properties-changed",
G_CALLBACK(greeter_background_dbus_changed_cb), background);
}
}
static void
greeter_background_stop_dbus(GreeterBackground* background)
{
if(!background->priv->laptop_upower_proxy)
return;
g_clear_object(&background->priv->laptop_upower_proxy);
}
static gboolean
greeter_background_monitor_enabled(GreeterBackground* background,
const Monitor* monitor)
{
GreeterBackgroundPrivate* priv = background->priv;
if(priv->laptop_upower_proxy && g_slist_find(priv->laptop_monitors, monitor))
return !priv->laptop_lid_closed;
return TRUE;
}
static void
greeter_background_dbus_changed_cb(GDBusProxy* proxy,
GVariant* changed_properties,
const gchar* const* invalidated_properties,
GreeterBackground* background)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
GVariant* variant = g_dbus_proxy_get_cached_property(priv->laptop_upower_proxy, DBUS_UPOWER_PROP_LID_IS_CLOSED);
gboolean new_state = g_variant_get_boolean(variant);
g_variant_unref(variant);
if(new_state == priv->laptop_lid_closed)
return;
priv->laptop_lid_closed = new_state;
g_debug("[Background] UPower: lid state changed to '%s'", priv->laptop_lid_closed ? "closed" : "opened");
if(priv->laptop_monitors)
{
if(priv->laptop_lid_closed)
{
if(g_slist_find(priv->laptop_monitors, priv->active_monitor))
greeter_background_set_active_monitor(background, NULL);
}
else
{
if(!priv->follow_cursor)
greeter_background_set_active_monitor(background, NULL);
}
}
}
static void
greeter_background_monitors_changed_cb(GdkScreen* screen,
GreeterBackground* background)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
greeter_background_connect(background, screen);
}
static void
greeter_background_child_destroyed_cb(GtkWidget* child,
GreeterBackground* background)
{
background->priv->child = NULL;
}
void
greeter_background_set_custom_background(GreeterBackground* background,
const gchar* value)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
if(!priv->customized_monitors)
return;
BackgroundConfig config;
background_config_initialize(&config, value);
GHashTable *images_cache = NULL;
if(config.type == BACKGROUND_TYPE_IMAGE)
images_cache = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref);
GSList* iter;
for(iter = priv->customized_monitors; iter; iter = g_slist_next(iter))
{
Monitor *monitor = iter->data;
/* Old background_custom (if used) will be unrefed in monitor_set_background() */
Background* bg = NULL;
if(config.type != BACKGROUND_TYPE_INVALID)
bg = background_new(&config, monitor, images_cache);
if(bg)
{
monitor_set_background(monitor, bg);
background_unref(&bg);
}
else
monitor_set_background(monitor, monitor->background_configured);
}
if(images_cache)
g_hash_table_unref(images_cache);
if(config.type != BACKGROUND_TYPE_INVALID)
background_config_finalize(&config);
}
void
greeter_background_save_xroot(GreeterBackground* background)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
cairo_surface_t* surface = create_root_surface(priv->screen);
cairo_t* cr = cairo_create(surface);
gsize i;
gdouble child_opacity;
const GdkRGBA ROOT_COLOR = {1.0, 1.0, 1.0, 1.0};
gdk_cairo_set_source_rgba(cr, &ROOT_COLOR);
cairo_paint(cr);
for(i = 0; i < priv->monitors_size; ++i)
{
const Monitor* monitor = &priv->monitors[i];
if(!monitor->background)
continue;
#ifdef XROOT_DRAW_BACKGROUND_DIRECTLY
/* Old method: can't draw default GtkWindow background */
cairo_save(cr);
cairo_translate(cr, monitor->geometry.x, monitor->geometry.y);
monitor_draw_background(monitor, monitor->background, cr);
cairo_restore(cr);
#else
/* New - can draw anything, but looks tricky a bit */
child_opacity = gtk_widget_get_opacity(priv->child);
if(monitor == priv->active_monitor)
{
gtk_widget_set_opacity(priv->child, 0.0);
gdk_window_process_updates(gtk_widget_get_window(GTK_WIDGET(priv->child)), FALSE);
}
gdk_cairo_set_source_window(cr, gtk_widget_get_window(GTK_WIDGET(monitor->window)),
monitor->geometry.x, monitor->geometry.y);
cairo_paint(cr);
if(monitor == priv->active_monitor)
{
gtk_widget_set_opacity(priv->child, child_opacity);
gdk_window_process_updates(gtk_widget_get_window(GTK_WIDGET(priv->child)), FALSE);
}
#endif
}
set_surface_as_root(priv->screen, surface);
cairo_destroy(cr);
cairo_surface_destroy(surface);
}
const GdkRectangle*
greeter_background_get_active_monitor_geometry(GreeterBackground* background)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
GreeterBackgroundPrivate* priv = background->priv;
return priv->active_monitor ? &priv->active_monitor->geometry : NULL;
}
void
greeter_background_add_accel_group(GreeterBackground* background,
GtkAccelGroup* group)
{
g_return_if_fail(GREETER_IS_BACKGROUND(background));
g_return_if_fail(group != NULL);
GreeterBackgroundPrivate* priv = background->priv;
if(priv->monitors)
{
gint i;
for(i = 0; i < priv->monitors_size; ++i)
if(priv->monitors[i].window)
gtk_window_add_accel_group(priv->monitors[i].window, group);
}
priv->accel_groups = g_slist_append(priv->accel_groups, group);
}
static gboolean
background_config_initialize(BackgroundConfig* config,
const gchar* value)
{
config->type = BACKGROUND_TYPE_INVALID;
if(!value || strlen(value) == 0)
return FALSE;
if(g_strcmp0(value, BACKGROUND_TYPE_SKIP_VALUE) == 0)
config->type = BACKGROUND_TYPE_SKIP;
else if(g_strcmp0(value, BACKGROUND_TYPE_DEFAULT_VALUE) == 0)
config->type = BACKGROUND_TYPE_DEFAULT;
else if(gdk_rgba_parse(&config->options.color, value))
config->type = BACKGROUND_TYPE_COLOR;
else
{
const gchar** prefix = SCALING_MODE_PREFIXES;
while(*prefix && !g_str_has_prefix(value, *prefix))
++prefix;
if(*prefix)
{
config->options.image.mode = (ScalingMode)(prefix - SCALING_MODE_PREFIXES);
value += strlen(*prefix);
}
else
config->options.image.mode = SCALING_MODE_ZOOMED;
config->options.image.path = g_strdup(value);
config->type = BACKGROUND_TYPE_IMAGE;
}
return TRUE;
}
static void
background_config_finalize(BackgroundConfig* config)
{
switch(config->type)
{
case BACKGROUND_TYPE_IMAGE:
g_free(config->options.image.path);
break;
case BACKGROUND_TYPE_COLOR:
case BACKGROUND_TYPE_DEFAULT:
case BACKGROUND_TYPE_SKIP:
break;
case BACKGROUND_TYPE_INVALID:
g_return_if_reached();
}
config->type = BACKGROUND_TYPE_INVALID;
}
static void
background_config_copy(const BackgroundConfig* source,
BackgroundConfig* dest)
{
*dest = *source;
switch(dest->type)
{
case BACKGROUND_TYPE_IMAGE:
dest->options.image.path = g_strdup(source->options.image.path);
break;
case BACKGROUND_TYPE_COLOR:
case BACKGROUND_TYPE_DEFAULT:
case BACKGROUND_TYPE_SKIP:
break;
case BACKGROUND_TYPE_INVALID:
g_return_if_reached();
}
}
static void
monitor_config_free(MonitorConfig* config)
{
background_config_finalize(&config->bg);
g_free(config);
}
static MonitorConfig* monitor_config_copy(const MonitorConfig* source,
MonitorConfig* dest)
{
if(!dest)
dest = g_new0(MonitorConfig, 1);
background_config_copy(&source->bg, &dest->bg);
dest->user_bg = source->user_bg;
dest->laptop = source->laptop;
dest->transition = source->transition;
return dest;
}
static Background*
background_new(const BackgroundConfig* config,
const Monitor* monitor,
GHashTable* images_cache)
{
Background bg = {0};
switch(config->type)
{
case BACKGROUND_TYPE_IMAGE:
bg.options.image = scale_image_file(config->options.image.path, config->options.image.mode,
monitor->geometry.width, monitor->geometry.height,
images_cache);
if(!bg.options.image)
{
g_warning("[Background] Failed to read wallpaper: %s", config->options.image.path);
return NULL;
}
break;
case BACKGROUND_TYPE_COLOR:
bg.options.color = config->options.color;
break;
case BACKGROUND_TYPE_DEFAULT:
break;
case BACKGROUND_TYPE_SKIP:
case BACKGROUND_TYPE_INVALID:
g_return_val_if_reached(NULL);
}
bg.type = config->type;
bg.ref_count = 1;
Background* result = g_new(Background, 1);
*result = bg;
return result;
}
static Background*
background_ref(Background* bg)
{
bg->ref_count++;
return bg;
}
static void
background_unref(Background** bg)
{
if(!*bg)
return;
(*bg)->ref_count--;
if((*bg)->ref_count == 0)
{
background_finalize(*bg);
*bg = NULL;
}
}
static void
background_finalize(Background* bg)
{
switch(bg->type)
{
case BACKGROUND_TYPE_IMAGE:
g_clear_object(&bg->options.image);
break;
case BACKGROUND_TYPE_COLOR:
case BACKGROUND_TYPE_DEFAULT:
break;
case BACKGROUND_TYPE_SKIP:
case BACKGROUND_TYPE_INVALID:
g_return_if_reached();
}
bg->type = BACKGROUND_TYPE_INVALID;
}
static void
monitor_set_background(Monitor* monitor,
Background* background)
{
if(monitor->background == background)
return;
monitor_stop_transition(monitor);
switch(background->type)
{
case BACKGROUND_TYPE_IMAGE:
case BACKGROUND_TYPE_COLOR:
gtk_widget_set_app_paintable(GTK_WIDGET(monitor->window), TRUE);
if(monitor->transition.config.duration > 0 && monitor->background &&
monitor->background->type != BACKGROUND_TYPE_DEFAULT)
monitor_start_transition(monitor, monitor->background, background);
break;
case BACKGROUND_TYPE_DEFAULT:
gtk_widget_set_app_paintable(GTK_WIDGET(monitor->window), FALSE);
break;
case BACKGROUND_TYPE_SKIP:
case BACKGROUND_TYPE_INVALID:
g_return_val_if_reached(NULL);
}
background_unref(&monitor->background);
monitor->background = background_ref(background);
gtk_widget_queue_draw(GTK_WIDGET(monitor->window));
}
static void
monitor_start_transition(Monitor* monitor,
Background* from,
Background* to)
{
monitor_stop_transition(monitor);
monitor->transition.from = background_ref(from);
monitor->transition.to = background_ref(to);
monitor->transition.started = g_get_monotonic_time();
monitor->transition.timer_id = gtk_widget_add_tick_callback(GTK_WIDGET(monitor->window),
(GtkTickCallback)monitor_transition_cb,
monitor,
NULL);
monitor->transition.stage = 0;
}
static void
monitor_stop_transition(Monitor* monitor)
{
if(!monitor->transition.timer_id)
return;
gtk_widget_remove_tick_callback(GTK_WIDGET(monitor->window), monitor->transition.timer_id);
monitor->transition.timer_id = 0;
monitor->transition.started = 0;
monitor->transition.stage = 0;
background_unref(&monitor->transition.to);
background_unref(&monitor->transition.from);
}
static gboolean
monitor_transition_cb(GtkWidget *widget,
GdkFrameClock* frame_clock,
Monitor* monitor)
{
if(!monitor->transition.timer_id)
return G_SOURCE_REMOVE;
gint64 span = g_get_monotonic_time() - monitor->transition.started;
gdouble x = CLAMP(span/monitor->transition.config.duration/1000.0, 0.0, 1.0);
monitor->transition.stage = monitor->transition.config.func(x);
if(x >= 1.0)
monitor_stop_transition(monitor);
gtk_widget_queue_draw(GTK_WIDGET(monitor->window));
return x >= 1.0 ? G_SOURCE_REMOVE : G_SOURCE_CONTINUE;
}
static void
monitor_transition_draw_alpha(const Monitor* monitor,
cairo_t* cr)
{
monitor_draw_background(monitor, monitor->transition.from, cr);
cairo_push_group(cr);
monitor_draw_background(monitor, monitor->transition.to, cr);
cairo_pop_group_to_source(cr);
cairo_pattern_t* alpha_pattern = cairo_pattern_create_rgba(0.0, 0.0, 0.0, monitor->transition.stage);
cairo_mask(cr, alpha_pattern);
cairo_pattern_destroy(alpha_pattern);
}
static void
monitor_finalize(Monitor* monitor)
{
if(monitor->transition.config.duration)
{
monitor_stop_transition(monitor);
if(monitor->transition.timer_id)
g_source_remove(monitor->transition.timer_id);
monitor->transition.config.duration = 0;
}
if(monitor->window_draw_handler_id)
g_signal_handler_disconnect(monitor->window, monitor->window_draw_handler_id);
background_unref(&monitor->background_configured);
background_unref(&monitor->background);
if(monitor->window)
{
GtkWidget* child = gtk_bin_get_child(GTK_BIN(monitor->window));
if(child) /* remove greeter widget to avoid "destroy" signal */
gtk_container_remove(GTK_CONTAINER(monitor->window), child);
gtk_widget_destroy(GTK_WIDGET(monitor->window));
}
g_free(monitor->name);
*monitor = INVALID_MONITOR_STRUCT;
}
static void
monitor_draw_background(const Monitor* monitor,
const Background* background,
cairo_t* cr)
{
g_return_if_fail(monitor != NULL);
g_return_if_fail(background != NULL);
switch(background->type)
{
case BACKGROUND_TYPE_IMAGE:
if(background->options.image)
{
gdk_cairo_set_source_pixbuf(cr, background->options.image, 0, 0);
cairo_paint(cr);
}
break;
case BACKGROUND_TYPE_COLOR:
cairo_rectangle(cr, 0, 0, monitor->geometry.width, monitor->geometry.height);
gdk_cairo_set_source_rgba(cr, &background->options.color);
cairo_fill(cr);
break;
case BACKGROUND_TYPE_DEFAULT:
break;
case BACKGROUND_TYPE_SKIP:
case BACKGROUND_TYPE_INVALID:
g_return_if_reached();
}
}
static gboolean
monitor_window_draw_cb(GtkWidget* widget,
cairo_t* cr,
const Monitor* monitor)
{
if(!monitor->background)
return FALSE;
if(monitor->transition.started)
monitor->transition.config.draw(monitor, cr);
else
monitor_draw_background(monitor, monitor->background, cr);
return FALSE;
}
static gboolean
monitor_window_enter_notify_cb(GtkWidget* widget,
GdkEventCrossing* event,
const Monitor* monitor)
{
if(monitor->object->priv->active_monitor == monitor)
{
GdkWindow *gdkwindow = gtk_widget_get_window (widget);
Window window = GDK_WINDOW_XID (gdkwindow);
Display *display = GDK_WINDOW_XDISPLAY (gdkwindow);
static Atom wm_protocols = None;
static Atom wm_take_focus = None;
if (!wm_protocols)
wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False);
if (!wm_take_focus)
wm_take_focus = XInternAtom(display, "WM_TAKE_FOCUS", False);
XEvent ev = {0};
ev.xclient.type = ClientMessage;
ev.xclient.window = window;
ev.xclient.message_type = wm_protocols;
ev.xclient.format = 32;
ev.xclient.data.l[0] = wm_take_focus;
ev.xclient.data.l[1] = CurrentTime;
XSendEvent(display, window, False, 0L, &ev);
}
else if(monitor->object->priv->follow_cursor && greeter_background_monitor_enabled(monitor->object, monitor))
greeter_background_set_active_monitor(monitor->object, monitor);
return FALSE;
}
static GdkPixbuf*
scale_image_file(const gchar* path,
ScalingMode mode,
gint width, gint height,
GHashTable* cache)
{
gchar* key = NULL;
GdkPixbuf* pixbuf = NULL;
if(cache)
{
key = g_strdup_printf("%s\n%d %dx%d", path, mode, width, height);
if(g_hash_table_lookup_extended(cache, key, NULL, (gpointer*)&pixbuf))
{
g_free(key);
return GDK_PIXBUF(g_object_ref(pixbuf));
}
}
if(!cache || !g_hash_table_lookup_extended(cache, path, NULL, (gpointer*)&pixbuf))
{
GError *error = NULL;
pixbuf = gdk_pixbuf_new_from_file(path, &error);
if(error)
{
g_warning("[Background] Failed to load background: %s", error->message);
g_clear_error(&error);
}
else if(cache)
g_hash_table_insert(cache, g_strdup(path), g_object_ref(pixbuf));
}
else
pixbuf = g_object_ref(pixbuf);
if(pixbuf)
{
GdkPixbuf* scaled = scale_image(pixbuf, mode, width, height);
if(cache)
g_hash_table_insert(cache, g_strdup(key), g_object_ref(scaled));
g_object_unref(pixbuf);
pixbuf = scaled;
}
g_free(key);
return pixbuf;
}
static GdkPixbuf*
scale_image(GdkPixbuf* source,
ScalingMode mode,
gint width, gint height)
{
if(mode == SCALING_MODE_ZOOMED)
{
gint offset_x = 0;
gint offset_y = 0;
gint p_width = gdk_pixbuf_get_width(source);
gint p_height = gdk_pixbuf_get_height(source);
gdouble scale_x = (gdouble)width / p_width;
gdouble scale_y = (gdouble)height / p_height;
if(scale_x < scale_y)
{
scale_x = scale_y;
offset_x = (width - (p_width * scale_x)) / 2;
}
else
{
scale_y = scale_x;
offset_y = (height - (p_height * scale_y)) / 2;
}
GdkPixbuf *pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE,
gdk_pixbuf_get_bits_per_sample (source),
width, height);
gdk_pixbuf_composite(source, pixbuf, 0, 0, width, height,
offset_x, offset_y, scale_x, scale_y, GDK_INTERP_BILINEAR, 0xFF);
return pixbuf;
}
else if(mode == SCALING_MODE_STRETCHED)
{
return gdk_pixbuf_scale_simple(source, width, height, GDK_INTERP_BILINEAR);
}
return GDK_PIXBUF(g_object_ref(source));
}
/* The following code for setting a RetainPermanent background pixmap was taken
originally from Gnome, with some fixes from MATE. see:
https://github.com/mate-desktop/mate-desktop/blob/master/libmate-desktop/mate-bg.c */
static cairo_surface_t*
create_root_surface(GdkScreen* screen)
{
gint number, width, height;
Display *display;
Pixmap pixmap;
cairo_surface_t *surface;
number = gdk_screen_get_number (screen);
width = gdk_screen_get_width (screen);
height = gdk_screen_get_height (screen);
/* Open a new connection so with Retain Permanent so the pixmap remains when the greeter quits */
gdk_flush ();
display = XOpenDisplay (gdk_display_get_name (gdk_screen_get_display (screen)));
if (!display)
{
g_warning("[Background] Failed to create root pixmap");
return NULL;
}
XSetCloseDownMode (display, RetainPermanent);
pixmap = XCreatePixmap (display, RootWindow (display, number), width, height, DefaultDepth (display, number));
XCloseDisplay (display);
/* Convert into a Cairo surface */
surface = cairo_xlib_surface_create (GDK_SCREEN_XDISPLAY (screen),
pixmap,
GDK_VISUAL_XVISUAL (gdk_screen_get_system_visual (screen)),
width, height);
return surface;
}
/* Sets the "ESETROOT_PMAP_ID" property to later be used to free the pixmap */
static void
set_root_pixmap_id(GdkScreen* screen,
Display* display,
Pixmap xpixmap)
{
Window xroot = RootWindow (display, gdk_screen_get_number (screen));
char *atom_names[] = {"_XROOTPMAP_ID", "ESETROOT_PMAP_ID"};
Atom atoms[G_N_ELEMENTS(atom_names)] = {0};
Atom type;
int format;
unsigned long nitems, after;
unsigned char *data_root, *data_esetroot;
/* Get atoms for both properties in an array, only if they exist.
* This method is to avoid multiple round-trips to Xserver
*/
if (XInternAtoms (display, atom_names, G_N_ELEMENTS(atom_names), True, atoms) &&
atoms[0] != None && atoms[1] != None)
{
XGetWindowProperty (display, xroot, atoms[0], 0L, 1L, False, AnyPropertyType,
&type, &format, &nitems, &after, &data_root);
if (data_root && type == XA_PIXMAP && format == 32 && nitems == 1)
{
XGetWindowProperty (display, xroot, atoms[1], 0L, 1L, False, AnyPropertyType,
&type, &format, &nitems, &after, &data_esetroot);
if (data_esetroot && type == XA_PIXMAP && format == 32 && nitems == 1)
{
Pixmap xrootpmap = *((Pixmap *) data_root);
Pixmap esetrootpmap = *((Pixmap *) data_esetroot);
XFree (data_root);
XFree (data_esetroot);
gdk_error_trap_push ();
if (xrootpmap && xrootpmap == esetrootpmap) {
XKillClient (display, xrootpmap);
}
if (esetrootpmap && esetrootpmap != xrootpmap) {
XKillClient (display, esetrootpmap);
}
XSync (display, False);
gdk_error_trap_pop_ignored ();
}
}
}
/* Get atoms for both properties in an array, create them if needed.
* This method is to avoid multiple round-trips to Xserver
*/
if (!XInternAtoms (display, atom_names, G_N_ELEMENTS(atom_names), False, atoms) ||
atoms[0] == None || atoms[1] == None) {
g_warning("[Background] Could not create atoms needed to set root pixmap id/properties.\n");
return;
}
/* Set new _XROOTMAP_ID and ESETROOT_PMAP_ID properties */
XChangeProperty (display, xroot, atoms[0], XA_PIXMAP, 32,
PropModeReplace, (unsigned char *) &xpixmap, 1);
XChangeProperty (display, xroot, atoms[1], XA_PIXMAP, 32,
PropModeReplace, (unsigned char *) &xpixmap, 1);
}
/**
* set_surface_as_root:
* @screen: the #GdkScreen to change root background on
* @surface: the #cairo_surface_t to set root background from.
* Must be an xlib surface backing a pixmap.
*
* Set the root pixmap, and properties pointing to it. We
* do this atomically with a server grab to make sure that
* we won't leak the pixmap if somebody else it setting
* it at the same time. (This assumes that they follow the
* same conventions we do). @surface should come from a call
* to create_root_surface().
**/
static void
set_surface_as_root(GdkScreen* screen,
cairo_surface_t* surface)
{
g_return_if_fail(cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_XLIB);
/* Desktop background pixmap should be created from dummy X client since most
* applications will try to kill it with XKillClient later when changing pixmap
*/
Display *display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
Pixmap pixmap_id = cairo_xlib_surface_get_drawable (surface);
Window xroot = RootWindow (display, gdk_screen_get_number(screen));
XGrabServer (display);
XSetWindowBackgroundPixmap (display, xroot, pixmap_id);
set_root_pixmap_id (screen, display, pixmap_id);
XClearWindow (display, xroot);
XFlush (display);
XUngrabServer (display);
}
static gdouble
transition_func_linear(gdouble x)
{
return x;
}
static gdouble
transition_func_ease_in_out(gdouble x)
{
return (1 - cos(M_PI*x))/2;
}
lightdm-gtk-greeter-2.0.1/src/greeterconfiguration.c 0000664 0001750 0001750 00000024613 12527242647 017504 0000000 0000000
#include
#include "greeterconfiguration.h"
static GKeyFile* greeter_config = NULL;
static GKeyFile* state_config = NULL;
static gchar* state_filename = NULL;
static GKeyFile* get_file_for_group (const gchar** group);
static void save_key_file (GKeyFile* config, const gchar* path);
static gboolean get_int (GKeyFile* config, const gchar* group, const gchar* key, gint* out);
static gboolean get_bool (GKeyFile* config, const gchar* group, const gchar* key, gboolean* out);
/* Implementation */
static GList*
append_directory_content(GList* files, const gchar* path)
{
GError* error = NULL;
gchar* full_path = g_build_filename(path, "lightdm", "lightdm-gtk-greeter.conf.d", NULL);
GDir* dir = g_dir_open(full_path, 0, &error);
if(error && !g_error_matches(error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
g_warning("[Configuration] Failed to read configuration directory '%s': %s", full_path, error->message);
g_clear_error(&error);
GList* content = NULL;
if(dir)
{
const gchar *name;
while((name = g_dir_read_name(dir)))
{
if(!g_str_has_suffix(name, ".conf"))
continue;
content = g_list_prepend(content, g_build_filename(full_path, name, NULL));
}
g_dir_close(dir);
if(content)
content = g_list_sort(content, (GCompareFunc)g_strcmp0);
}
content = g_list_append(content, g_build_filename(path, "lightdm", "lightdm-gtk-greeter.conf", NULL));
GList* list_iter;
for(list_iter = content; list_iter; list_iter = g_list_next(list_iter))
{
if(g_file_test(list_iter->data, G_FILE_TEST_IS_REGULAR))
files = g_list_prepend(files, list_iter->data);
else
g_free(list_iter->data);
}
g_list_free(content);
g_free(full_path);
return files;
}
void
config_init(void)
{
GError* error = NULL;
gchar* state_config_dir = g_build_filename(g_get_user_cache_dir(), "lightdm-gtk-greeter", NULL);
state_filename = g_build_filename(state_config_dir, "state", NULL);
g_mkdir_with_parents(state_config_dir, 0775);
g_free(state_config_dir);
state_config = g_key_file_new();
g_key_file_load_from_file(state_config, state_filename, G_KEY_FILE_NONE, &error);
if (error && !g_error_matches(error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
g_warning("[Configuration] Failed to load state from %s: %s", state_filename, error->message);
g_clear_error(&error);
gint i;
GList* files = NULL;
const gchar* const* dirs = g_get_system_data_dirs();
for(i = 0; dirs[i]; ++i)
files = append_directory_content(files, dirs[i]);
dirs = g_get_system_config_dirs();
for(i = 0; dirs[i]; ++i)
files = append_directory_content(files, dirs[i]);
gchar* config_path_tmp = g_path_get_dirname(CONFIG_FILE);
gchar* config_path = g_path_get_dirname(config_path_tmp);
files = append_directory_content(files, config_path);
g_free(config_path_tmp);
g_free(config_path);
files = g_list_reverse(files);
GKeyFile* tmp_config = NULL;
GList* file_iter = NULL;
for(file_iter = files; file_iter; file_iter = g_list_next(file_iter))
{
const gchar* path = file_iter->data;
if(!tmp_config)
tmp_config = g_key_file_new();
if(!g_key_file_load_from_file(tmp_config, path, G_KEY_FILE_NONE, &error))
{
if(error)
{
g_warning("[Configuration] Failed to read file '%s': %s", path, error->message);
g_clear_error(&error);
}
else
g_warning("[Configuration] Failed to read file '%s'", path);
continue;
}
g_message("[Configuration] Reading file: %s", path);
if(!greeter_config)
{
greeter_config = tmp_config;
tmp_config = NULL;
continue;
}
gchar** group_iter = NULL;
gchar** groups = g_key_file_get_groups(tmp_config, NULL);
for(group_iter = groups; *group_iter; ++group_iter)
{
if(**group_iter == '-')
{
g_key_file_remove_group(greeter_config, *group_iter + 1, NULL);
continue;
}
gchar** key_iter = NULL;
gchar** keys = g_key_file_get_keys(tmp_config, *group_iter, NULL, NULL);
for(key_iter = keys; *key_iter; ++key_iter)
{
if(**key_iter == '-')
{
g_key_file_remove_key(greeter_config, *group_iter, *key_iter + 1, NULL);
continue;
}
gchar* value = g_key_file_get_value(tmp_config, *group_iter, *key_iter, NULL);
if(value)
{
g_key_file_set_value(greeter_config, *group_iter, *key_iter, value);
g_free(value);
}
}
g_strfreev(keys);
}
g_strfreev(groups);
}
if (tmp_config)
g_key_file_unref(tmp_config);
g_list_free_full(files, g_free);
if(!greeter_config)
greeter_config = g_key_file_new();
}
static GKeyFile*
get_file_for_group(const gchar** group)
{
if(!*group)
*group = CONFIG_GROUP_DEFAULT;
if(*group[0] == '/')
{
(*group)++;
return state_config;
}
return greeter_config;
}
static void
save_key_file(GKeyFile* config, const gchar* path)
{
GError* error = NULL;
gsize data_length = 0;
gchar* data = g_key_file_to_data(config, &data_length, &error);
if(error)
{
g_warning("[Configuration] Failed to save file: %s", error->message);
g_clear_error(&error);
}
if(data)
{
g_file_set_contents(path, data, data_length, &error);
if(error)
{
g_warning("[Configuration] Failed to save file: %s", error->message);
g_clear_error(&error);
}
g_free(data);
}
}
static gboolean
get_int(GKeyFile* config, const gchar* group, const gchar* key, gint* out)
{
GError* error = NULL;
*out = g_key_file_get_integer(config, group, key, &error);
if(!error)
return TRUE;
if(g_error_matches(error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_INVALID_VALUE))
g_warning("[Configuration] Failed to parse integer value [%s] %s: %s", group, key, error->message);
g_clear_error(&error);
return FALSE;
}
static gboolean
get_bool(GKeyFile* config, const gchar* group, const gchar* key, gboolean* out)
{
GError* error = NULL;
*out = g_key_file_get_boolean(config, group, key, &error);
if(!error)
return TRUE;
if(g_error_matches(error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_INVALID_VALUE))
g_warning("[Configuration] Failed to parse boolean value [%s] %s: %s", group, key, error->message);
g_clear_error(&error);
return FALSE;
}
gchar**
config_get_groups(const gchar* prefix)
{
gsize groups_size = 0, i, next;
gchar** groups = g_key_file_get_groups(greeter_config, &groups_size);
for(i = next = 0; i < groups_size; ++i)
if(groups[i] && g_str_has_prefix(groups[i], prefix))
{
if(i != next)
{
g_free (groups[next]);
groups[next] = groups[i];
groups[i] = NULL;
}
++next;
}
if(groups)
groups[next] = NULL;
return groups;
}
gboolean
config_has_key(const gchar* group, const gchar* key)
{
GKeyFile* file = get_file_for_group(&group);
return g_key_file_has_key(file, group, key, NULL);
}
gchar*
config_get_string(const gchar* group, const gchar* key, const gchar* fallback)
{
GKeyFile* file = get_file_for_group(&group);
gchar* value = g_key_file_get_value(file, group, key, NULL);
return value || !fallback ? value : g_strdup(fallback);
}
void
config_set_string(const gchar* group, const gchar* key, const gchar* value)
{
if(get_file_for_group(&group) != state_config)
{
g_warning("[Configuration] %s(%s, %s, '%s')", __func__, group, key, value);
return;
}
g_key_file_set_value(state_config, group, key, value);
save_key_file(state_config, state_filename);
}
gchar**
config_get_string_list(const gchar* group, const gchar* key, gchar** fallback)
{
GKeyFile* file = get_file_for_group(&group);
gchar** value = g_key_file_get_string_list(file, group, key, NULL, NULL);
return value || !fallback ? value : g_strdupv(fallback);
}
gint
config_get_int(const gchar* group, const gchar* key, gint fallback)
{
GKeyFile* file = get_file_for_group(&group);
gint value;
if(!get_int(file, group, key, &value))
return fallback;
return value;
}
void
config_set_int(const gchar* group, const gchar* key, gint value)
{
if(get_file_for_group(&group) != state_config)
{
g_warning("[Configuration] %s(%s, %s, %d)", __func__, group, key, value);
return;
}
g_key_file_set_integer(state_config, group, key, value);
save_key_file(state_config, state_filename);
}
gboolean
config_get_bool(const gchar* group, const gchar* key, gboolean fallback)
{
GKeyFile* file = get_file_for_group(&group);
gboolean value;
if(!get_bool(file, group, key, &value))
return fallback;
return value;
}
void
config_set_bool(const gchar* group, const gchar* key, gboolean value)
{
if(get_file_for_group(&group) != state_config)
{
g_warning("[Configuration] %s(%s, %s, %d)", __func__, group, key, value);
return;
}
g_key_file_set_boolean(state_config, group, key, value);
save_key_file(state_config, state_filename);
}
gint
config_get_enum(const gchar* group, const gchar* key, gint fallback, const gchar* first_item, ...)
{
if(!first_item)
return fallback;
GKeyFile* file = get_file_for_group(&group);
gchar* value = g_key_file_get_value(file, group, key, NULL);
if(!value)
return fallback;
va_list var_args;
va_start(var_args, first_item);
gboolean found = FALSE;
const gchar* item_name = first_item;
while(item_name)
{
gint item_value = va_arg(var_args, gint);
if(g_strcmp0(value, item_name) == 0)
{
found = TRUE;
fallback = item_value;
break;
}
item_name = va_arg(var_args, gchar*);
}
va_end(var_args);
if(!found)
g_warning("[Configuration] Failed to parse enum value [%s] %s: %s", group, key, value);
return fallback;
}
lightdm-gtk-greeter-2.0.1/src/lightdm-gtk-greeter-css-fallback.h 0000664 0001750 0001750 00000001201 12527242717 021437 0000000 0000000 /* automatically generated from lightdm-gtk-greeter-fallback.css */
#ifdef __SUNPRO_C
#pragma align 4 (lightdm_gtk_greeter_css_fallback)
#endif
#ifdef __GNUC__
static const char lightdm_gtk_greeter_css_fallback[] __attribute__ ((__aligned__ (4))) =
#else
static const char lightdm_gtk_greeter_css_fallback[] =
#endif
{
"#layout_menuitem>GtkLabel\n{\n border: 1px solid alpha(@menu_fg_colo"
"r, 0.8);\n border-radius: 0.5em;\n padding: 0px 0.25em;\n back"
"ground: alpha(@menu_fg_color, 0.2);\n}\n\n#layout_menuitem\n{\n padd"
"ing: 1px;\n}\n"
};
static const unsigned lightdm_gtk_greeter_css_fallback_length = 215u;
lightdm-gtk-greeter-2.0.1/src/greeterbackground.h 0000664 0001750 0001750 00000005370 12527242647 016760 0000000 0000000 #ifndef GREETER_BACKGROUND_H
#define GREETER_BACKGROUND_H
#include
#include
G_BEGIN_DECLS
#define GREETER_BACKGROUND_TYPE (greeter_background_get_type())
#define GREETER_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GREETER_BACKGROUND_TYPE, GreeterBackground))
#define GREETER_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GREETER_BACKGROUND_TYPE, GreeterBackgroundClass))
#define GREETER_IS_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GREETER_BACKGROUND_TYPE))
#define GREETER_IS_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GREETER_BACKGROUND_TYPE))
#define GREETER_BACKGROUND_DEFAULT "*"
typedef enum
{
TRANSITION_TYPE_NONE,
TRANSITION_TYPE_EASE_IN_OUT,
TRANSITION_TYPE_LINEAR,
TRANSITION_TYPE_FALLBACK
} TransitionType;
typedef enum
{
TRANSITION_EFFECT_NONE,
} TransitionEffect;
typedef struct _GreeterBackground GreeterBackground;
typedef struct _GreeterBackgroundClass GreeterBackgroundClass;
GType greeter_background_get_type(void) G_GNUC_CONST;
GreeterBackground* greeter_background_new (GtkWidget* child);
void greeter_background_set_active_monitor_config (GreeterBackground* background,
const gchar* value);
void greeter_background_set_monitor_config (GreeterBackground* background,
const gchar* name,
const gchar* bg,
gint user_bg,
gint laptop,
gint transition_duration,
TransitionType transition_type);
void greeter_background_remove_monitor_config (GreeterBackground* background,
const gchar* name);
gchar** greeter_background_get_configured_monitors (GreeterBackground* background);
void greeter_background_connect (GreeterBackground* background,
GdkScreen* screen);
void greeter_background_set_custom_background (GreeterBackground* background,
const gchar* path);
void greeter_background_save_xroot (GreeterBackground* background);
const GdkRectangle* greeter_background_get_active_monitor_geometry(GreeterBackground* background);
void greeter_background_add_accel_group (GreeterBackground* background,
GtkAccelGroup* group);
G_END_DECLS
#endif // GREETER_BACKGROUND_H
lightdm-gtk-greeter-2.0.1/install-sh 0000755 0001750 0001750 00000033255 12527242707 014325 0000000 0000000 #!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
lightdm-gtk-greeter-2.0.1/lightdm-gtk-greeter.doap 0000664 0001750 0001750 00000001654 12527242647 017037 0000000 0000000 lightdm-gtk-greeterLightDM GTK+ GreeterRobert Ancellrancell
lightdm-gtk-greeter-2.0.1/data/ 0000775 0001750 0001750 00000000000 12527242717 013305 5 0000000 0000000 lightdm-gtk-greeter-2.0.1/data/lightdm-gtk-greeter.desktop 0000664 0001750 0001750 00000000273 12527242647 020472 0000000 0000000 [Desktop Entry]
Name=LightDM GTK+ Greeter
Comment=This runs the GTK+ greeter, it should only be run from LightDM
Exec=lightdm-gtk-greeter
Type=Application
X-Ubuntu-Gettext-Domain=lightdm
lightdm-gtk-greeter-2.0.1/data/Makefile.am 0000664 0001750 0001750 00000000423 12527242647 015262 0000000 0000000 SUBDIRS = badges
xgreetersdir = $(datadir)/xgreeters
dist_xgreeters_DATA = lightdm-gtk-greeter.desktop
docdir = $(datadir)/doc/lightdm-gtk-greeter
dist_doc_DATA = sample-lightdm-gtk-greeter.css
configdir = $(sysconfdir)/lightdm
dist_config_DATA = lightdm-gtk-greeter.conf
lightdm-gtk-greeter-2.0.1/data/Makefile.in 0000664 0001750 0001750 00000057446 12527242707 015311 0000000 0000000 # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = data
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(dist_config_DATA) $(dist_doc_DATA) $(dist_xgreeters_DATA)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(configdir)" "$(DESTDIR)$(docdir)" \
"$(DESTDIR)$(xgreetersdir)"
DATA = $(dist_config_DATA) $(dist_doc_DATA) $(dist_xgreeters_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
INDICATORDIR = @INDICATORDIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBIDO_CFLAGS = @LIBIDO_CFLAGS@
LIBIDO_LIBS = @LIBIDO_LIBS@
LIBINDICATOR_CFLAGS = @LIBINDICATOR_CFLAGS@
LIBINDICATOR_LIBS = @LIBINDICATOR_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBX11_CFLAGS = @LIBX11_CFLAGS@
LIBX11_LIBS = @LIBX11_LIBS@
LIBXKLAVIER_CFLAGS = @LIBXKLAVIER_CFLAGS@
LIBXKLAVIER_LIBS = @LIBXKLAVIER_LIBS@
LIGHTDMGOBJECT_CFLAGS = @LIGHTDMGOBJECT_CFLAGS@
LIGHTDMGOBJECT_LIBS = @LIGHTDMGOBJECT_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
UNITY_INDICATORDIR = @UNITY_INDICATORDIR@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = $(datadir)/doc/lightdm-gtk-greeter
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
intltool__v_merge_options_ = @intltool__v_merge_options_@
intltool__v_merge_options_0 = @intltool__v_merge_options_0@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = badges
xgreetersdir = $(datadir)/xgreeters
dist_xgreeters_DATA = lightdm-gtk-greeter.desktop
dist_doc_DATA = sample-lightdm-gtk-greeter.css
configdir = $(sysconfdir)/lightdm
dist_config_DATA = lightdm-gtk-greeter.conf
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu data/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-dist_configDATA: $(dist_config_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_config_DATA)'; test -n "$(configdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(configdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(configdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(configdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(configdir)" || exit $$?; \
done
uninstall-dist_configDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_config_DATA)'; test -n "$(configdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(configdir)'; $(am__uninstall_files_from_dir)
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
done
uninstall-dist_docDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
install-dist_xgreetersDATA: $(dist_xgreeters_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_xgreeters_DATA)'; test -n "$(xgreetersdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(xgreetersdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(xgreetersdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xgreetersdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(xgreetersdir)" || exit $$?; \
done
uninstall-dist_xgreetersDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_xgreeters_DATA)'; test -n "$(xgreetersdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(xgreetersdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(configdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(xgreetersdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-dist_configDATA install-dist_docDATA \
install-dist_xgreetersDATA
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-dist_configDATA uninstall-dist_docDATA \
uninstall-dist_xgreetersDATA
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-dist_configDATA install-dist_docDATA \
install-dist_xgreetersDATA install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-dist_configDATA \
uninstall-dist_docDATA uninstall-dist_xgreetersDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
lightdm-gtk-greeter-2.0.1/data/sample-lightdm-gtk-greeter.css 0000664 0001750 0001750 00000023033 12527242647 021067 0000000 0000000 /*
Theming samples for lightdm-gtk-greeter 1.8
Below are two samples of what a greeter theme in Gtk3 could look like. For the first one, we're only using the lightdm-gtk-greeter style-class. This is best if you just want to set a simple color-scheme.
For more fine-grain control, you can also use the named widgets. Those are being used in the second sample, because that gives you maximum control over the greeter.
*/
/*************************
* 1. Minimalistic theme *
*************************/
.lightdm-gtk-greeter {
background-color: black;
color: white;
}
/*************************
* 2. Advanced theme *
*************************/
/* the panel widget at the top */
#panel_window {
background-color: alpha (black, 0.5);
color: white;
font: bold;
text-shadow: 0 1px alpha(black, 0.5);
icon-shadow: 0 1px alpha(black, 0.5);
box-shadow: inset 0 -1px alpha (black, 0.5);
}
/* the menubars/menus of the panel, i.e. indicators */
#panel_window .menubar,
#panel_window .menubar > .menuitem {
background-color: transparent;
color: white;
font: bold;
text-shadow: 0 1px alpha(black, 0.5);
icon-shadow: 0 1px alpha(black, 0.5);
}
#panel_window .menubar .menuitem:insensitive {
color: alpha(white, 0.7);
text-shadow: none;
}
#panel_window .menubar .menu {
border-radius: 1px;
}
#panel_window .menubar .menu .menuitem {
font: normal;
text-shadow: none;
}
/* the login window */
#login_window,
#shutdown_dialog,
#restart_dialog {
border-style: none;
border-radius: 5px;
background-color: @lightdm_bg_color;
color: @lightdm_fg_color;
/* the window widget doesn't have a border, so draw border using box-shadow */
box-shadow: inset 1px 0 shade(@lightdm_bg_color, 0.6),
inset -1px 0 shade(@lightdm_bg_color, 0.6),
inset 0 1px shade(@lightdm_bg_color, 0.6),
inset 0 -1px shade(@lightdm_bg_color, 0.6);
}
/* the top half of the login-window, in GtkDialog terms, the content */
#content_frame {
padding-bottom: 14px;
}
/* the user-combobox */
#login_window .menu {
border-radius: 1px;
}
#login_window GtkComboBox .button,
#login_window GtkComboBox .button:hover,
#login_window GtkComboBox .button:active,
#login_window GtkComboBox .button:active:hover,
#login_window GtkComboBox .button:focus,
#login_window GtkComboBox .button:hover:focus,
#login_window GtkComboBox .button:active:focus,
#login_window GtkComboBox .button:active:hover:focus {
padding: 0;
background: none;
border-style: none;
box-shadow: none;
}
#login_window GtkComboBox .button:focus,
#login_window GtkComboBox .button:hover:focus,
#login_window GtkComboBox .button:active:focus,
#login_window GtkComboBox .button:active:hover:focus {
box-shadow: inset 1px 0 alpha(@theme_selected_bg_color, 0.6),
inset -1px 0 alpha(@theme_selected_bg_color, 0.6),
inset 0 1px alpha(@theme_selected_bg_color, 0.6),
inset 0 -1px alpha(@theme_selected_bg_color, 0.6);
}
#login_window #user_combobox {
color: @lightdm_fg_color;
font: 18px;
}
#login_window #user_combobox .menu {
font: normal;
}
#login_window #user_combobox .arrow {
color: mix(@lightdm_fg_color, @lightdm_bg_color, 0.5);
}
/* the entries, one for the username, one for the password */
#login_window .entry {
padding: 3px 5px;
border-width: 1px;
border-style: solid;
border-color: shade(@lightdm_bg_color, 0.8);
border-radius: 3px;
background-image: linear-gradient(to bottom,
shade(@lightdm_bg_color, 0.95),
shade(@lightdm_bg_color, 0.97) 30%,
shade(@lightdm_bg_color, 1.02)
);
color: @lightdm_fg_color;
box-shadow: none;
transition: all 150ms ease-out;
}
#login_window .entry:focus,
#login_window .entry:hover {
border-color: shade(@lightdm_bg_color, 0.7);
box-shadow: inset 1px 0 alpha(@dark_shadow, 0.10),
inset 0 1px alpha(@dark_shadow, 0.12),
inset -1px 0 alpha(@dark_shadow, 0.10);
}
/* the buttons, alternatively this could also be done with a simple ".lightdm-gtk-greeter .button" */
#login_window .button,
#shutdown_dialog .button,
#restart_dialog .button {
padding: 3px 15px;
transition: all 150ms ease-out;
}
/* the user's avatar box */
#user_image {
padding: 3px;
border-radius: 3px;
/* draw border using box-shadow */
box-shadow: inset 1px 0 shade(@lightdm_bg_color, 0.75),
inset -1px 0 shade(@lightdm_bg_color, 0.75),
inset 0 1px shade(@lightdm_bg_color, 0.55),
inset 0 -1px shade(@lightdm_bg_color, 1.8);
}
/* the border around the user's avatar box */
#user_image_border {
border-radius: 3px;
box-shadow: inset 0 1px shade(@lightdm_bg_color, 0.8),
inset 0 -1px shade(@lightdm_bg_color, 0.55);
background-image: linear-gradient(to bottom,
shade(@lightdm_bg_color, 0.9),
shade(@lightdm_bg_color, 0.98) 10%,
shade(@lightdm_bg_color, 1.0) 99%,
shade(@lightdm_bg_color, 1.0)
);
}
/* the lower half of the login-window, in GtkDialog terms the buttonbox or action area */
#buttonbox_frame {
padding-top: 20px;
padding-bottom: 0px;
border-style: none;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
background-image: linear-gradient(to bottom,
shade(@bg_color, 0.85),
shade(@bg_color, 0.98) 10%,
shade(@bg_color, 1.0) 99%,
shade(@bg_color, 1.0)
);
box-shadow: inset 1px 0 shade(@lightdm_bg_color, 0.6),
inset -1px 0 shade(@lightdm_bg_color, 0.6),
inset 0 1px shade(@lightdm_bg_color, 0.6),
inset 0 -1px shade(@lightdm_bg_color, 0.6);
}
/* the buttons that have focus by default in each window */
#login_window .button.default,
#shutdown_dialog .button.default,
#restart_dialog .button.default,
#login_window .button:focus,
#login_window .button:active:focus,
#shutdown_dialog .button:focus,
#shutdown_dialog .button:active:focus,
#restart_dialog .button:focus,
#restart_dialog .button:active:focus {
border-color: shade(@theme_selected_bg_color, 0.8);
background-image: linear-gradient(to bottom,
shade(@theme_selected_bg_color, 1.02),
shade(@theme_selected_bg_color, 0.95) 90%,
shade(@theme_selected_bg_color, 0.90)
);
color: @theme_selected_fg_color;
}
#login_window .button.default:hover,
#shutdown_dialog .button.default:hover,
#restart_dialog .button.default:hover,
#login_window .button:hover:focus,
#login_window .button:active:hover:focus,
#shutdown_dialog .button:hover:focus,
#shutdown_dialog .button:active:hover:focus,
#restart_dialog .button:hover:focus,
#restart_dialog .button:active:hover:focus {
border-color: shade(@theme_selected_bg_color, 0.7);
background-image: linear-gradient(to bottom,
shade(@theme_selected_bg_color, 1.12),
shade(@theme_selected_bg_color, 1.05) 90%,
shade(@theme_selected_bg_color, 1.00)
);
}
/* the shutdown button */
#shutdown_button.button {
border-color: shade(@error_bg_color, 0.8);
background-image: linear-gradient(to bottom,
shade(@error_bg_color, 1.02),
shade(@error_bg_color, 0.95) 90%,
shade(@error_bg_color, 0.90)
);
color: @error_fg_color;
}
#shutdown_button.button:hover,
#shutdown_button.button:active,
#shutdown_button.button:active:hover {
border-color: shade(@error_bg_color, 0.7);
background-image: linear-gradient(to bottom,
shade(@error_bg_color, 1.12),
shade(@error_bg_color, 1.05) 90%,
shade(@error_bg_color, 1.00)
);
}
/* the restart button */
#restart_button.button {
border-color: shade(@warning_bg_color, 0.8);
background-image: linear-gradient(to bottom,
shade(@warning_bg_color, 1.02),
shade(@warning_bg_color, 0.95) 90%,
shade(@warning_bg_color, 0.90)
);
color: @warning_fg_color;
}
#restart_button.button:hover,
#restart_button.button:active,
#restart_button.button:active:hover {
border-color: shade(@warning_bg_color, 0.7);
background-image: linear-gradient(to bottom,
shade(@warning_bg_color, 1.12),
shade(@warning_bg_color, 1.05) 90%,
shade(@warning_bg_color, 1.00)
);
}
/* the warning, in case a wrong password is entered or something else goes wrong according to PAM */
#greeter_infobar {
border-bottom-width: 0;
font: bold;
} lightdm-gtk-greeter-2.0.1/data/lightdm-gtk-greeter.conf 0000664 0001750 0001750 00000005305 12527242647 017747 0000000 0000000 # LightDM GTK+ Configuration
# Available configuration options listed below.
#
# Appearance:
# theme-name = GTK+ theme to use
# icon-theme-name = Icon theme to use
# background = Background file to use, either an image path or a color (e.g. #772953)
# user-background = false|true ("true" by default) Display user background (if available)
# transition-duration = Length of time (in milliseconds) to transition between background images ("500" by default)
# transition-type = ease-in-out|linear|none ("ease-in-out" by default)
#
# Fonts:
# font-name = Font to use
# xft-antialias = false|true Whether to antialias Xft fonts
# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
# xft-hintstyle = none|slight|medium|hintfull What degree of hinting to use
# xft-rgba = none|rgb|bgr|vrgb|vbgr Type of subpixel antialiasing
#
# Login window:
# active-monitor = Monitor to display greeter window (name or number). Use #cursor value to display greeter at monitor with cursor. Can be a semicolon separated list
# position = x y ("50% 50%" by default) Login window position
# default-user-image = Image used as default user icon, path or #icon-name
# hide-user-image = false|true ("false" by default)
#
# Panel:
# panel-position = top|bottom ("top" by default)
# clock-format = strftime-format string, e.g. %H:%M
# indicators = semi-colon ";" separated list of allowed indicator modules. Built-in indicators include "~a11y", "~language", "~session", "~power", "~clock", "~host", "~spacer". Unity indicators can be represented by short name (e.g. "sound", "power"), service file name, or absolute path
#
# Accessibility:
# a11y-states = states of accessibility features: "name" - save state on exit, "-name" - disabled at start (default value for unlisted), "+name" - enabled at start. Allowed names: contrast, font, keyboard, reader.
# keyboard = command to launch on-screen keyboard (e.g. "onboard")
# keyboard-position = x y[;width height] ("50%,center -0;50% 25%" by default) Works only for "onboard"
# reader = command to launch screen reader (e.g. "orca")
#
# Security:
# allow-debugging = false|true ("false" by default)
# screensaver-timeout = Timeout (in seconds) until the screen blanks when the greeter is called as lockscreen
#
# Template for per-monitor configuration:
# [monitor: name]
# background = overrides default value
# user-background = overrides default value
# laptop = false|true ("false" by default) Marks monitor as laptop display
# transition-duration = overrides default value
#
[greeter]
#background=
#user-background=
#theme-name=
#icon-theme-name=
#font-name=
#xft-antialias=
#xft-dpi=
#xft-hintstyle=
#xft-rgba=
#indicators=
#clock-format=
#keyboard=
#reader=
#position=
#screensaver-timeout=
lightdm-gtk-greeter-2.0.1/data/badges/ 0000775 0001750 0001750 00000000000 12527242717 014532 5 0000000 0000000 lightdm-gtk-greeter-2.0.1/data/badges/ubuntu-2d_badge-symbolic.svg 0000664 0001750 0001750 00000014242 12527242647 021766 0000000 0000000
lightdm-gtk-greeter-2.0.1/data/badges/kde-plasma_badge-symbolic.svg 0000664 0001750 0001750 00000006633 12527242647 022164 0000000 0000000