nanogui: Problem with event capture -- code added
Subject:
Re: [nanogui] Problem with event capture -- code added
From:
David Cullen ####@####.####
Date:
27 Sep 2005 14:00:28 +0100
Message-Id: <43394248.5070400@intergate.com>
Dear Amareesh,
amareesh wrote:
> I have a multithreaded application where Ive put the code for waiting
> for keys (using GrGetNextEvent()) in while loop in main().
>
> But problem is that it is not accepting key-events once the code/thread
> for making the screen finishes its task and context switches to main().
>
> However, any key pressed during the execution of the 'Drawing thread'
> can be captured successfully.
I believe your problem is that nano-X sets up a signal handler for
SIGTERM, so when your thread ends, it closes the graphics down. You can
look at the code in src/nanox/srvmain.c. Look for GsTerminate.
David