On Wed, 3 Mar 2010 11:32:57 +0300% Dimitar Zhekov hamster@mbox.contact.bg wrote:
Hi.
Now to the point. I went ahead and tested the sm, and ran into a problem: in the X11 session, the geany instances are stored both as Client_ (by sm.c) and Legacy_ (by gtk/gdk, as in 0.18).
Normally a gdk_set_sm_client_id(new_client_id) would fix this, but there is a side effect. The XSM window settings (maximized state, desktop# etc.) are applied to the first window open by the session client, and since sm_init() is run after the main geany window is created:
- Geany always appears on the first desktop.
- If you choose File -> Open or Edit -> Preferences, and geany was
maximized, the Open or Preferences dialog appears maximized instead. That depends on the dialog, for example, Open may also "appear" minimized, while Find seems unaffected.
Using gdk_set_sm_client_id() and moving sm_init() before main_init() will fix this, and since sm_init() is very limited, that shouldn't break anything... but I'm not sure.
Hi.
Thanks for suggestion, now committed. It's the first time I'm using SM so I didn't even know about gdk_set_sm_client_id(). Also, could you please tell me how to view the X11 session (you are writing about "Client_" and "Legacy_")?
Best regards, Eugene.