diff options
author | Benedikt Meurer <benny@xfce.org> | 2004-05-30 13:36:42 +0000 |
---|---|---|
committer | Benedikt Meurer <benny@xfce.org> | 2004-05-30 13:36:42 +0000 |
commit | 7b1ab9aafda9f120665b23765dcf8aa6d52b7b9b (patch) | |
tree | 5a8115bdfdbe062a099bd2a85b57fe699092031b /xfce4-session/xfsm-legacy.c | |
parent | 1c3b6cff60947edc6d88c9f7292fd9b114a59b14 (diff) | |
download | xfce4-session-7b1ab9aafda9f120665b23765dcf8aa6d52b7b9b.tar.gz |
Added a work-around to get broken CDE apps working with legacy session
management and set GNOME_SM_PROXY on startup, some apps - like OOo - rely
on this to be set.
(Old svn revision: 4585)
Diffstat (limited to 'xfce4-session/xfsm-legacy.c')
-rw-r--r-- | xfce4-session/xfsm-legacy.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/xfce4-session/xfsm-legacy.c b/xfce4-session/xfsm-legacy.c index b92aa514..da5a780a 100644 --- a/xfce4-session/xfsm-legacy.c +++ b/xfce4-session/xfsm-legacy.c @@ -459,12 +459,14 @@ xfsm_legacy_perform_session_save (void) sm_window->wm_client_machine = get_wmclientmachine (sm_window->wid); } } +#endif } void xfsm_legacy_store_session (XfceRc *rc) { +#ifdef LEGACY_SESSION_MANAGEMENT int count = 0; SmWindow *sm_window; GList *lp; @@ -537,6 +539,40 @@ xfsm_legacy_load_session (XfceRc *rc) void +xfsm_legacy_init (void) +{ +#ifdef LEGACY_SESSION_MANAGEMENT + Atom dt_save_mode; + Atom dt_restore_mode; + Display *dpy; + Window root; + int n; + + dpy = gdk_display; + + /* Some CDE apps are broken (thanks again to Craig for the Sun Box :). + * Bugfix found on http://bugzilla.gnome.org/long_list.cgi?buglist=81343 + * and implemented in gnome-session. The following code extends what + * gnome does, since it seems to be necessary to set both properties + * per screen, not just for the first screen. Anybody with access to + * CDE source code to enlighten me? + * -- bm, 20040530 + */ + dt_save_mode = XInternAtom (dpy, "_DT_SAVE_MODE", False); + dt_restore_mode = XInternAtom (dpy, "_DT_RESTORE_MODE", False); + for (n = 0; n < ScreenCount (dpy); ++n) + { + root = RootWindow (dpy, n); + XChangeProperty (dpy, root, dt_save_mode, XA_STRING, 8, + PropModeReplace, "xfce4", sizeof ("xfce4")); + XChangeProperty (dpy, root, dt_restore_mode, XA_STRING, 8, + PropModeReplace, "xfce4", sizeof ("xfce4")); + } +#endif +} + + +void xfsm_legacy_startup (void) { #ifdef LEGACY_SESSION_MANAGEMENT |