Window *w; + WindowEvent e; + + e.we.place.select_method = method; + e.we.place.select_proc = process; + + + /* stop drawing mode if the window has been closed */ + w = FindWindowById(_thd.window_class, _thd.window_number); + if (w == NULL) { + ResetObjectToPlace(); + return; + } + + e.event = WE_CLICKDRAW; + e.we.place.pt = GetTileBelowCursor(); + + e.we.place.tile = TileVirtXY(_thd.selend.x, _thd.selend.y); + e.we.place.starttile = TileVirtXY(_thd.selstart.x, _thd.selstart.y); + w->wndproc(w, &e);