diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2011-09-16 18:21:48 +0200 |
---|---|---|
committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2011-09-16 18:21:48 +0200 |
commit | 5c6df8b3c361e36728e41d7c955d7faf375ef729 (patch) | |
tree | e833114aa33a99a354c1084309f8d65d73f9a929 | |
parent | 43a4c5ebb200b88dd32836aa784ea8ee2473af43 (diff) | |
download | st-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; | |||
268 | static char *opt_title = NULL; | 269 | static char *opt_title = NULL; |
269 | static char *opt_embed = NULL; | 270 | static char *opt_embed = NULL; |
270 | static char *opt_class = NULL; | 271 | static char *opt_class = NULL; |
271 | static Atom xembedatom; | ||
272 | 272 | ||
273 | int | 273 | int |
274 | utf8decode(char *s, long *u) { | 274 | utf8decode(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 | ||
1899 | void | 1899 | void |
1900 | cmessage(XEvent *e) { | 1900 | cmessage(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); |