// remnants

// commands.cc

/*
#define CClose(sw) WinCmd (sw, C_CLOSE)
#define CMax(sw) WinCmd (sw, C_MAX)
#define CHide(sw) WinCmd (sw, C_HIDE)
#define CSwitchTo(sw) WinCmd (sw, C_SWITCH_TO)

why it shouldn't go this way?
(inherited constructor)

struct WinCmd: Cmd
{
	SWindow *sw;
	WinCmd (SWindow *);
	exec ();
};

struct CMax:     WinCmd { exec (); };
struct CRestore: WinCmd { exec (); };
struct CHide:    WinCmd { exec (); };
struct CClose:   WinCmd { exec (); };
*/


// if only it were possible: next_line () = get_next_shell_line ();
// and/or next_line () = get_next_source_line (); i would
// not need the modes etc.; the next_line (pointer to function)
// would be firmly set switch ("jump to the given memory address")


// waitfor (anim);

/*
  // "l, r, t, b" may have changed (e. g. with the change of name,
  // in case this was called from "handlePropertyNotify"), so repeat
  // maximization
  ll = l; rr = r; tt = t; bb = b;

  t = d->y - a->y;
  b = d->y + d->ht - (a->y + a->ht);
  l = d->x - a->x;
  r = d->x + d->wd - (a->x + a->wd);
*/


      // if the USPosition/PPosition was specified, or the window is a
      // transient, or it starts iconic -- place it where requested
      // (don't do anything)
      /*
	if (d->wd <= disp_wd)
	{
	if (d->x + d->wd > disp_wd)
	d->x = disp_wd - d->wd;

	if (d->x < 0)
	d->x = 0;
	};

	if (d->ht <= disp_ht)
	{
	if (d->y + d->ht > disp_ht)
	d->y = disp_ht - d->ht;

	if (d->y < 0)
	d->y = 0;
	};
    
	d_to_a ();
	update ();
      */

SWindow::a_to_d ()
{
  d->x = a->x - l;// - fbw;
  d->y = a->y - t;// - fbw;
  d->wd = a->wd + l + r;// + 2*fbw;
  d->ht = a->ht + t + b;// + 2*fbw;
};

