Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## foreground-window

Arguments:

This function returns the currently selected top-level window in this Lisp if this Lisp is the currently selected application, and otherwise returns `nil`. Returns the window even if it is in another thread of the same Lisp.

This function may be useful for determining whether this Lisp (either a development environment or standalone application) is the application that is currently selected by the user, by simply checking whether the return value is true.

Note that the expression

    (selected-window (screen *system*))

differs in that it will return the most recently selected top-level even when this Lisp is not the currently selected application. (See selected-window.)

See also set-foreground-window.

### GTK Note

foreground-window simply calls selected-window on the screen.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version