+Mon Sep 30 15:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.c gdk/x11/gdkdisplay-x11.c
+ gdk/gdkinternals.h: Set the client ID on all
+ displays. (#85713)
+
+ * gdk/gdkdisplay.h gkd/gdkinternals.h
+ gdk/{linux-fb,win32,x11}/gdkmain-{fb,win32,x11}.c
+ Privatize gdk_display_set_sm_client_id().
+
Mon Sep 30 14:46:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Initialize
+Mon Sep 30 15:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.c gdk/x11/gdkdisplay-x11.c
+ gdk/gdkinternals.h: Set the client ID on all
+ displays. (#85713)
+
+ * gdk/gdkdisplay.h gkd/gdkinternals.h
+ gdk/{linux-fb,win32,x11}/gdkmain-{fb,win32,x11}.c
+ Privatize gdk_display_set_sm_client_id().
+
Mon Sep 30 14:46:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Initialize
+Mon Sep 30 15:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.c gdk/x11/gdkdisplay-x11.c
+ gdk/gdkinternals.h: Set the client ID on all
+ displays. (#85713)
+
+ * gdk/gdkdisplay.h gkd/gdkinternals.h
+ gdk/{linux-fb,win32,x11}/gdkmain-{fb,win32,x11}.c
+ Privatize gdk_display_set_sm_client_id().
+
Mon Sep 30 14:46:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Initialize
+Mon Sep 30 15:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.c gdk/x11/gdkdisplay-x11.c
+ gdk/gdkinternals.h: Set the client ID on all
+ displays. (#85713)
+
+ * gdk/gdkdisplay.h gkd/gdkinternals.h
+ gdk/{linux-fb,win32,x11}/gdkmain-{fb,win32,x11}.c
+ Privatize gdk_display_set_sm_client_id().
+
Mon Sep 30 14:46:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Initialize
+Mon Sep 30 15:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.c gdk/x11/gdkdisplay-x11.c
+ gdk/gdkinternals.h: Set the client ID on all
+ displays. (#85713)
+
+ * gdk/gdkdisplay.h gkd/gdkinternals.h
+ gdk/{linux-fb,win32,x11}/gdkmain-{fb,win32,x11}.c
+ Privatize gdk_display_set_sm_client_id().
+
Mon Sep 30 14:46:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Initialize
+Mon Sep 30 15:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.c gdk/x11/gdkdisplay-x11.c
+ gdk/gdkinternals.h: Set the client ID on all
+ displays. (#85713)
+
+ * gdk/gdkdisplay.h gkd/gdkinternals.h
+ gdk/{linux-fb,win32,x11}/gdkmain-{fb,win32,x11}.c
+ Privatize gdk_display_set_sm_client_id().
+
Mon Sep 30 14:46:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Initialize
static guint signals[LAST_SIGNAL] = { 0 };
static GObjectClass *parent_class;
+static char *gdk_sm_client_id;
GType
gdk_display_get_type (void)
void
gdk_set_sm_client_id (const gchar* sm_client_id)
{
- gdk_display_set_sm_client_id (gdk_display_get_default (), sm_client_id);
+ GSList *displays, *tmp_list;
+
+ g_free (gdk_sm_client_id);
+ gdk_sm_client_id = g_strdup (sm_client_id);
+
+ displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
+ for (tmp_list = displays; tmp_list; tmp_list = tmp_list->next)
+ _gdk_windowing_display_set_sm_client_id (tmp_list->data, sm_client_id);
+
+ g_slist_free (displays);
}
+/**
+ * _gdk_get_sm_client_id:
+ *
+ * Gets the client ID set with gdk_set_sm_client_id(), if any.
+ *
+ * Return value: Session ID, or %NULL if gdk_set_sm_client_id()
+ * has never been called.
+ **/
+const char *
+_gdk_get_sm_client_id (void)
+{
+ return gdk_sm_client_id;
+}
void gdk_display_set_double_click_time (GdkDisplay *display,
guint msec);
-void gdk_display_set_sm_client_id (GdkDisplay *display,
- const gchar *sm_client_id);
GdkDisplay *gdk_display_get_default (void);
void _gdk_screen_close (GdkScreen *screen);
+const char *_gdk_get_sm_client_id (void);
+
/*****************************************
* Interfaces provided by windowing code *
*****************************************/
gboolean recursing,
gboolean foreign_destroy);
+void _gdk_windowing_display_set_sm_client_id (GdkDisplay *display,
+ const gchar *sm_client_id);
+
/* Implementation types */
GType _gdk_window_impl_get_type (void) G_GNUC_CONST;
GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
return 0.5 + gdk_screen_height () * (25.4 / 72.);
}
-/*
- *--------------------------------------------------------------
- * gdk_display_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_display_set_sm_client_id (GdkDisplay* display,
- const gchar* sm_client_id)
+_gdk_windowing_display_set_sm_client_id (GdkDisplay* display,
+ const gchar* sm_client_id)
{
}
}
void
-gdk_display_set_sm_client_id (GdkDisplay *display,
- const gchar *sm_client_id)
+_gdk_windowing_display_set_sm_client_id (GdkDisplay *display,
+ const gchar *sm_client_id)
{
g_warning("gdk_set_sm_client_id %s", sm_client_id ? sm_client_id : "NULL");
}
GdkDisplayX11 *display_x11;
gint argc;
gchar **argv;
+ const char *sm_client_id;
XClassHint *class_hint;
XKeyboardState keyboard_state;
class_hint);
XFree (class_hint);
+ sm_client_id = _gdk_get_sm_client_id ();
+ if (sm_client_id)
+ _gdk_windowing_display_set_sm_client_id (display, sm_client_id);
+
pid = getpid ();
XChangeProperty (display_x11->xdisplay,
display_x11->leader_window,
display_x11->keyboard_xgrab_window = NULL;
}
-/**
- * gdk_display_set_sm_client_id:
- * @display: a #GdkDisplay
- * @sm_client_id: the client id assigned by the session manager when the
- * connection was opened, or %NULL to remove the property.
- *
- * Sets the <literal>SM_CLIENT_ID</literal> property on the application's leader window
- * so that the window manager can save the application's state using the X11R6 ICCCM
- * session management protocol.
- *
- * See the X Session Management Library documentation for more information on
- * session management and the Inter-Client Communication Conventions Manual
- * (ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
- * (Both documents are part of the X Window System distribution.)
- **/
void
-gdk_display_set_sm_client_id (GdkDisplay *display,
- const gchar *sm_client_id)
+_gdk_windowing_display_set_sm_client_id (GdkDisplay *display,
+ const gchar *sm_client_id)
{
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);