| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
Arguments: window
This function makes the thread that created the specified window be the foreground thread, and selects the specified window. (The foreground thread is a Microsoft term and refers to the thread (typically an application) whose windows are currently in front, and one of which will have the keyboard focus.)
This function may be needed by multi-threaded Common Graphics applications because select-window or bring-window-to-front will not reliably move a window in front of windows that were created by other threads. We say "reliably" because these functions may do this in certain versions of Windows or in certain situations, but cannot be counted upon to do so.
Some versions of Windows allow only the current foreground thread or a thread created by the current foreground thread to set the foreground thread. In other cases, the taskbar icon corresponding to the specified window will be made to flash to notify the user that the window is asking to be brought to the foreground.
The function foreground-window returns the selected top-level window in Lisp only if Lisp is the currently-selected application.
See About using multiple threads in the IDE in cgide.htm.
set-foreground-window simply calls select-window, because there is no special provision for bringing a different thread to the front. In fact, most window managers will probably not allow you to programmatically move the focus from another application to yours.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |