diff options
author | Owen Taylor <otaylor@redhat.com> | 1999-01-17 22:58:59 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-01-17 22:58:59 +0000 |
commit | 1adaa231c89e917d3b9e6a69c54c8698c89e326e (patch) | |
tree | 6ff7b834561cbd52151d98d2eb6e802b99b4a8aa | |
parent | 2aca4b0a80e3995bea4aa83d9d6c211b3cbf9555 (diff) | |
download | gtk+-1adaa231c89e917d3b9e6a69c54c8698c89e326e.tar.gz |
Patch from Felix Bellaby <felix@pooh.u-net.com>
Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
Patch from Felix Bellaby <felix@pooh.u-net.com>
* gdk/gdk.c: Use XmbSetWMProperties to set
the class/command on the loader window so that the
client machine is also set in the same place.
(For X11R5 sesssion management compatibility)
* gdk/gdk.c: (gdk_set_sm_client_id) Implementation
of function to set the session manager client ID.
* gdk/gdkwindow.c (gdk_window_new): Set
WM_CLIENT_LEADER propertiy on all windows pointing
back to GDK's leader window.
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 16 | ||||
-rw-r--r-- | gdk/gdk.c | 42 | ||||
-rw-r--r-- | gdk/gdkwindow.c | 10 | ||||
-rw-r--r-- | gdk/x11/gdkmain-x11.c | 42 | ||||
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 10 |
11 files changed, 212 insertions, 4 deletions
@@ -1,3 +1,19 @@ +Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com> + + Patch from Felix Bellaby <felix@pooh.u-net.com> + + * gdk/gdk.c: Use XmbSetWMProperties to set + the class/command on the loader window so that the + client machine is also set in the same place. + (For X11R5 sesssion management compatibility) + + * gdk/gdk.c: (gdk_set_sm_client_id) Implementation + of function to set the session manager client ID. + + * gdk/gdkwindow.c (gdk_window_new): Set + WM_CLIENT_LEADER propertiy on all windows pointing + back to GDK's leader window. + Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 18c3e6bbf4..b0acd2f577 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,19 @@ +Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com> + + Patch from Felix Bellaby <felix@pooh.u-net.com> + + * gdk/gdk.c: Use XmbSetWMProperties to set + the class/command on the loader window so that the + client machine is also set in the same place. + (For X11R5 sesssion management compatibility) + + * gdk/gdk.c: (gdk_set_sm_client_id) Implementation + of function to set the session manager client ID. + + * gdk/gdkwindow.c (gdk_window_new): Set + WM_CLIENT_LEADER propertiy on all windows pointing + back to GDK's leader window. + Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 18c3e6bbf4..b0acd2f577 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,19 @@ +Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com> + + Patch from Felix Bellaby <felix@pooh.u-net.com> + + * gdk/gdk.c: Use XmbSetWMProperties to set + the class/command on the loader window so that the + client machine is also set in the same place. + (For X11R5 sesssion management compatibility) + + * gdk/gdk.c: (gdk_set_sm_client_id) Implementation + of function to set the session manager client ID. + + * gdk/gdkwindow.c (gdk_window_new): Set + WM_CLIENT_LEADER propertiy on all windows pointing + back to GDK's leader window. + Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 18c3e6bbf4..b0acd2f577 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,19 @@ +Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com> + + Patch from Felix Bellaby <felix@pooh.u-net.com> + + * gdk/gdk.c: Use XmbSetWMProperties to set + the class/command on the loader window so that the + client machine is also set in the same place. + (For X11R5 sesssion management compatibility) + + * gdk/gdk.c: (gdk_set_sm_client_id) Implementation + of function to set the session manager client ID. + + * gdk/gdkwindow.c (gdk_window_new): Set + WM_CLIENT_LEADER propertiy on all windows pointing + back to GDK's leader window. + Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 18c3e6bbf4..b0acd2f577 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,19 @@ +Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com> + + Patch from Felix Bellaby <felix@pooh.u-net.com> + + * gdk/gdk.c: Use XmbSetWMProperties to set + the class/command on the loader window so that the + client machine is also set in the same place. + (For X11R5 sesssion management compatibility) + + * gdk/gdk.c: (gdk_set_sm_client_id) Implementation + of function to set the session manager client ID. + + * gdk/gdkwindow.c (gdk_window_new): Set + WM_CLIENT_LEADER propertiy on all windows pointing + back to GDK's leader window. + Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 18c3e6bbf4..b0acd2f577 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,19 @@ +Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com> + + Patch from Felix Bellaby <felix@pooh.u-net.com> + + * gdk/gdk.c: Use XmbSetWMProperties to set + the class/command on the loader window so that the + client machine is also set in the same place. + (For X11R5 sesssion management compatibility) + + * gdk/gdk.c: (gdk_set_sm_client_id) Implementation + of function to set the session manager client ID. + + * gdk/gdkwindow.c (gdk_window_new): Set + WM_CLIENT_LEADER propertiy on all windows pointing + back to GDK's leader window. + Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 18c3e6bbf4..b0acd2f577 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,19 @@ +Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com> + + Patch from Felix Bellaby <felix@pooh.u-net.com> + + * gdk/gdk.c: Use XmbSetWMProperties to set + the class/command on the loader window so that the + client machine is also set in the same place. + (For X11R5 sesssion management compatibility) + + * gdk/gdk.c: (gdk_set_sm_client_id) Implementation + of function to set the session manager client ID. + + * gdk/gdkwindow.c (gdk_window_new): Set + WM_CLIENT_LEADER propertiy on all windows pointing + back to GDK's leader window. + Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap @@ -382,8 +382,9 @@ gdk_init (int *argc, gdk_progclass[0] = toupper (gdk_progclass[0]); } class_hint->res_class = gdk_progclass; - XSetClassHint(gdk_display, gdk_leader_window, class_hint); - XSetCommand(gdk_display, gdk_leader_window, argv_orig, argc_orig); + XmbSetWMProperties (gdk_display, gdk_leader_window, + NULL, NULL, argv_orig, argc_orig, + NULL, NULL, class_hint); XFree (class_hint); for (i = 0; i < argc_orig; i++) @@ -873,6 +874,43 @@ gdk_screen_height_mm (void) return return_val; } +/* + *-------------------------------------------------------------- + * gdk_set_sm_client_id + * + * Set the SM_CLIENT_ID property on the WM_CLIENT_LEADER window + * so that the window manager can save our state using the + * X11R6 ICCCM session management protocol. A NULL value should + * be set following disconnection from the session manager to + * remove the SM_CLIENT_ID property. + * + * Arguments: + * + * "sm_client_id" specifies the client id assigned to us by the + * session manager or NULL to remove the property. + * + * Results: + * + * Side effects: + * + *-------------------------------------------------------------- + */ + +void +gdk_set_sm_client_id (const gchar* sm_client_id) +{ + if (sm_client_id && strcmp (sm_client_id, "")) + { + XChangeProperty (gdk_display, gdk_leader_window, + gdk_atom_intern ("SM_CLIENT_ID", FALSE), + XA_STRING, 8, PropModeReplace, + sm_client_id, strlen(sm_client_id)); + } + else + XDeleteProperty (gdk_display, gdk_leader_window, + gdk_atom_intern ("SM_CLIENT_ID", FALSE)); +} + void gdk_key_repeat_disable (void) { diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index c0f34c12e4..d9c8f3eb0b 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -233,6 +233,8 @@ gdk_window_init (void) gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent); } +static GdkAtom wm_client_leader_atom = GDK_NONE; + GdkWindow* gdk_window_new (GdkWindow *parent, GdkWindowAttr *attributes, @@ -447,6 +449,14 @@ gdk_window_new (GdkWindow *parent, XSetWMHints (private->xdisplay, private->xwindow, &wm_hints); + if (!wm_client_leader_atom) + wm_client_leader_atom = gdk_atom_intern ("WM_CLIENT_LEADER", FALSE); + + XChangeProperty (private->xdisplay, private->xwindow, + wm_client_leader_atom, + XA_WINDOW, 32, PropModeReplace, + (guchar*) &gdk_leader_window, 1); + if (attributes_mask & GDK_WA_TITLE) title = attributes->title; else diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index da1a29b789..ea2a65aa24 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -382,8 +382,9 @@ gdk_init (int *argc, gdk_progclass[0] = toupper (gdk_progclass[0]); } class_hint->res_class = gdk_progclass; - XSetClassHint(gdk_display, gdk_leader_window, class_hint); - XSetCommand(gdk_display, gdk_leader_window, argv_orig, argc_orig); + XmbSetWMProperties (gdk_display, gdk_leader_window, + NULL, NULL, argv_orig, argc_orig, + NULL, NULL, class_hint); XFree (class_hint); for (i = 0; i < argc_orig; i++) @@ -873,6 +874,43 @@ gdk_screen_height_mm (void) return return_val; } +/* + *-------------------------------------------------------------- + * gdk_set_sm_client_id + * + * Set the SM_CLIENT_ID property on the WM_CLIENT_LEADER window + * so that the window manager can save our state using the + * X11R6 ICCCM session management protocol. A NULL value should + * be set following disconnection from the session manager to + * remove the SM_CLIENT_ID property. + * + * Arguments: + * + * "sm_client_id" specifies the client id assigned to us by the + * session manager or NULL to remove the property. + * + * Results: + * + * Side effects: + * + *-------------------------------------------------------------- + */ + +void +gdk_set_sm_client_id (const gchar* sm_client_id) +{ + if (sm_client_id && strcmp (sm_client_id, "")) + { + XChangeProperty (gdk_display, gdk_leader_window, + gdk_atom_intern ("SM_CLIENT_ID", FALSE), + XA_STRING, 8, PropModeReplace, + sm_client_id, strlen(sm_client_id)); + } + else + XDeleteProperty (gdk_display, gdk_leader_window, + gdk_atom_intern ("SM_CLIENT_ID", FALSE)); +} + void gdk_key_repeat_disable (void) { diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index c0f34c12e4..d9c8f3eb0b 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -233,6 +233,8 @@ gdk_window_init (void) gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent); } +static GdkAtom wm_client_leader_atom = GDK_NONE; + GdkWindow* gdk_window_new (GdkWindow *parent, GdkWindowAttr *attributes, @@ -447,6 +449,14 @@ gdk_window_new (GdkWindow *parent, XSetWMHints (private->xdisplay, private->xwindow, &wm_hints); + if (!wm_client_leader_atom) + wm_client_leader_atom = gdk_atom_intern ("WM_CLIENT_LEADER", FALSE); + + XChangeProperty (private->xdisplay, private->xwindow, + wm_client_leader_atom, + XA_WINDOW, 32, PropModeReplace, + (guchar*) &gdk_leader_window, 1); + if (attributes_mask & GDK_WA_TITLE) title = attributes->title; else |