all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: emacs-devel@gnu.org
Cc: Julien Danjou <julien@danjou.info>
Subject: [PATCH 5/6] xsmfns: use pre-fetch SM_CLIENT_ID
Date: Wed, 10 Nov 2010 14:49:55 +0100	[thread overview]
Message-ID: <1289396996-26774-6-git-send-email-julien@danjou.info> (raw)
In-Reply-To: <1289396996-26774-1-git-send-email-julien@danjou.info>

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 src/ChangeLog |    5 +++++
 src/xsmfns.c  |    4 ++--
 src/xterm.c   |    3 ++-
 src/xterm.h   |    3 +++
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 13bb320..3975d8b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
 2010-11-10  Julien Danjou  <julien@danjou.info>
 
+	* xterm.h (x_display_info): Add SM_CLIENT_ID atom.
+
+	* xsmfns.c (create_client_leader_window): Use SM_CLIENT_ID atom
+	from dpyinfo.
+
 	* xterm.c (set_wm_state): Use x_send_client_event rather than
 	Fx_send_client_event, using Atom directly.
 	(x_ewmh_activate_frame): Ditto.
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 79dccfa..7b82fd4 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -410,8 +410,8 @@ create_client_leader_window (struct x_display_info *dpyinfo, char *client_id)
   XSetClassHint (dpyinfo->display, w, &class_hints);
   XStoreName (dpyinfo->display, w, class_hints.res_name);
 
-  sm_id = XInternAtom (dpyinfo->display, "SM_CLIENT_ID", False);
-  XChangeProperty (dpyinfo->display, w, sm_id, XA_STRING, 8, PropModeReplace,
+  XChangeProperty (dpyinfo->display, w, dpyinfo->Xatom_SM_CLIENT_ID,
+                   XA_STRING, 8, PropModeReplace,
                    (unsigned char *)client_id, strlen (client_id));
 
   dpyinfo->client_leader_window = w;
diff --git a/src/xterm.c b/src/xterm.c
index 36cbb12..e8a7d07 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10248,7 +10248,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
         "_NET_SUPPORTED",  &dpyinfo->Xatom_net_supported,
         "_NET_SUPPORTING_WM_CHECK", &dpyinfo->Xatom_net_supported,
         "_NET_WM_WINDOW_OPACITY", &dpyinfo->Xatom_net_wm_window_opacity,
-        "_NET_ACTIVE_WINDOW", &dpyinfo->Xatom_net_active_window
+        "_NET_ACTIVE_WINDOW", &dpyinfo->Xatom_net_active_window,
+        "SM_CLIENT_ID", &dpyinfo->Xatom_SM_CLIENT_ID
       };
 
     int i;
diff --git a/src/xterm.h b/src/xterm.h
index d9ed120..ed873e6 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -352,6 +352,9 @@ struct x_display_info
   Atom Xatom_net_wm_name, Xatom_net_wm_icon_name;
   /* Frame opacity */
   Atom Xatom_net_wm_window_opacity;
+
+  /* SM */
+  Atom Xatom_SM_CLIENT_ID;
 };
 
 #ifdef HAVE_X_I18N
-- 
1.7.2.3




  parent reply	other threads:[~2010-11-10 13:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 13:49 X atoms rework Julien Danjou
2010-11-10 13:49 ` [PATCH 1/6] xterm: store atoms in dpyinfo Julien Danjou
2010-11-10 13:49 ` [PATCH 2/6] xselect: split x_send_client_event to use Atom directly Julien Danjou
2010-11-10 13:49 ` [PATCH 3/6] xterm: use atoms in set_wm_state Julien Danjou
2010-11-10 13:49 ` [PATCH 4/6] xterm: get all atoms in one round-trip Julien Danjou
2010-11-10 13:49 ` Julien Danjou [this message]
2010-11-10 13:49 ` [PATCH 6/6] xsettings: prefetch atoms Julien Danjou
2010-11-10 17:19 ` X atoms rework Jan Djärv
2010-11-11  7:22 ` Jan D.
2010-11-11  8:22   ` Julien Danjou
2010-11-12  9:32 ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289396996-26774-6-git-send-email-julien@danjou.info \
    --to=julien@danjou.info \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.