Re: Session managment

Hi Paul!

Because a SM code needs information about the toplevel window it would
not be so easy to use X functions. I found some piece of code, but I
don't know if I can mix it with gtk. Here a piece of it:

     wm_protocols = XInternAtom(dpy, "WM_PROTOCOLS", False);
     wm_state = XInternAtom(dpy, "WM_STATE", False);
     delete_window = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
     if (delete_window != None) wm_protos[i++] = delete_window;
     if (!app_data.launcher) {
         /* When the launcher is active, we need no session management,
            because the window manager who 'swallows' the launcher
            window will start the mixer automatically */
         save_yourself = XInternAtom(dpy, "WM_SAVE_YOURSELF", False);
         if (save_yourself != None) wm_protos[i++] = save_yourself;
     XSetWMProtocols(dpy, XtWindow(top_level_widget), wm_protos, i);

The important thing is to add the WM_SAVE_YOURSELF event.

I'm able to write gtk-code but this seems a little bit too complicated
for me.

Paul Davis wrote:

>>Did anyone coded a session management in GTK (without using GNOME). I
>>have a small application and dont want link GNOME stuff against it.
> isn't this a non-sequitur ? GTK is a widget toolkit. it doesn't know
> anything about sessions or session management, which are conceptually
> part of a desktop like GNOME.
> or maybe i'm wrong.

Fritz GANTER                                   mailto:Ganter quant-x com
UNIX and Linux Support                        mailto:support quant-x com

Quant-X Service & Consulting Ges.m.b.H. 
Phn: +43 4212 90555-0 Fax: +43 4212 90555-20 Free: +800 90555 000

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]