SWI-Prolog 9.3.28 is ready for download. Mostly this fixes a lot of
the reported gui issues. In particular (might have forgotten some)
Thanks for all the reports and sorry for those I missed …
Make swipl-win window get focus on open.
Avoid flickering when moving between pulldown menus of the window
menu. This patch reduces flicker by building the window contents
before showing it and avoids focus flicker when moving between
pulldown menus by opening the next pulldown before closing the old.
Paste Unicode text in Windows version. That does not support
UTF-16, so it only handles characters up to uffff. Also fixes
history up/down with Unicode text. Paste into swipl running
in a Windows console still fails for non-ASCII text.
Properly track and restore window positions when using multiple
displays. All window positions are now managed relative to the
display on which the window is displayed.
Process keypad command keys when not in numlock mode. Somehow
SDL does not tell me the functions of these keys, so this uses
hard coded 7->home, 8->up, 0->page_up, etc.
Windows to handle multiple console windows (see popup menu of
the console).
Hopefully support Alt-Gr text input.
Various drawing details fixed for graphicals and widgets.
Fix the somewhat more relaxed threading support of xpce. This
caused a variety of crashes. As is, multiple Prolog threads
can use xpce, but only one can be “inside” xpce. The xpce
lock is released when a thread performs a call to Prolog.
I’ll be travelling and dealing with other projects for quite a while,
so further development will be slow.
Enjoy --- Jan
SWI-Prolog Changelog since version 9.3.27
FIXED: swipl-win: print backtrace on uncaught exceptions in Epilog.
FIXED: Simplification in 057d69387e240ebf90af8f9c9d5783c5203887fa
was wrong.
FIXED: #1384 message printing is disabled after an uncaught exception
inside a transation Assert and erase listen inconsistently to P_TRANSACT, causing a clause for user:thread_message_hook/3
to remain.
THEME: Support dark theme in selections in text objects.
Package xpce
FIXED: Establish platform dependent resource defaults. This notably
makes Apple keybindings default on MacOS.
ENHANCED: class terminal_image to use methods for copying This allows
for redefining terminal_image->copy.
FIXED: UTF8ToString() created a name for ASCII strings.
FIXED: Locking for Windows.
CLEANUP: Simplify and share locking code between Windows and POSIX
FIXED: Make all xpce stack related variables thread specific.
FIXED: Support multiple threads in xpce variable handling This patch
makes @arg1, etc. supporting multiple Prolog threads making progress.
FIXED: Possible variable block corruption in expression evaluation.
ADDED: Implement selection for class text.
FIXED: Feedback for class path selection when using dark theme.
FIXED: re-colour bitmaps to fore and background. Accessed @nil
as colour.
FIXED: Releasing and reacquire the xpce global lock. Caused incorrect
lock counts if the lock was held by another thread when called.
FIXED: Deadlock after new/2 fails due to module error.
BUG: Temporarily disabled library(pce_unclip). Getting this to work
requires changes due to modern restrictions of event grabbing.
CLEANUP: Track frame position relative to its display.
ADDED: Process keypad command keys when not in numlock mode.
ENHANCED: Draw window initial content before showing the window.
ENHANCED: When hovering a menu bar, first open the next popup before
closing the old. This avoids flickering the main window due to
regaining/loosing focus.
FIXED: Honour frame->input_focus if there is a subwindow that has
defined a keyboard_focus.
FIXED: Windows handling multiple epilog windows.
MODIFIED: Handle Alt-right (Alt-Gr) as possible text input.
In earlier versions of SWI emacs you could mouse-click at a point in a buffer and while holding the mouse button down, drag the mouse pointer past the bottom of the buffer. This would cause the buffer to scroll up thereby allowing the select region to be extended. In the current version this does not happen.
I guess that is one loss of the rather different way of event processing under SDL. Needs fixing, but might take quite a while. In the meanwhile, start a selection and use the Emacs ^F^B^N^P cursor movement. That extends the selection. So, to scroll down and select, start a selection and use ^N. It is also more pleasant
I guess a lot of the even processing eventually needs a little policing to get in sync with current conventions. What is there is mostly based on early 90s X11 conventions
Pushed several patches that improve selection and cursor movements by supporting Ctrl-left/right to move by word and Shift- to extend the selection. This used to work, but was broken due to rewrites in assigning keyboard input to actions. Shift-left-click now also extends the selection. This is typically more comfortable than that drag-scroll. Drag scrolling works to some extend on some platforms, but is still not what it should be.
Reporting often helps It would be great if people review GUI details such as key bindings and mouse handling, take a close look at which menu options are unclear/unneeded/missing and comment on the overall usability. I’m a lousy UI developer
Testing with LibBF for big integers indeed confirms this produces your hash. Fixing that is rather expensive. The issue is now documented and the test is extended to accept the LibBF hash.
I have just re-built all to give 9.3.28-28-g6c552159d-DIRTY but Ctrl-ledt arrow, Ctrl-right arrow do nothing and result in “Undefined“ appearing in the bottom left corner of the Emacs window. Also Shift-left mouse click not extending selection
Considering the -DIRTY, did you update the submodules? Whenever you pull swipl, always run
git submodule update --init
and make sure it actually does its job (i.e., the update is not blocked by some locally modified file or anything else). Simplest way to verify is by running git diff or git status. If any submodule is blocked, go into the submodule and run this, after verifying the changes do not contain anything you want to preserve. If there are local modifications you want to preserve, use git stash instead an re-apply the changes after the update.
I know. Eventually this will probably be fixed. As it typically works poorly IMO, it is not high priority. Note that Shift-click works, so if you want to select an large region, start a selection, scroll down and use Shift-click to set the end.
I do this, to ensure the latest updates to submodules, even if the changes haven’t been committed to the main module (the –recurse probably isn’t needed).