On Fri, 29 Jul 2005, David Tweed wrote:

> On Thu, 28 Jul 2005, Tuomo Valkonen wrote:
> 
> > Just some minor fixes and improvements here in this early august
> > snapshot.
> 
> Has there been some change in the interpretation of _NET_ACTIVE_WINDOW,
> and if so, is it deliberate?
> 
> I have a program which uses this to request that a given one of its
> windows become the active window in its frame and then calls a function to
> move the pointer to the centre of the window (the warpPointerTo() call at
> the end). On ion-3ds-20050607 I've got this working ok (through trial &
> error rather than understanding too much about how X does things :-S ),
> whilst on this latest version it seems to find the frame containing the
> desired window ok (as evidenced by the warpPointerTo() call moving the
> mouse pointer to where it'd be expected to be) but it doesn't actually
> make that window the active one in the frame but keeps the one previously
> active (ie, no change).

Ok, just tried this with a window on a floating split such that the window
it desired to raise was obscured. This time the mouse pointer moves to the
centre of where the target window was via warpPointerTo but the
floating-split frame doesn't raise itself (which again it used to do). So
I think I was wrong that ion-3ds-20050607 finds the frame ok; I think that
it just manages to warp the pointer to the correct place on the screen,
and in the case where that point happens to be within a frame that's
visible on screen it causes that frame to become focussed (which is what
lead me to think that Ion was finding the frame but not "raising" the 
window).


On the off-chance it matters, definition is

void
warpPointerTo(MouseTerminal *w,int x,int y)
{
  XWarpPointer(fl_display,None,fl_xid(w),0,0,0,0,x,y);
}

-- 
__cheers, dave____________________________________________
homepages.inf.ed.ac.uk/dtweed/       tel: +44 131 651 3447
JCMB, Kings Buildings, Edinburgh     fax: +44 131 651 3435
X wrote a book about this, which Y was carrying around for
a long time with little discernible effect -- John Baez

Reply via email to