nanogui: Return to text mode
Subject:
Re: [nanogui] Return to text mode
From:
"Greg Haerr" ####@####.####
Date:
25 Jul 2011 22:29:47 -0000
Message-Id: <3CD866E5219D4F29B080668107A647D0@winXP>
: when I use an Xlib program with NXlib I had the problem, that I could just
: return to text mode when pressing the ESC key. Selecting X of the window
: terminated the program but left the screen in SVGA mode and sent the
: following console output to that so it could not be read.
:
: So I enabled GrClose() in CLDisplay.c of NXlib and now I can return to
text
: mode from an Xlib application.
This was removed for some cases of which I can't remember. You
might enable this #ifdef MSDOS so that it only happens when not
running in a graphic environment.
:
: However, this does not work with FLTK yet. I can return to text mode from
an
: FLTK application by pressing ESC but not when selecting X from the window
or
: pressing a Quit button if the application offers that.
:
: What can I do so XCloseDisplay() in CLDisplay.c works just as well as
: pressing the ESC key?
I'm not quite sure yet what the bug is here. Try to find out whether
FLTK calls XCloseDisplay() or not, lets start from there.
:
: I also have a question regarding the mouse driver:
:
: The mou_dos.c driver has these functions:
: MOUSEDEVICE mousedev = {
: MOU_Open,
: MOU_Close,
: MOU_GetButtonInfo,
: MOU_GetDefaultAccel,
: MOU_Read,
: MOU_Poll
: };
:
: while the mou_x11.c driver has these functions:
: MOUSEDEVICE mousedev = {
: X11_Open,
: X11_Close,
: X11_GetButtonInfo,
: X11_GetDefaultAccel,
: X11_Read,
: NULL,
: MOUSE_NORMAL /* flags*/
: };
:
: Should I replace the "MOU_Poll" with "NULL,MOUSE_NORMAL" or will that make
: no difference?
The Poll entry point allows polling of the mouse driver when no
select() OS entry point is implemented, which I think is the case for
your DOS port. Is the DOS mouse working?
If you remove the MOU_Poll entry point then your driver will never be
called unless the GrSelect() routine (usually hanging in select()), returns
a mouse event, which then calls the MOU_Read routine. Otherwise,
the Poll routine is called, which internally checks for mouse input and
the Read routine is called from another procedure (IIRC GrSelect() #ifdef'd
for MSDOS)
Regards,
Greg