[hackers] [st] move xembedatom in XWindow struct, add link to xembed specs. || Aurélien Aptel

From: <hg_AT_suckless.org>
Date: Fri, 16 Sep 2011 18:24:19 +0200 (CEST)

changeset: 211:65f34fa802fd
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Fri Sep 16 18:21:48 2011 +0200
files: st.c
description:
move xembedatom in XWindow struct, add link to xembed specs.

diff -r 5079a55df883 -r 65f34fa802fd st.c
--- a/st.c Fri Sep 16 18:03:44 2011 +0200
+++ b/st.c Fri Sep 16 18:21:48 2011 +0200
@@ -124,6 +124,7 @@
         Colormap cmap;
         Window win;
         Pixmap buf;
+ Atom xembed;
         XIM xim;
         XIC xic;
         int scr;
@@ -268,7 +269,6 @@
 static char *opt_title = NULL;
 static char *opt_embed = NULL;
 static char *opt_class = NULL;
-static Atom xembedatom;
 
 int
 utf8decode(char *s, long *u) {
@@ -1671,7 +1671,7 @@
                 &(XColor){.red = 0xffff, .green = 0xffff, .blue = 0xffff},
                 &(XColor){.red = 0x0000, .green = 0x0000, .blue = 0x0000});
 
- xembedatom = XInternAtom(xw.dpy, "_XEMBED", False);
+ xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
 
         XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st");
         XMapWindow(xw.dpy, xw.win);
@@ -1898,7 +1898,9 @@
 
 void
 cmessage(XEvent *e) {
- if (e->xclient.message_type == xembedatom && e->xclient.format == 32) {
+ /* See xembed specs
+ http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html */
+ if (e->xclient.message_type == xw.xembed && e->xclient.format == 32) {
                 if (e->xclient.data.l[1] == XEMBED_FOCUS_IN) {
                         xw.state |= WIN_FOCUSED;
                         xseturgency(0);
Received on Fri Sep 16 2011 - 18:24:19 CEST

This archive was generated by hypermail 2.2.0 : Fri Sep 16 2011 - 18:36:06 CEST