diff options
| -rw-r--r-- | st.c | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -245,7 +245,7 @@ static char *getseltext() { | |||
| 245 | ptr = str = malloc (sz); | 245 | ptr = str = malloc (sz); |
| 246 | for(y = 0; y < term.row; y++) { | 246 | for(y = 0; y < term.row; y++) { |
| 247 | for(x = 0; x < term.col; x++) { | 247 | for(x = 0; x < term.col; x++) { |
| 248 | if(term.line[y][x].c && (ls=selected(x, y))) { | 248 | if(term.line[y][x].state & GLYPH_SET && (ls=selected(x, y))) { |
| 249 | *ptr = term.line[y][x].c; | 249 | *ptr = term.line[y][x].c; |
| 250 | ptr++; | 250 | ptr++; |
| 251 | } | 251 | } |
| @@ -1421,11 +1421,9 @@ resize(XEvent *e) { | |||
| 1421 | row = xw.bufh / xw.ch; | 1421 | row = xw.bufh / xw.ch; |
| 1422 | tresize(col, row); | 1422 | tresize(col, row); |
| 1423 | ttyresize(col, row); | 1423 | ttyresize(col, row); |
| 1424 | xw.bufh = MAX(1, xw.bufh); | ||
| 1425 | xw.bufw = MAX(1, xw.bufw); | ||
| 1424 | XFreePixmap(xw.dis, xw.buf); | 1426 | XFreePixmap(xw.dis, xw.buf); |
| 1425 | if(xw.bufh<1) | ||
| 1426 | xw.bufh = 1; | ||
| 1427 | if(xw.bufw<1) | ||
| 1428 | xw.bufw = 1; | ||
| 1429 | xw.buf = XCreatePixmap(xw.dis, xw.win, xw.bufw, xw.bufh, XDefaultDepth(xw.dis, xw.scr)); | 1427 | xw.buf = XCreatePixmap(xw.dis, xw.win, xw.bufw, xw.bufh, XDefaultDepth(xw.dis, xw.scr)); |
| 1430 | draw(SCREEN_REDRAW); | 1428 | draw(SCREEN_REDRAW); |
| 1431 | } | 1429 | } |
| @@ -1435,7 +1433,9 @@ run(void) { | |||
| 1435 | XEvent ev; | 1433 | XEvent ev; |
| 1436 | fd_set rfd; | 1434 | fd_set rfd; |
| 1437 | int xfd = XConnectionNumber(xw.dis); | 1435 | int xfd = XConnectionNumber(xw.dis); |
| 1438 | long mask = ExposureMask | KeyPressMask | StructureNotifyMask | FocusChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask; | 1436 | long mask = ExposureMask | KeyPressMask | StructureNotifyMask |
| 1437 | | FocusChangeMask | PointerMotionMask | ButtonPressMask | ||
| 1438 | | ButtonReleaseMask; | ||
| 1439 | 1439 | ||
| 1440 | XSelectInput(xw.dis, xw.win, mask); | 1440 | XSelectInput(xw.dis, xw.win, mask); |
| 1441 | XResizeWindow(xw.dis, xw.win, xw.w, xw.h); /* XXX: fix resize bug in wmii (?) */ | 1441 | XResizeWindow(xw.dis, xw.win, xw.w, xw.h); /* XXX: fix resize bug in wmii (?) */ |
