Accepting request 53213 from home:gberh:branches:X11:lxde

OK

OBS-URL: https://build.opensuse.org/request/show/53213
OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=40
This commit is contained in:
Guido Berhoerster 2010-11-16 18:36:11 +00:00 committed by Git OBS Bridge
parent fb787139bf
commit 47ee00ee67
3 changed files with 31 additions and 26 deletions

View File

@ -1,6 +1,6 @@
diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4.4/lxsession-logout/lxsession-logout.c
--- lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c 2010-03-31 18:28:50.000000000 +0200
+++ lxsession-0.4.4/lxsession-logout/lxsession-logout.c 2010-07-17 11:23:57.000000000 +0200
diff -ur lxsession-0.4.5.orig/lxsession-logout/lxsession-logout.c lxsession-0.4.5/lxsession-logout/lxsession-logout.c
--- lxsession-0.4.5.orig/lxsession-logout/lxsession-logout.c 2010-11-14 19:28:18.000000000 +0100
+++ lxsession-0.4.5/lxsession-logout/lxsession-logout.c 2010-11-16 18:59:38.000000000 +0100
@@ -25,6 +25,7 @@
#include <glib/gi18n.h>
#include <sys/types.h>
@ -9,15 +9,15 @@ diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
@@ -72,6 +73,7 @@
int ltsp : 1; /* under LTSP environment */
@@ -73,6 +74,7 @@
int ltsp : 1; /* Shutdown and reboot is accomplished via LTSP */
} HandlerContext;
+static gboolean lock_screen(void);
static gboolean verify_running(char * display_manager, char * executable);
static void logout_clicked(GtkButton * button, HandlerContext * handler_context);
static void shutdown_clicked(GtkButton * button, HandlerContext * handler_context);
@@ -83,6 +85,46 @@
static void change_root_property(GtkWidget* w, const char* prop_name, const char* value);
@@ -85,6 +87,46 @@
static GtkPositionType get_banner_position(void);
static GdkPixbuf * get_background_pixbuf(void);
@ -64,26 +64,26 @@ diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4
/* Verify that a program is running and that an executable is available. */
static gboolean verify_running(char * display_manager, char * executable)
{
@@ -187,6 +229,7 @@
/* Handler for "clicked" signal on Suspend button. */
static void suspend_clicked(GtkButton * button, HandlerContext * handler_context)
{
@@ -205,6 +247,7 @@
char * error_result = NULL;
gtk_label_set_text(GTK_LABEL(handler_context->error_label), NULL);
+ lock_screen();
if (handler_context->suspend_DeviceKit)
dbus_DeviceKit_Suspend();
if (handler_context->suspend_UPower)
error_result = dbus_UPower_Suspend();
else if (handler_context->suspend_HAL)
@@ -197,6 +240,7 @@
/* Handler for "clicked" signal on Hibernate button. */
static void hibernate_clicked(GtkButton * button, HandlerContext * handler_context)
{
@@ -221,6 +264,7 @@
char * error_result = NULL;
gtk_label_set_text(GTK_LABEL(handler_context->error_label), NULL);
+ lock_screen();
if (handler_context->hibernate_DeviceKit)
dbus_DeviceKit_Hibernate();
if (handler_context->hibernate_UPower)
error_result = dbus_UPower_Hibernate();
else if (handler_context->hibernate_HAL)
@@ -207,6 +251,7 @@
/* Handler for "clicked" signal on Switch User button. */
static void switch_user_clicked(GtkButton * button, HandlerContext * handler_context)
@@ -236,6 +280,7 @@
{
gtk_label_set_text(GTK_LABEL(handler_context->error_label), NULL);
+ lock_screen();
if (handler_context->switch_user_GDM)
g_spawn_command_line_sync("gdmflexiserver --startnew", NULL, NULL, NULL, NULL);

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 16 18:01:20 UTC 2010 - gber@opensuse.org
- rebased lxsession-0.4.4-fix-bnc627416.patch for 0.4.5
-------------------------------------------------------------------
Tue Nov 16 16:22:16 UTC 2010 - andrea@opensuse.org

View File

@ -1,5 +1,5 @@
#
# spec file for package lxsession (Version 0.4.4)
# spec file for package lxsession (Version 0.4.5)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -26,9 +26,9 @@ Group: System/GUI/LXDE
License: GPL
Url: http://www.lxde.org/
Source0: %{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE lxsession-0.4.4-lock-screen-bnc622083.patch bnc#622083 guido+opensuse.org@berhoerster.name
# PATCH-FIX-OPENSUSE lxsession-0.4.5-lock-screen-bnc622083.patch bnc#622083 guido+opensuse.org@berhoerster.name
# lxsession-logout should lock the screen before suspending/hibernating/switching users
Patch0: %name-0.4.4-lock-screen-bnc622083.patch
Patch0: %name-0.4.5-lock-screen-bnc622083.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-glib-devel fdupes gtk2-devel intltool pkg-config
BuildRequires: docbook-utils docbook-xsl-stylesheets hal-devel libxslt
@ -41,7 +41,7 @@ use when a user logs out and to restart them the next time the user logs in.
Authors:
--------
Hong Jen Yee (aka PCMan) <pcman.tw@gmail.com>
Hong Jen Yee (aka PCMan) <pcman.tw@gmail.com>
%prep
%setup -q -n %name-%version