Browse Prior Art Database

Conditional Foreground Window Placement

IP.com Disclosure Number: IPCOM000114425D
Original Publication Date: 1994-Dec-01
Included in the Prior Art Database: 2005-Mar-28
Document File: 2 page(s) / 104K

Publishing Venue

IBM

Related People

Johnson, DK: AUTHOR [+4]

Abstract

Multitasking of applications is available in an OS/2* Presentation Manager* (PM) environment. With the advent of the desktop paradigm and the apparent simultaneous running of multiple applications, it is possible for an application that is running in the background to display a window or message box on top of the actively running application, disrupting the user's interactive session. This is one of the attributes of what is known as an ill-behaved application in PM.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Conditional Foreground Window Placement

      Multitasking of applications is available in an OS/2*
Presentation Manager* (PM) environment.  With the advent of the
desktop paradigm and the apparent simultaneous running of multiple
applications, it is possible for an application that is running in
the background to display a window or message box on top of the
actively running application, disrupting the user's interactive
session.  This is one of the attributes of what is known as an
ill-behaved application in PM.

      Examples of this behavior can be seen in many major IBM
products, including LAN NetView*.  In LAN NetView, message boxes are
sometimes displayed that are not the result of direct user
interaction, but instead are the result of some event that has
occurred in the system.  Even if LAN NetView is not the current
active application, the message boxes display at the top of the
glass, take the focus away from the current active application, and
become the active window themselves.

      The active application should not be disrupted by applications
running in the background.  Instead, any new window or message box
that an application has cause to display while running in the
background should be displayed in the screen z-order as the top
window in the background application collection of windows, but
behind all other windows for applications higher in the z-order than
the one displaying the window.  Since it is not displayed as the top
window on the screen, it should not become the desktop active window.
When the user next makes this application the active application, the
newly displayed window will be at the top of the screen and the user
can take whatever actions on it that are appropriate.

      The solution to the active application being disrupted by one
running in the background is to determine a conditional placement of
the newly created window, rather than always creating it as the
active windpw at the top of the screen.  This is most easily done on
the basis of process identification.

      The application about to display the window should first
determine the process it is in.  It should next query the currently
active window on the desktop.  If there is no active window, place
the newly created window at the topmost position in the z-order of
the desktop.  If there is an active window, and it has the same
process ID as the window just created, again place the newly created
window at the top of the screen.  These quick checks ensure that any
performance penalties caused by this technique are minimal when the
new window should be displayed as the active window.  This is
important, because in most instances this is the case.

      If neither of these cases exist, the application should
enumerate the z-order of all the windows on the desktop starting from
the topmost window, query the process ID of each, and compar...