Introduction
Introduction Statistics Contact Development Disclaimer Help
tCleaning up the fixed window size and the resizing of clients. - st - [fork] c…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit b1d383a0a344e35dad1064e129f70d52bddfd7b2
parent e02d72441ab6c1fba649ca65824b2d5dbb9db0f4
Author: Christoph Lohmann <[email protected]>
Date: Tue, 4 Sep 2012 22:44:33 +0200
Cleaning up the fixed window size and the resizing of clients.
Diffstat:
M st.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -841,6 +841,8 @@ ttyresize(int x, int y) {
w.ws_row = term.row;
w.ws_col = term.col;
+ w.ws_xpixel = xw.w;
+ w.ws_ypixel = xw.h;
w.ws_xpixel = w.ws_ypixel = 0;
if(ioctl(cmdfd, TIOCSWINSZ, &w) < 0)
fprintf(stderr, "Couldn't set window size: %s\n", SERRNO);
t@@ -1910,12 +1912,15 @@ xinit(void) {
xw.fx = sw + xw.fx - xw.fw - 1;
if(xw.fy < 0)
xw.fy = sh + xw.fy - xw.fh - 1;
+
+ xw.h = xw.fh;
+ xw.w = xw.fw;
} else {
/* window - default size */
xw.h = 2*BORDER + term.row * xw.ch;
xw.w = 2*BORDER + term.col * xw.cw;
- xw.fw = xw.w;
- xw.fh = xw.h;
+ xw.fx = 0;
+ xw.fy = 0;
}
/* font */
t@@ -1940,7 +1945,7 @@ xinit(void) {
parent = opt_embed ? strtol(opt_embed, NULL, 0) : XRootWindow(xw.dpy, …
xw.win = XCreateWindow(xw.dpy, parent, xw.fx, xw.fy,
- xw.fw, xw.fh, 0, XDefaultDepth(xw.dpy, xw.scr), InputO…
+ xw.w, xw.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOut…
XDefaultVisual(xw.dpy, xw.scr),
CWBackPixel | CWBorderPixel | CWBitGravity | CWEventMa…
| CWColormap,
t@@ -2254,8 +2259,8 @@ resize(XEvent *e) {
return;
if(tresize(col, row))
draw();
- ttyresize(col, row);
xresize(col, row);
+ ttyresize(col, row);
}
bool
t@@ -2310,6 +2315,7 @@ main(int argc, char *argv[]) {
unsigned int wr, hr;
xw.fw = xw.fh = xw.fx = xw.fy = 0;
+ xw.isfixed = False;
for(i = 1; i < argc; i++) {
switch(argv[i][0] != '-' || argv[i][2] ? -1 : argv[i][1]) {
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.