I am working on the boots curses ui for over a month now. While developing curses UI I was faced with the challenge of handling the scenario when a terminal window is resized.
My first approach was to look out for some references on line. I looked out and in all the resources that I found nothing more than this was written -- ''Handle the SIGWINCH signal'' . So I went on to handle it. I wrote the function to handle and tried it on. But to my bad luck, it didn't work properly. The problem was that whenever curses was asked to create a new window it always created of a size on which it was initialized in the first place.
I tried to de-initialize and reinitialize curses, but that too didn't work.
I then tried to dig out some IRC channels where I could find some help. For this purpose I tried to contact weechat developer who seem to have solved this problem quite well. But from there also I was not able to receive much help. They told me the same line that I had seen before.
So as a last resort I tried to dig out code which had SIGWINCH handling stuff in the source of weechat. I have not been successful at this right now.
So for right now I have stopped the work on this and have removed limited SIGWINCH handling capabilities from curses ui for boots.
I would like to add this capability in curses UI in near future.
0 comments:
Post a Comment