From db799a93e277a973481a6ed4cadafdc9d3985c40 Mon Sep 17 00:00:00 2001 From: Andreas Müller Date: Sun, 16 Sep 2012 17:44:54 +0200 Subject: xfce4-session: update to 4.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- ...-xfwm4-when-closing-session-with-multiple.patch | 169 --------------------- ...ultiple-interactive-session-save-bug-5379.patch | 152 ++++++++++++++++++ .../xfce4-session/xfce4-session_4.10.0.bb | 26 ++++ .../xfce4-session/xfce4-session_4.8.3.bb | 28 ---- 4 files changed, 178 insertions(+), 197 deletions(-) delete mode 100644 meta-xfce/recipes-xfce/xfce4-session/files/0001-Don-t-loose-xfwm4-when-closing-session-with-multiple.patch create mode 100644 meta-xfce/recipes-xfce/xfce4-session/files/0001-Handle-multiple-interactive-session-save-bug-5379.patch create mode 100644 meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb delete mode 100644 meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.8.3.bb diff --git a/meta-xfce/recipes-xfce/xfce4-session/files/0001-Don-t-loose-xfwm4-when-closing-session-with-multiple.patch b/meta-xfce/recipes-xfce/xfce4-session/files/0001-Don-t-loose-xfwm4-when-closing-session-with-multiple.patch deleted file mode 100644 index 50bade87f7..0000000000 --- a/meta-xfce/recipes-xfce/xfce4-session/files/0001-Don-t-loose-xfwm4-when-closing-session-with-multiple.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 64c0acb072057023870881f9fbac29ce08d357db Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Wed, 5 Sep 2012 20:14:09 +0200 -Subject: [PATCH] Don't loose xfwm4 when closing session with multiple windows - waiting for user input -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When closing a session with more than one window open and waiting for unsaved -data to be closed, at the next session xfwm4 was not started properly. - -The bug(fix) could be reproduced by - -* opening gedit -* entering some text -* opening terminal -* closing session (no YNC-dialog / wait ~1min to close session) -* reopen session - -Bugreport with this patch is found at [1] further discussion at [2]. - -Upstream-Status: Pending - -[1] https://bugzilla.xfce.org/show_bug.cgi?id=5379 -[2] http://mail.xfce.org/pipermail/xfce/2012-August/031174.html - -Signed-off-by: Andreas Müller ---- - xfce4-session/xfsm-manager.c | 81 ++++++++++++++++++++++++----------------- - 1 files changed, 47 insertions(+), 34 deletions(-) - -diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c -index 3078d6a..3cc4c89 100644 ---- a/xfce4-session/xfsm-manager.c -+++ b/xfce4-session/xfsm-manager.c -@@ -96,6 +96,7 @@ struct _XfsmManager - - XfsmManagerState state; - XfsmShutdownType shutdown_type; -+ gboolean save_session; - - gboolean session_chooser; - gchar *session_name; -@@ -225,6 +226,7 @@ xfsm_manager_init (XfsmManager *manager) - manager->session_chooser = FALSE; - manager->failsafe_mode = TRUE; - manager->shutdown_type = XFSM_SHUTDOWN_LOGOUT; -+ manager->save_session = TRUE; - - manager->pending_properties = g_queue_new (); - manager->starting_properties = g_queue_new (); -@@ -981,7 +983,9 @@ xfsm_manager_interact (XfsmManager *manager, - 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; - } - } -@@ -1158,44 +1162,47 @@ xfsm_manager_save_yourself_global (XfsmManager *manager, - } - #endif - -- 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); - } - } - -@@ -1267,7 +1274,12 @@ xfsm_manager_save_yourself_done (XfsmManager *manager, - 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", -@@ -1539,7 +1551,8 @@ xfsm_manager_complete_saveyourself (XfsmManager *manager) - 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) - { --- -1.7.6.5 - diff --git a/meta-xfce/recipes-xfce/xfce4-session/files/0001-Handle-multiple-interactive-session-save-bug-5379.patch b/meta-xfce/recipes-xfce/xfce4-session/files/0001-Handle-multiple-interactive-session-save-bug-5379.patch new file mode 100644 index 0000000000..38949a5d73 --- /dev/null +++ b/meta-xfce/recipes-xfce/xfce4-session/files/0001-Handle-multiple-interactive-session-save-bug-5379.patch @@ -0,0 +1,152 @@ +From 9f3077be682355e1cd07e9a9463e76307292208c Mon Sep 17 00:00:00 2001 +From: Dimitar Zhekov +Date: Thu, 30 Aug 2012 22:52:14 +0200 +Subject: [PATCH] Handle multiple interactive session save (bug #5379). + +Additionnaly, we now use SmSaveGlobal on log out / shutdown without +session save which avoids data loss. Previously clients would not save +anything on log out without session save. + +Based on original work by Chris Bainbridge (chris.bainbridge@gmail.com). +--- +Upstream-status: applied + xfce4-session/xfsm-manager.c | 81 ++++++++++++++++++++++++----------------- + 1 files changed, 47 insertions(+), 34 deletions(-) + +diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c +index bf6a446..35811c5 100644 +--- a/xfce4-session/xfsm-manager.c ++++ b/xfce4-session/xfsm-manager.c +@@ -98,6 +98,7 @@ struct _XfsmManager + + XfsmShutdownType shutdown_type; + XfsmShutdown *shutdown_helper; ++ gboolean save_session; + + gboolean session_chooser; + gchar *session_name; +@@ -230,6 +231,7 @@ xfsm_manager_init (XfsmManager *manager) + 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 @@ xfsm_manager_interact (XfsmManager *manager, + 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 @@ xfsm_manager_save_yourself_global (XfsmManager *manager, + } + } + +- 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 @@ xfsm_manager_save_yourself_done (XfsmManager *manager, + 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_manager_complete_saveyourself (XfsmManager *manager) + 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) + { +-- +1.7.4.4 + diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb new file mode 100644 index 0000000000..4df9894951 --- /dev/null +++ b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "xfce4-session is a session manager for Xfce 4 Desktop Environment" +SECTION = "x11" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=9ac2e7cff1ddaf48b6eab6028f23ef88" +DEPENDS = "virtual/libx11 libsm libxfce4util libxfce4ui gtk+ libwnck dbus dbus-glib xfconf gnome-keyring" +RDEPENDS_${PN} = "netbase xinit dbus-x11 iceauth consolekit upower" + +inherit xfce + +SRC_URI[md5sum] = "4768e1a41a0287af6aad18b329a0f230" +SRC_URI[sha256sum] = "bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce" +SRC_URI += "file://0001-Handle-multiple-interactive-session-save-bug-5379.patch" + +# protect from frightening message that xfce might not work correctly +pkg_postinst_${PN} () { + echo 127.0.0.1 ${MACHINE} >> /etc/hosts +} + +FILES_${PN} += "${libdir}/xfce4/*/*/*.so \ + ${libdir}/xfce4/session/*-*-* \ + ${datadir}/xsessions \ + ${datadir}/themes/Default/balou/*" + +FILES_${PN}-dbg += "${libdir}/xfce4/*/*/.debug" + +FILES_${PN}-staticdev += "${libdir}/xfce4/*/*/*.*a" diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.8.3.bb b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.8.3.bb deleted file mode 100644 index 4b9b32eb78..0000000000 --- a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.8.3.bb +++ /dev/null @@ -1,28 +0,0 @@ -DESCRIPTION = "xfce4-session is a session manager for Xfce 4 Desktop Environment" -SECTION = "x11" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=9ac2e7cff1ddaf48b6eab6028f23ef88" -DEPENDS = "virtual/libx11 libsm libxfce4util libxfce4ui gtk+ libwnck dbus dbus-glib xfconf xfce4-panel gconf gnome-keyring" -RDEPENDS_${PN} = "netbase xinit dbus-x11 iceauth consolekit" -PR = "r2" - -inherit xfce - -SRC_URI += "file://0001-Don-t-loose-xfwm4-when-closing-session-with-multiple.patch" - -# protect from frightening message that xfce might not work correctly -pkg_postinst_${PN} () { - echo 127.0.0.1 ${MACHINE} >> /etc/hosts -} - -FILES_${PN} += "${libdir}/xfce4/*/*/*.so \ - ${libdir}/xfce4/session/*-*-* \ - ${datadir}/xfce4/*/* \ - ${datadir}/themes/Default/balou/*" - -FILES_${PN}-dbg += "${libdir}/xfce4/*/*/.debug" - -FILES_${PN}-staticdev += "${libdir}/xfce4/*/*/*.*a" - -SRC_URI[md5sum] = "461cc38bbd37cab881adbdf943f9a402" -SRC_URI[sha256sum] = "f0801b8c0ffa7e5d41b29b8df281ac127adf467bf50e8ded8aebe5a02bd99338" -- cgit v1.2.3-54-g00ecf