FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 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-2017, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2017.2.15.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version