bug-xboard
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-XBoard] Latest developments


From: h.g. muller
Subject: [Bug-XBoard] Latest developments
Date: Fri, 30 Mar 2012 00:11:10 +0100


Since the release of 4.6.0 there have been some bug reports in reaction to it, some of them sort of serious:

1) Installing an engine on Linux through the Load Engine dialog does not work when the engine is given as a path name: XBoard splits off the directory part to use it as an -fd command, but fails to prefix the excutable name with "./" , which in Linux is essential. 2) Loading a new engine loads it with all moves upto the end of the game, which is wrong if the currently displayed position was not the end of the game.
3) The clock problem reported by Byrial, which is at least partly fixed.
4) In WinBoard browsing for a save file from the Tournament Options dialog does not allow you to enter a non-existing file name. 5) Loading crazyhouse games from PGN does not work with legality testing off (pieces are not demoted on capture). 6) FRC castlings could be executed wrong when searching for a position (if king ends where rook starts). 7) Keyboard focus got stuck in the Filter field of the game list of XBoard, and could not be transferred back to the listbox by mouse clicks. 8) The last-used highlights stayed on when you swicthed off highlighting during an engine-engine game.
9) Switching to -ncp mode when loading an engine failed was flaky.
10) The new sweepSelection in EditPosition mode needed an accompanying hint in the message field, or users would not figure out how it worked. 11) Title-in-window no longer behaves sensible, with our much expanded menu bar: much larger board sizes will have to be merked as 'smallLayout' in the SIZE_DEFAULTS. (It is furthermore a pain that this depends only on square size, and not on board width; although most people play 8x8, in Crazyhouse the holdings make the board width effectively 12.)

I think that fixes for all this in themselfves already justify a 4.6.1. (Once they are all done, and in the 4.6.x branch, that is; currently I only fixed some of them, and the fixes are not even all in master yet.) The past week I have been mainly working on cleaning up the X11 front-end, since it seems it will be around somewhat longer. In particular I have been splitting up xboard.c and xoptions.c, moving all X11-free code that was in there to new source files dialogs.c, menus.c, board.c and system.c. Then I redid all dialog windows with the aid of the GenericPopUp, which moved some X11 code from xevalgraph.c, xgamelist.c, xengineoutput.c to xoptions.c (where it became part of GenericPopUp, making the power of this code available for general use). As a result so much X11-free code was created in the latter two of these x-files, that I split it off in new files ngamelist.c and nengineoutput.c.

All this refactoring also inspired me to do some improvements in the front-end. Some of these improvements might be eligible for inclusion in 4.6.0:

1) I learned how to do scrolling of the Game List under program control. This solves the (quite annoying) problem that using the arrow keys when the Game-List window has focus to step through the list, brings the selected line out of view, and only mouse action on the scroll bar could bring it back. (But even then you had to search for it...) 2) Operating X-scrollbars is very difficult for people without a middle mouse button; I developed a callback that enables use of the mode wheel (which I attached to the listbox). 3) I made some code to let <Tab> transfer focus to the next test-edit of the current dialog. 4) The TOPLEVEL compiler switch in 4.6.0 is no longer obeyed by the Move List window, as well as Tags and Comment popups. In fact, now the number of windows increases, it bcomes more and more annoying that they don't respond as a unit, and you have to open and close them individually. Put whatever your preference, it is plain wrong that Move List behaves different as Engine Output and Eval Graph. So in the refactored version I added an option -topLevel (and a control for it in the General Options dialog) which controls the behavior of the principal auxiliary windows (Game List, Move List, Engine Output, Eval Graph, Tags and Comment popup). I could do a similar change on 4.6.0 (basically this just replaces the compile-time #if TOPLEVEL by a run-time if(appdata.topLevel), where the default of the -topLevel option is then TOPLEVEL).

If there is going to be a 4.6.1, we should decide what of this we do want to have in.

In the mean time I am progressing with the cleanup / rewrite, making an attempt to let even the main window be generated by the GenericPopUp. I am nearly done with that, but have not yet started removing all the old code associated with creating the window from xboard.c. so at the moment you an have two boards, the original one and one that you can popup through an item in the file menu, which is generated by GenericPopUp. It is already fully functional as far as input is concerned (it comes with its own pull-down and pop-up menus), but all drawing currently goes only to the original board (except expose events on the mock-up).

If anyone is interested in having a look: it is in the 'refactor' branch of the hgm.nubati.net repository. This new way of doing things would make it almost trivial to pop up extra board windows for any purpose (e.g. variation board, observing many ICS games at once), although for some of those applications a stripped-down version of the board (without menu bar, or even wthout clocks) would probably do.

My own near-term plans are to finish the front-end refactoring by removing the old X11 code for creating the board and menus, so that only a minimal amount of X11 code, providing some very basic functions, is left (mostly in xoptions.c, plus the preparation of piece images and other gaphics in xboard.c). Then I want to port that minimal front-end to Android.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]