gnome-panel r11454 - trunk/gnome-panel
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11454 - trunk/gnome-panel
- Date: Tue, 20 Jan 2009 12:34:10 +0000 (UTC)
Author: vuntz
Date: Tue Jan 20 12:34:10 2009
New Revision: 11454
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11454&view=rev
Log:
2009-01-20 Vincent Untz <vuntz gnome org>
Connect to the session manager only when we're really ready, so that
the struts are really set. Therefore, nautilus doesn't have jumping
icons on login.
Fix bug #563635.
Based on patch by Behdad Esfahbod <behdad gnome org>
* main.c: (main): don't connect to the session manager automatically,
and move the session initialization code just before we enter the
main loop
* panel-session.c: (panel_session_init): connect to the session manager
Modified:
trunk/gnome-panel/ChangeLog
trunk/gnome-panel/main.c
trunk/gnome-panel/panel-session.c
Modified: trunk/gnome-panel/main.c
==============================================================================
--- trunk/gnome-panel/main.c (original)
+++ trunk/gnome-panel/main.c Tue Jan 20 12:34:10 2009
@@ -13,6 +13,7 @@
#include <sys/wait.h>
#include <glib/gi18n.h>
+#include <libgnomeui/gnome-client.h>
#include <libgnomeui/gnome-ui-init.h>
#include <libpanel-util/panel-cleanup.h>
@@ -62,6 +63,7 @@
program = gnome_program_init ("gnome-panel", VERSION,
LIBGNOMEUI_MODULE,
argc, argv,
+ GNOME_CLIENT_PARAM_SM_CONNECT, FALSE,
GNOME_PARAM_GOPTION_CONTEXT, context,
GNOME_PROGRAM_STANDARD_PROPERTIES,
NULL);
@@ -79,8 +81,6 @@
panel_multiscreen_init ();
panel_init_stock_icons_and_items ();
- panel_session_init ();
-
gconf_client_add_dir (panel_gconf_get_client (),
"/desktop/gnome/interface",
GCONF_CLIENT_PRELOAD_NONE,
@@ -97,6 +97,14 @@
xstuff_init ();
+ /* Flush to make sure our struts are seen by everyone starting
+ * immediate after (eg, the nautilus desktop). */
+ gdk_flush ();
+
+ /* Do this at the end, to be sure that we're really ready when
+ * connecting to the session manager */
+ panel_session_init ();
+
gtk_main ();
panel_lockdown_finalize ();
Modified: trunk/gnome-panel/panel-session.c
==============================================================================
--- trunk/gnome-panel/panel-session.c (original)
+++ trunk/gnome-panel/panel-session.c Tue Jan 20 12:34:10 2009
@@ -55,13 +55,16 @@
{
GnomeClient *client;
+ client = gnome_master_client ();
+
+ /* explicitly tell the session manager we're ready -- we don't do it
+ * before */
+ gnome_client_connect (client);
+
/* We don't want the WM to try and save/restore our
- * window position
- */
+ * window position */
gdk_set_sm_client_id (NULL);
- client = gnome_master_client ();
-
if (!getenv ("GNOME_PANEL_DEBUG"))
gnome_client_set_restart_style (client, GNOME_RESTART_IMMEDIATELY);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]