/* wmbacksp.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */

#include <sys/winmgr.h>
#include "winmgr2.h"

void wm_backsp (wm_handle wh, int count)
{
  if (wh->used != WM_USED)
    return;
  while (count > 0)
    {
      --count;
      if (wh->x <= 0)
        {
          if (wh->y > 0)
            {
              wh->x = wh->width - 1;
              --wh->y;
            }
        }
      else
        --wh->x;
    }
  _wm_cursor1 ();
}
