home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / VIDEO / WMTOP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  526 b   |  21 lines

  1. /* wmtop.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/winmgr.h>
  4. #include "winmgr2.h"
  5.  
  6. void wm_top (wm_handle wh)
  7. {
  8.   int i, idx;
  9.  
  10.   if (wh->used != WM_USED)
  11.     return;
  12.   idx = _wm_idx1 (wh);
  13.   if (idx < 0)
  14.     return;
  15.   for (i = idx; i+1 < _wm_count; ++i)
  16.     _wm_idx[i] = _wm_idx[i+1];
  17.   _wm_idx[_wm_count-1] = wh;
  18.   _wm_hide1 ();                                 /* Hide lower windows      */
  19.   _wm_put1 (wh);                                /* Restore window contents */
  20. }
  21.