Commit 1adaa231 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

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.
parent 2aca4b0a
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> Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
......
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> Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
......
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> Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
......
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> Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
......
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> Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
......
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> Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
......
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> Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
......
...@@ -382,8 +382,9 @@ gdk_init (int *argc, ...@@ -382,8 +382,9 @@ gdk_init (int *argc,
gdk_progclass[0] = toupper (gdk_progclass[0]); gdk_progclass[0] = toupper (gdk_progclass[0]);
} }
class_hint->res_class = gdk_progclass; class_hint->res_class = gdk_progclass;
XSetClassHint(gdk_display, gdk_leader_window, class_hint); XmbSetWMProperties (gdk_display, gdk_leader_window,
XSetCommand(gdk_display, gdk_leader_window, argv_orig, argc_orig); NULL, NULL, argv_orig, argc_orig,
NULL, NULL, class_hint);
XFree (class_hint); XFree (class_hint);
for (i = 0; i < argc_orig; i++) for (i = 0; i < argc_orig; i++)
...@@ -873,6 +874,43 @@ gdk_screen_height_mm (void) ...@@ -873,6 +874,43 @@ gdk_screen_height_mm (void)
return return_val; 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 void
gdk_key_repeat_disable (void) gdk_key_repeat_disable (void)
{ {
......
...@@ -233,6 +233,8 @@ gdk_window_init (void) ...@@ -233,6 +233,8 @@ gdk_window_init (void)
gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent); gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent);
} }
static GdkAtom wm_client_leader_atom = GDK_NONE;
GdkWindow* GdkWindow*
gdk_window_new (GdkWindow *parent, gdk_window_new (GdkWindow *parent,
GdkWindowAttr *attributes, GdkWindowAttr *attributes,
...@@ -447,6 +449,14 @@ gdk_window_new (GdkWindow *parent, ...@@ -447,6 +449,14 @@ gdk_window_new (GdkWindow *parent,
XSetWMHints (private->xdisplay, private->xwindow, &wm_hints); 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) if (attributes_mask & GDK_WA_TITLE)
title = attributes->title; title = attributes->title;
else else
......
...@@ -382,8 +382,9 @@ gdk_init (int *argc, ...@@ -382,8 +382,9 @@ gdk_init (int *argc,
gdk_progclass[0] = toupper (gdk_progclass[0]); gdk_progclass[0] = toupper (gdk_progclass[0]);
} }
class_hint->res_class = gdk_progclass; class_hint->res_class = gdk_progclass;
XSetClassHint(gdk_display, gdk_leader_window, class_hint); XmbSetWMProperties (gdk_display, gdk_leader_window,
XSetCommand(gdk_display, gdk_leader_window, argv_orig, argc_orig); NULL, NULL, argv_orig, argc_orig,
NULL, NULL, class_hint);
XFree (class_hint); XFree (class_hint);
for (i = 0; i < argc_orig; i++) for (i = 0; i < argc_orig; i++)
...@@ -873,6 +874,43 @@ gdk_screen_height_mm (void) ...@@ -873,6 +874,43 @@ gdk_screen_height_mm (void)
return return_val; 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 void
gdk_key_repeat_disable (void) gdk_key_repeat_disable (void)
{ {
......
...@@ -233,6 +233,8 @@ gdk_window_init (void) ...@@ -233,6 +233,8 @@ gdk_window_init (void)
gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent); gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent);
} }
static GdkAtom wm_client_leader_atom = GDK_NONE;
GdkWindow* GdkWindow*
gdk_window_new (GdkWindow *parent, gdk_window_new (GdkWindow *parent,
GdkWindowAttr *attributes, GdkWindowAttr *attributes,
...@@ -447,6 +449,14 @@ gdk_window_new (GdkWindow *parent, ...@@ -447,6 +449,14 @@ gdk_window_new (GdkWindow *parent,
XSetWMHints (private->xdisplay, private->xwindow, &wm_hints); 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) if (attributes_mask & GDK_WA_TITLE)
title = attributes->title; title = attributes->title;
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment