diff options
author | Olivier Duchateau <olivierd@FreeBSD.org> | 2013-03-03 16:08:46 +0000 |
---|---|---|
committer | Olivier Duchateau <olivierd@FreeBSD.org> | 2013-03-03 16:08:46 +0000 |
commit | 6a2157983a8ba9def323d452faf150a447002eb2 (patch) | |
tree | 7377d9a6e6e281212ae4e0231a8d0819ee25e317 /x11-wm/xfce4-session | |
parent | a6005117606a1fc60787de3e56f9f29f85943614 (diff) |
Notes
Diffstat (limited to 'x11-wm/xfce4-session')
-rw-r--r-- | x11-wm/xfce4-session/Makefile | 24 | ||||
-rw-r--r-- | x11-wm/xfce4-session/files/patch-xfce4-session-logout__main.c | 38 | ||||
-rw-r--r-- | x11-wm/xfce4-session/files/patch-xfce4-session__xfsm-manager.c | 132 |
3 files changed, 180 insertions, 14 deletions
diff --git a/x11-wm/xfce4-session/Makefile b/x11-wm/xfce4-session/Makefile index 24315ca77ede..d666907d25a0 100644 --- a/x11-wm/xfce4-session/Makefile +++ b/x11-wm/xfce4-session/Makefile @@ -1,13 +1,10 @@ -# New ports collection makefile for: xfce4-session -# Date created: 2003-10-30 -# Whom: Matt Lancereau <matt@rimasec.net> -# +# Created by: Matt Lancereau <matt@rimasec.net> # $FreeBSD$ # PORTNAME= xfce4-session PORTVERSION= 4.10.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-wm xfce MASTER_SITES= ${MASTER_SITE_XFCE} DIST_SUBDIR= xfce4 @@ -15,22 +12,21 @@ DIST_SUBDIR= xfce4 MAINTAINER= xfce@FreeBSD.org COMMENT= Xfce's session manager -#CONFLICTS= xfce4-utils-4.8.* - BUILD_DEPENDS= iceauth:${PORTSDIR}/x11/iceauth RUN_DEPENDS= iceauth:${PORTSDIR}/x11/iceauth \ console-kit-daemon:${PORTSDIR}/sysutils/consolekit -LIB_DEPENDS= wnck-1.22:${PORTSDIR}/x11-toolkits/libwnck \ - dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ - upower-glib.1:${PORTSDIR}/sysutils/upower \ - polkit.2:${PORTSDIR}/sysutils/policykit +LIB_DEPENDS= wnck-1:${PORTSDIR}/x11-toolkits/libwnck \ + dbus-glib-1:${PORTSDIR}/devel/dbus-glib \ + upower-glib:${PORTSDIR}/sysutils/upower \ + polkit:${PORTSDIR}/sysutils/policykit USE_AUTOTOOLS= libtool GNU_CONFIGURE= yes INSTALLS_ICONS= yes USE_BZIP2= yes USE_GMAKE= yes -USE_GNOME= gnomehack gtk20 glib20 intltool intlhack pkgconfig desktopfileutils +USE_GNOME= gnomehack gtk20 glib20 intltool intlhack desktopfileutils +USE_PKGCONFIG= build USE_LDCONFIG= yes USE_XFCE= configenv libmenu libutil panel xfconf USE_XORG= x11 sm ice @@ -44,12 +40,12 @@ PKGMESSAGE= ${WRKDIR}/pkg-message OPTIONS_DEFINE= NLS GNUPG -.include <bsd.port.options.mk> - MAN1= xfce4-session.1 xfce4-session-logout.1 PLIST_SUB= VERSION="4.6" +.include <bsd.port.options.mk> + .if ${PORT_OPTIONS:MNLS} USE_GETTEXT= yes CONFIGURE_ARGS+= --enable-nls diff --git a/x11-wm/xfce4-session/files/patch-xfce4-session-logout__main.c b/x11-wm/xfce4-session/files/patch-xfce4-session-logout__main.c new file mode 100644 index 000000000000..6808c344632e --- /dev/null +++ b/x11-wm/xfce4-session/files/patch-xfce4-session-logout__main.c @@ -0,0 +1,38 @@ +--- ./xfce4-session-logout/main.c.orig 2012-04-28 20:43:27.000000000 +0000 ++++ ./xfce4-session-logout/main.c 2013-02-18 19:18:45.000000000 +0000 +@@ -48,7 +48,7 @@ + gboolean opt_reboot = FALSE; + gboolean opt_suspend = FALSE; + gboolean opt_hibernate = FALSE; +-gboolean allow_save = FALSE; ++gboolean opt_fast = FALSE; + gboolean opt_version = FALSE; + + enum +@@ -83,7 +83,7 @@ + N_("Hibernate without displaying the logout dialog"), + NULL + }, +- { "fast", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &allow_save, ++ { "fast", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_fast, + N_("Log out quickly; don't save the session"), + NULL + }, +@@ -123,6 +123,7 @@ + gboolean show_dialog; + gboolean result = FALSE; + guint shutdown_type; ++ gboolean allow_save; + + xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8"); + +@@ -149,6 +150,9 @@ + return EXIT_FAILURE; + } + ++ /* save the session, unless fast is provided */ ++ allow_save = !opt_fast; ++ + /* create messsage */ + proxy = dbus_g_proxy_new_for_name_owner (conn, + "org.xfce.SessionManager", diff --git a/x11-wm/xfce4-session/files/patch-xfce4-session__xfsm-manager.c b/x11-wm/xfce4-session/files/patch-xfce4-session__xfsm-manager.c new file mode 100644 index 000000000000..a47236aa4d35 --- /dev/null +++ b/x11-wm/xfce4-session/files/patch-xfce4-session__xfsm-manager.c @@ -0,0 +1,132 @@ +--- ./xfce4-session/xfsm-manager.c.orig 2012-04-28 20:43:27.000000000 +0000 ++++ ./xfce4-session/xfsm-manager.c 2013-02-18 19:14:56.000000000 +0000 +@@ -98,6 +98,7 @@ + + XfsmShutdownType shutdown_type; + XfsmShutdown *shutdown_helper; ++ gboolean save_session; + + gboolean session_chooser; + gchar *session_name; +@@ -230,6 +231,7 @@ + manager->failsafe_mode = TRUE; + manager->shutdown_type = XFSM_SHUTDOWN_LOGOUT; + manager->shutdown_helper = xfsm_shutdown_get (); ++ manager->save_session = TRUE; + + manager->pending_properties = g_queue_new (); + manager->starting_properties = g_queue_new (); +@@ -989,7 +991,9 @@ + XfsmClient *cl = lp->data; + if (xfsm_client_get_state (cl) == XFSM_CLIENT_INTERACTING) + { +- xfsm_client_set_state (cl, XFSM_CLIENT_WAITFORINTERACT); ++ /* a client is already interacting, so new client has to wait */ ++ xfsm_client_set_state (client, XFSM_CLIENT_WAITFORINTERACT); ++ xfsm_manager_cancel_client_save_timeout(manager, client); + return; + } + } +@@ -1138,44 +1142,47 @@ + } + } + +- if (!shutdown || shutdown_save) ++ /* don't save the session if shutting down without save */ ++ manager->save_session = !shutdown || shutdown_save; ++ ++ if (save_type == SmSaveBoth && !manager->save_session) + { +- xfsm_manager_set_state (manager, +- shutdown +- ? XFSM_MANAGER_SHUTDOWN +- : XFSM_MANAGER_CHECKPOINT); ++ /* saving the session, so clients should ++ * (prompt to) save the user data only */ ++ save_type = SmSaveGlobal; ++ } + +- /* handle legacy applications first! */ +- xfsm_legacy_perform_session_save (); ++ xfsm_manager_set_state (manager, ++ shutdown ++ ? XFSM_MANAGER_SHUTDOWN ++ : XFSM_MANAGER_CHECKPOINT); + +- for (lp = g_queue_peek_nth_link (manager->running_clients, 0); +- lp; +- lp = lp->next) +- { +- XfsmClient *client = lp->data; +- XfsmProperties *properties = xfsm_client_get_properties (client); +- const gchar *program; ++ /* handle legacy applications first! */ ++ if (manager->save_session) ++ xfsm_legacy_perform_session_save (); + +- /* xterm's session management is broken, so we won't +- * send a SAVE YOURSELF to xterms */ +- program = xfsm_properties_get_string (properties, SmProgram); +- if (program != NULL && strcasecmp (program, "xterm") == 0) +- continue; ++ for (lp = g_queue_peek_nth_link (manager->running_clients, 0); ++ lp; ++ lp = lp->next) ++ { ++ XfsmClient *client = lp->data; ++ XfsmProperties *properties = xfsm_client_get_properties (client); ++ const gchar *program; + +- if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL) +- { +- SmsSaveYourself (xfsm_client_get_sms_connection (client), save_type, shutdown, +- interact_style, fast); +- } ++ /* xterm's session management is broken, so we won't ++ * send a SAVE YOURSELF to xterms */ ++ program = xfsm_properties_get_string (properties, SmProgram); ++ if (program != NULL && strcasecmp (program, "xterm") == 0) ++ continue; + +- xfsm_client_set_state (client, XFSM_CLIENT_SAVING); +- xfsm_manager_start_client_save_timeout (manager, client); ++ if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL) ++ { ++ SmsSaveYourself (xfsm_client_get_sms_connection (client), save_type, shutdown, ++ interact_style, fast); + } +- } +- else +- { +- /* shutdown session without saving */ +- xfsm_manager_perform_shutdown (manager); ++ ++ xfsm_client_set_state (client, XFSM_CLIENT_SAVING); ++ xfsm_manager_start_client_save_timeout (manager, client); + } + } + +@@ -1249,7 +1256,12 @@ + XfsmClient *client, + gboolean success) + { +- if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVING && xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL) ++ /* In xfsm_manager_interact_done we send SmsShutdownCancelled to clients in ++ XFSM_CLIENT_WAITFORINTERACT state. They respond with SmcSaveYourselfDone ++ (xsmp_shutdown_cancelled in libxfce4ui library) so we allow it here. */ ++ if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVING && ++ xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL && ++ xfsm_client_get_state (client) != XFSM_CLIENT_WAITFORINTERACT) + { + xfsm_verbose ("Client Id = %s send SAVE YOURSELF DONE, while not being " + "in save mode. Prepare to be nuked!\n", +@@ -1521,7 +1533,8 @@ + xfsm_verbose ("Manager finished SAVE YOURSELF, session data will be stored now.\n\n"); + + /* all clients done, store session data */ +- xfsm_manager_store_session (manager); ++ if (manager->save_session) ++ xfsm_manager_store_session (manager); + + if (manager->state == XFSM_MANAGER_CHECKPOINT) + { |