bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X and ncurses / getch() and X-keyevents


From: Thomas Dickey
Subject: Re: X and ncurses / getch() and X-keyevents
Date: Sat, 15 Feb 2003 15:36:47 -0500
User-agent: Mutt/1.3.27i

On Sat, Feb 15, 2003 at 09:06:43PM +0100, Thomas Zauner wrote:
> On Sat, 2003-02-15 at 20:42, Thomas Dickey wrote:
> > 
> > what window are you getting the X events from?  (that's probably not the
> > problem, but I'm curious).  More likely the problem is interfering select
> > calls in ncurses and the X library.
> > 
> > -- 
> > Thomas E. Dickey <address@hidden>
> > http://invisible-island.net
> > ftp://invisible-island.net
> > 
> > 
> 
> well that's really sth. i would like not  to tell (LOL) because i think it's 
> very poor. 
> 
> i start an xterm and my program within the xterm with a exec call like 
> execl("/usr/bin/xterm","-e","/PATH/MYPROG",NULL);  
> that way i make shure MYROG is really within an xterm.
> 
> then i connect to the X server and then get the window id from the 
> environement like  win_id=getenv("WINDOWID")  , i know i should not
> trust that and instead check the tree of all windows starting from the root 
> window but it's a lot more work.  
> 
> 
> i think it might be the event propagation that is in someway and only
> sometimes "wrong" but these thing are really hard to trace. 

well - I'm not sure what you are trying to accomplish.  But I think the
problem is that both ncurses and X's library perform blocking select
calls.  So depending on which one is active at any given instant, that
determines whether the event is detected immediately.  If it's only
the resizing that is needed, it's not needed to call X to find this.

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]