aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2011-09-16 18:21:48 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2011-09-16 18:21:48 +0200
commit5c6df8b3c361e36728e41d7c955d7faf375ef729 (patch)
treee833114aa33a99a354c1084309f8d65d73f9a929
parent43a4c5ebb200b88dd32836aa784ea8ee2473af43 (diff)
downloadst-patched-5c6df8b3c361e36728e41d7c955d7faf375ef729.tar.bz2
st-patched-5c6df8b3c361e36728e41d7c955d7faf375ef729.tar.xz
st-patched-5c6df8b3c361e36728e41d7c955d7faf375ef729.zip
move xembedatom in XWindow struct, add link to xembed specs.
-rw-r--r--st.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/st.c b/st.c
index 6f292ba..7ac02b9 100644
--- a/st.c
+++ b/st.c
@@ -124,6 +124,7 @@ typedef struct {
124 Colormap cmap; 124 Colormap cmap;
125 Window win; 125 Window win;
126 Pixmap buf; 126 Pixmap buf;
127 Atom xembed;
127 XIM xim; 128 XIM xim;
128 XIC xic; 129 XIC xic;
129 int scr; 130 int scr;
@@ -268,7 +269,6 @@ static char **opt_cmd = NULL;
268static char *opt_title = NULL; 269static char *opt_title = NULL;
269static char *opt_embed = NULL; 270static char *opt_embed = NULL;
270static char *opt_class = NULL; 271static char *opt_class = NULL;
271static Atom xembedatom;
272 272
273int 273int
274utf8decode(char *s, long *u) { 274utf8decode(char *s, long *u) {
@@ -1671,7 +1671,7 @@ xinit(void) {
1671 &(XColor){.red = 0xffff, .green = 0xffff, .blue = 0xffff}, 1671 &(XColor){.red = 0xffff, .green = 0xffff, .blue = 0xffff},
1672 &(XColor){.red = 0x0000, .green = 0x0000, .blue = 0x0000}); 1672 &(XColor){.red = 0x0000, .green = 0x0000, .blue = 0x0000});
1673 1673
1674 xembedatom = XInternAtom(xw.dpy, "_XEMBED", False); 1674 xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
1675 1675
1676 XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st"); 1676 XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st");
1677 XMapWindow(xw.dpy, xw.win); 1677 XMapWindow(xw.dpy, xw.win);
@@ -1898,7 +1898,9 @@ kpress(XEvent *ev) {
1898 1898
1899void 1899void
1900cmessage(XEvent *e) { 1900cmessage(XEvent *e) {
1901 if (e->xclient.message_type == xembedatom && e->xclient.format == 32) { 1901 /* See xembed specs
1902 http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html */
1903 if (e->xclient.message_type == xw.xembed && e->xclient.format == 32) {
1902 if (e->xclient.data.l[1] == XEMBED_FOCUS_IN) { 1904 if (e->xclient.data.l[1] == XEMBED_FOCUS_IN) {
1903 xw.state |= WIN_FOCUSED; 1905 xw.state |= WIN_FOCUSED;
1904 xseturgency(0); 1906 xseturgency(0);