Apllied fullscreen patch to st 0.8.5
This commit is contained in:
parent
7fb0c0cc68
commit
2199b4d94d
@ -201,6 +201,8 @@ static Shortcut shortcuts[] = {
|
|||||||
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
||||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||||
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
||||||
|
{ XK_NO_MOD, XK_F11, fullscreen, {.i = 0} },
|
||||||
|
{ MODKEY, XK_Return, fullscreen, {.i = 0} },
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
1
st.h
1
st.h
@ -81,6 +81,7 @@ void die(const char *, ...);
|
|||||||
void redraw(void);
|
void redraw(void);
|
||||||
void draw(void);
|
void draw(void);
|
||||||
|
|
||||||
|
void fullscreen(const Arg *);
|
||||||
void printscreen(const Arg *);
|
void printscreen(const Arg *);
|
||||||
void printsel(const Arg *);
|
void printsel(const Arg *);
|
||||||
void sendbreak(const Arg *);
|
void sendbreak(const Arg *);
|
||||||
|
22
x.c
22
x.c
@ -94,6 +94,7 @@ typedef struct {
|
|||||||
Drawable buf;
|
Drawable buf;
|
||||||
GlyphFontSpec *specbuf; /* font spec buffer used for rendering */
|
GlyphFontSpec *specbuf; /* font spec buffer used for rendering */
|
||||||
Atom xembed, wmdeletewin, netwmname, netwmiconname, netwmpid;
|
Atom xembed, wmdeletewin, netwmname, netwmiconname, netwmpid;
|
||||||
|
Atom netwmstate, netwmfullscreen;
|
||||||
struct {
|
struct {
|
||||||
XIM xim;
|
XIM xim;
|
||||||
XIC xic;
|
XIC xic;
|
||||||
@ -744,6 +745,24 @@ xresize(int col, int row)
|
|||||||
xw.specbuf = xrealloc(xw.specbuf, col * sizeof(GlyphFontSpec));
|
xw.specbuf = xrealloc(xw.specbuf, col * sizeof(GlyphFontSpec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fullscreen(const Arg *arg)
|
||||||
|
{
|
||||||
|
XEvent ev;
|
||||||
|
|
||||||
|
memset(&ev, 0, sizeof(ev));
|
||||||
|
|
||||||
|
ev.xclient.type = ClientMessage;
|
||||||
|
ev.xclient.message_type = xw.netwmstate;
|
||||||
|
ev.xclient.display = xw.dpy;
|
||||||
|
ev.xclient.window = xw.win;
|
||||||
|
ev.xclient.format = 32;
|
||||||
|
ev.xclient.data.l[0] = 2; /* _NET_WM_STATE_TOGGLE */
|
||||||
|
ev.xclient.data.l[1] = xw.netwmfullscreen;
|
||||||
|
|
||||||
|
XSendEvent(xw.dpy, DefaultRootWindow(xw.dpy), False, SubstructureNotifyMask|SubstructureRedirectMask, &ev);
|
||||||
|
}
|
||||||
|
|
||||||
ushort
|
ushort
|
||||||
sixd_to_16bit(int x)
|
sixd_to_16bit(int x)
|
||||||
{
|
{
|
||||||
@ -1208,6 +1227,9 @@ xinit(int cols, int rows)
|
|||||||
XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32,
|
XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32,
|
||||||
PropModeReplace, (uchar *)&thispid, 1);
|
PropModeReplace, (uchar *)&thispid, 1);
|
||||||
|
|
||||||
|
xw.netwmstate = XInternAtom(xw.dpy, "_NET_WM_STATE", False);
|
||||||
|
xw.netwmfullscreen = XInternAtom(xw.dpy, "_NET_WM_STATE_FULLSCREEN", False);
|
||||||
|
|
||||||
win.mode = MODE_NUMLOCK;
|
win.mode = MODE_NUMLOCK;
|
||||||
resettitle();
|
resettitle();
|
||||||
xhints();
|
xhints();
|
||||||
|
Loading…
Reference in New Issue
Block a user