nanogui: Mouse pointer does not change in FLTK + nxlib + nano-X


Previous by date: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Greg Haerr
Next by date: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Martin Kajdas
Previous in thread: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Greg Haerr
Next in thread: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Martin Kajdas

Subject: RE: [nanogui] Mouse pointer does not change in FLTK + nxlib + nano-X
From: "Martin Kajdas" ####@####.####
Date: 24 Feb 2006 16:56:15 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC22914DC@mkmail.MKPROD.COM>

I added more logging to the cursor functions in nxlib and the following sequence of calls occurs:

XCreateFontCursor   with shape=150
XLoadFont('cursor')  completing successfully (loading cursor.pcf.gz)
XCreateGlyphCursor (I believe this is implemented correctly) calls nxCreateCursor()
XRecolorCursor  (does not do anything in nxlib)
XDefineCursor
XFreeCursor

I believe the error is in implementation of XFreeCursor, which it is immediately called after XDefineCursor.
From the log it appears that the FLTK wants the cursor displayed by XDefineCursor until next XDefineCursor is called and the call to XFreeCursor should only clear the cursor associations (?) but still leave the cursor on screen.

The description of XFreeCursor() is:
XFreeCursor() deletes the association between the cursor ID and the specified cursor. The cursor storage is freed when all other clients have freed it. Windows with their cursor attribute set to this cursor will have this attribute set to None (which implies CopyFromParent). The specified cursor ID should not be referred to again.

The nxlib deletes the cursor right away and redraws the default one.

To prove this, I commented out the code in XFreeCrusor() and the cursor is WORKING CORRECTLY now. 

The question is: how to fix XFreeCrusor() properly so that the cursors are eventually destroyed (GrDestroyCrusor call in XFreeCursor)

Martin

Previous by date: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Greg Haerr
Next by date: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Martin Kajdas
Previous in thread: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Greg Haerr
Next in thread: 24 Feb 2006 16:56:15 +0000 Re: Mouse pointer does not change in FLTK + nxlib + nano-X, Martin Kajdas


Powered by ezmlm-browse 0.20.