clbr / radeontop

GNU General Public License v3.0
804 stars 70 forks source link

Add support for resizeable terminals #41

Closed ismacasti closed 7 years ago

ismacasti commented 7 years ago

This is a small change to the ui code, that makes it adapt to resized terminals. It just listens to the ncurses signal to update the h, w and hw variables. It also paints the header every time.

Works quite well.

vedranmiletic commented 7 years ago

Tested on Fedora 24 with a Fiji card. Works well.

clbr commented 7 years ago

I tested in xterm, rxvt and mrxvt. In the first two it passes, but in mrxvt the VRAM bar gets drawn wrong, one char left to where it should be.

Pic: Imgur

Now, this may be a mrxvt bug, but I'd appreciate if you looked into this.

ismacasti commented 7 years ago

It seems mrxvt prints the cursor when resizing, ignoring ncurses' curs_set(0). It's probably a bug on mrxvt, but anyway, now I set the cursor at 0,0 before refreshing. That will just put a black character square at the beginning of the header. image

clbr commented 7 years ago

Thanks!