diff options
| -rw-r--r-- | TODO | 4 | ||||
| -rw-r--r-- | st.c | 21 |
2 files changed, 18 insertions, 7 deletions
| @@ -26,10 +26,6 @@ bugs | |||
| 26 | * fix rows and column definition in fixed geometry | 26 | * fix rows and column definition in fixed geometry |
| 27 | * fix -e handling | 27 | * fix -e handling |
| 28 | * remove DEC test sequence when appropriate | 28 | * remove DEC test sequence when appropriate |
| 29 | * When some application outputting long text is run in the shell init scripts, | ||
| 30 | then this text might be stripped to the standard 80x25 due to st running the | ||
| 31 | virtual terminal at first priority. Maybe the vt initialisation could be | ||
| 32 | moved somewhere after knowing the right window size. | ||
| 33 | 29 | ||
| 34 | misc | 30 | misc |
| 35 | ---- | 31 | ---- |
| @@ -3520,10 +3520,28 @@ resize(XEvent *e) { | |||
| 3520 | void | 3520 | void |
| 3521 | run(void) { | 3521 | run(void) { |
| 3522 | XEvent ev; | 3522 | XEvent ev; |
| 3523 | int w = xw.w, h = xw.h; | ||
| 3523 | fd_set rfd; | 3524 | fd_set rfd; |
| 3524 | int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0, dodraw = 0; | 3525 | int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0, dodraw = 0; |
| 3525 | struct timeval drawtimeout, *tv = NULL, now, last, lastblink; | 3526 | struct timeval drawtimeout, *tv = NULL, now, last, lastblink; |
| 3526 | 3527 | ||
| 3528 | /* Waiting for window mapping */ | ||
| 3529 | while(1) { | ||
| 3530 | XNextEvent(xw.dpy, &ev); | ||
| 3531 | if(ev.type == ConfigureNotify) { | ||
| 3532 | w = ev.xconfigure.width; | ||
| 3533 | h = ev.xconfigure.height; | ||
| 3534 | } else if(ev.type == MapNotify) { | ||
| 3535 | break; | ||
| 3536 | } | ||
| 3537 | } | ||
| 3538 | |||
| 3539 | if(!xw.isfixed) | ||
| 3540 | cresize(w, h); | ||
| 3541 | else | ||
| 3542 | cresize(xw.fw, xw.fh); | ||
| 3543 | ttynew(); | ||
| 3544 | |||
| 3527 | gettimeofday(&lastblink, NULL); | 3545 | gettimeofday(&lastblink, NULL); |
| 3528 | gettimeofday(&last, NULL); | 3546 | gettimeofday(&last, NULL); |
| 3529 | 3547 | ||
| @@ -3673,10 +3691,7 @@ run: | |||
| 3673 | XSetLocaleModifiers(""); | 3691 | XSetLocaleModifiers(""); |
| 3674 | tnew(80, 24); | 3692 | tnew(80, 24); |
| 3675 | xinit(); | 3693 | xinit(); |
| 3676 | ttynew(); | ||
| 3677 | selinit(); | 3694 | selinit(); |
| 3678 | if(xw.isfixed) | ||
| 3679 | cresize(xw.h, xw.w); | ||
| 3680 | run(); | 3695 | run(); |
| 3681 | 3696 | ||
| 3682 | return 0; | 3697 | return 0; |
