This is the mail archive of the
mailing list for the Cygwin XFree86 project.
Re: XWin design suggestion
I've read the follow-ups on this point with interest. Having sobered
up a bit I'll add another two penn'orth.
Harold L Hunt II <firstname.lastname@example.org> wrote in <3EB659BB.email@example.com>
in gmane.os.cygwin.xfree on Mon, 05 May 2003 08:31:55 -0400:
> Another way to handle this, and I think this may be the Windows
> standard, is to always center the Exit confirmation box on the screen.
> I may just implement that.
It might be better to centre on the XWin application window not on the
whole desktop, or as close as possible to this without letting the
pop-up box end up off-screen. (Which might happen if the user has
dragged the XWin window partially off-screen.)
I've always had positive responses from users when implementing
message and dialog boxes this way since it gives an additional visual
cue as to the application window with which the pop-up is associated.
If the XWin window is minimized to the taskbar/systray or is running
in full-screen mode, centre the pop-up on the primary display. (Or if
a switch is introduced to allow full-screen on a specific
multi-monitor display, then centre on that display.)
There is a little extra work involved in retrieving the display
geometry/geometries and checking for off-screen issues of course but
it does make the "user experience" (!) that much smoother.
> > Using .config file in users $HOME dir we can reduce dependency (so called vendor locking effect)
> > on MS-Win and also it will be like other *nix program.
> > Saving settings in a file will also make it easy for copying if there is lot of users and/or PC
> So, I am going to have to see a much better reason than avoiding using
> Windows features for using something other than the registry. Sure, we
> could use an XML config file... but that introduces another dependency
> on XML libraries, which I really don't want to have.
Hmmm. I agree that there's no point ignoring useful Windows features
such as the registry API where they're appropriate.
However, as a /Cygwin/ application and as a port of XFree86, one could
argue that XWin should behave in a POSIX fashion i.e. get its default
configuration from text files in /etc and user-specific ones in $HOME.
Apart from the mount table and cygrunsrv (which do so for obvious
reasons) I don't know of any "official" Cygwin package that stores its
configuration in the registry. (I may be wrong here - I've not checked
Traditionally Xfree86 uses /etc/X11/XF86Config for system-wide
settings so why not add a section there, perhaps after discussing it
with the rest of the XFree86 development bods?
Alternatively have a Cygwin-specific file, say, /etc/X11/Xcygwinrc and
a user-specific version $HOME/.Xcygwinrc.
Keep the format simple, maybe along the lines of OpenSSH with simple
"<keyword> <value>" pairs separated by newlines. A simple parser
shouldn't be too difficult to write or to snag from elsewhere, and the
file should be small enough to rewrite in its entirety when saving
changes from any GUI configuration utility. (You could use the Win32
INI-file API if you wanted a little more structure, although that
would force DOS line-endings.)
I think that it's preferable to have people using a text editor rather
than regedit if/when they do manual configuration and I'd prefer to
use normal POSIX tools (ex, sed, awk, grep, perl etc.) rather than the
riskier regtool method when automating configuration tasks.
Biju's point is also valid. It's nice to be able to just copy
c:\cygwin and the mount table to backup or duplicate a Cygwin
So now my head's cleared, I think I'd like to vote against using the
registry. Mind you, I realize that, the traditions of BWAM, this isn't
a democracy and you're entitled to code it however you please, Harold!
I'll add my thanks to Biju's to everyone involved in Cygwin/XFree86
development (and Cygwin itself, of course). I'd be paying through the
nose for Exceed or the like otherwise.