Revision: 4931 http://geany.svn.sourceforge.net/geany/?rev=4931&view=rev Author: statc Date: 2010-05-19 06:55:07 +0000 (Wed, 19 May 2010)
Log Message: ----------- Call gdk_set_sm_client_id() (suggested by Dimitar Zhekov, thanks)
Modified Paths: -------------- branches/sm/src/main.c branches/sm/src/sm.c
Modified: branches/sm/src/main.c =================================================================== --- branches/sm/src/main.c 2010-05-16 18:25:38 UTC (rev 4930) +++ branches/sm/src/main.c 2010-05-19 06:55:07 UTC (rev 4931) @@ -1014,6 +1014,8 @@ geany_object = geany_object_new();
/* inits */ + sm_init(argv[0], libsm_client_id); + main_init(); gtk_widget_set_size_request(main_widgets.window, GEANY_WINDOW_MINIMAL_WIDTH, GEANY_WINDOW_MINIMAL_HEIGHT); gtk_window_set_default_size(GTK_WINDOW(main_widgets.window), GEANY_WINDOW_DEFAULT_WIDTH, GEANY_WINDOW_DEFAULT_HEIGHT); @@ -1137,8 +1139,6 @@ } #endif
- sm_init(argv[0], libsm_client_id); - gtk_main(); return 0; }
Modified: branches/sm/src/sm.c =================================================================== --- branches/sm/src/sm.c 2010-05-16 18:25:38 UTC (rev 4930) +++ branches/sm/src/sm.c 2010-05-19 06:55:07 UTC (rev 4931) @@ -123,8 +123,8 @@ * everything is successful, it stores libSM connection object in the global * variable @c smcon and calls @c sm_store_props() and @c sm_set_contant_props(). * - * This function can be called at any time during Geany instance's lifetime. - * Actually it is called when Geany is starting. + * This function should be called before Geany's main window is created so that + * gdk_set_sm_cliend_id() works properly. * * When Geany is compiled without XSMP support, this function is a no-op. */ @@ -138,6 +138,8 @@ if (smc_conn) return;
+ gdk_set_sm_client_id(libsm_client_id); + smc_conn = sm_connect(libsm_client_id, &new_client_id); if (!smc_conn) return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.