[winGRASS] Re: [GRASS5] Windows native Xdriver
Mike Thomas
mthomas at gil.com.au
Wed May 1 19:59:44 EDT 2002
> I'm wondering if this code was meant to open "/dev/windows" instead.
>
> I've committed a change which uses /dev/windows. This works at first,
> but eventually XDRIVER dies. I'd appreciate feedback on what happens
> on NT/2K/XP, in case this is another Win9x bug.
As /dev doesn't exist on my computer, this wonn't work for me (and I suspect
many Cygwin users).
I found yesterday that I had to modify as follows to get the file to create
the file, but still have a problem with events not being processed until a
new display command is sent. Prior to this I was getting a -1 return.
int
XConnectionNumber(Display* display)
{
int fd;
NT_debug ("XConnectionNumber\n");
fd = open ("/tmp/windows", O_CREAT | O_RDWR | O_NONBLOCK, 0);
if ( -1 == fd ) {
NT_log ("XConnectionNumber unable to open /tmp/windows, errno = %d\n",
errno);
}
return ( fd );
}
> Note: nothing should actually be read from /dev/windows. The
> descriptor returned by XConnectionNumber() is passed to select(), in
> get_connection_sock(), and in Get_Xevent(). Both of these functions
> use select() to wait until either the monitor socket or the X
> connection become readable.
Does this effectively mean that the fd is not used at all?
Cheers
Mike Thomas.
>
> --
> Glynn Clements <glynn.clements at virgin.net>
> _______________________________________________
> winGRASS mailing list
> winGRASS at grass.itc.it
> http://grass.itc.it/mailman/listinfo/wingrass
More information about the grass-windows
mailing list