apply the latest patch from upstream
This commit is contained in:
parent
9326a22906
commit
2f9e589daa
8
st.c
8
st.c
|
@ -1945,7 +1945,15 @@ strhandle(void)
|
|||
case ']': /* OSC -- Operating System Command */
|
||||
switch (par) {
|
||||
case 0:
|
||||
if (narg > 1) {
|
||||
title();
|
||||
xseticontitle(strescseq.args[1]);
|
||||
}
|
||||
return;
|
||||
case 1:
|
||||
if (narg > 1)
|
||||
xseticontitle(strescseq.args[1]);
|
||||
return;
|
||||
case 2:
|
||||
if (narg > 1)
|
||||
title();
|
||||
|
|
1
win.h
1
win.h
|
@ -31,6 +31,7 @@ void xdrawline(Line, int, int, int);
|
|||
void xfinishdraw(void);
|
||||
void xloadcols(void);
|
||||
int xsetcolorname(int, const char *);
|
||||
void xseticontitle(char *);
|
||||
void xsettitle(char *);
|
||||
void title();
|
||||
int xsetcursor(int);
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
/* See LICENSE for license details. */
|
||||
|
||||
enum win_mode {
|
||||
MODE_VISIBLE = 1 << 0,
|
||||
MODE_FOCUSED = 1 << 1,
|
||||
MODE_APPKEYPAD = 1 << 2,
|
||||
MODE_MOUSEBTN = 1 << 3,
|
||||
MODE_MOUSEMOTION = 1 << 4,
|
||||
MODE_REVERSE = 1 << 5,
|
||||
MODE_KBDLOCK = 1 << 6,
|
||||
MODE_HIDE = 1 << 7,
|
||||
MODE_APPCURSOR = 1 << 8,
|
||||
MODE_MOUSESGR = 1 << 9,
|
||||
MODE_8BIT = 1 << 10,
|
||||
MODE_BLINK = 1 << 11,
|
||||
MODE_FBLINK = 1 << 12,
|
||||
MODE_FOCUS = 1 << 13,
|
||||
MODE_MOUSEX10 = 1 << 14,
|
||||
MODE_MOUSEMANY = 1 << 15,
|
||||
MODE_BRCKTPASTE = 1 << 16,
|
||||
MODE_NUMLOCK = 1 << 17,
|
||||
MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\
|
||||
|MODE_MOUSEMANY,
|
||||
MODE_KBDSELECT = 1 << 18,
|
||||
};
|
||||
|
||||
void xbell(void);
|
||||
void xclipcopy(void);
|
||||
void xdrawcursor(int, int, Glyph, int, int, Glyph, Line, int);
|
||||
void xdrawline(Line, int, int, int);
|
||||
void xfinishdraw(void);
|
||||
void xloadcols(void);
|
||||
int xsetcolorname(int, const char *);
|
||||
void xsettitle(char *);
|
||||
void title();
|
||||
int xsetcursor(int);
|
||||
void xsetmode(int, unsigned int);
|
||||
void xsetpointermotion(int);
|
||||
void xsetsel(char *);
|
||||
int xstartdraw(void);
|
||||
void toggle_winmode(int);
|
||||
void keyboard_select(const Arg *);
|
||||
void xximspot(int, int);
|
16
x.c
16
x.c
|
@ -96,7 +96,7 @@ typedef struct {
|
|||
Window win;
|
||||
Drawable buf;
|
||||
GlyphFontSpec *specbuf; /* font spec buffer used for rendering */
|
||||
Atom xembed, wmdeletewin, netwmname, netwmpid;
|
||||
Atom xembed, wmdeletewin, netwmname, netwmiconname, netwmpid;
|
||||
struct {
|
||||
XIM xim;
|
||||
XIC xic;
|
||||
|
@ -1342,6 +1342,7 @@ xinit(int cols, int rows)
|
|||
xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
|
||||
xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
|
||||
xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False);
|
||||
xw.netwmiconname = XInternAtom(xw.dpy, "_NET_WM_ICON_NAME", False);
|
||||
XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1);
|
||||
|
||||
xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False);
|
||||
|
@ -1777,6 +1778,19 @@ title()
|
|||
{
|
||||
xsettitle(opt_title);
|
||||
}
|
||||
void
|
||||
xseticontitle(char *p)
|
||||
{
|
||||
XTextProperty prop;
|
||||
DEFAULT(p, opt_title);
|
||||
|
||||
Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
|
||||
&prop);
|
||||
XSetWMIconName(xw.dpy, xw.win, &prop);
|
||||
XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmiconname);
|
||||
XFree(prop.value);
|
||||
}
|
||||
|
||||
void
|
||||
xsettitle(char *p)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue