FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 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.

GTK Note

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-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version