diff options
| author | Quentin Carbonneaux | 2014-08-25 12:32:37 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-08-25 12:32:37 -0400 |
| commit | b7113d57cb7e1e6463c9156be3a703d1e5d7498a (patch) | |
| tree | 74d6fa63d4e3b9e08ffc6fe39790ec9f2c541c3e | |
| parent | d06b27f1e96ff2f2576f2972d59ea5115c0457bb (diff) | |
start cursor support in win module
| -rw-r--r-- | win.c | 17 | ||||
| -rw-r--r-- | win.h | 1 |
2 files changed, 18 insertions, 0 deletions
@@ -147,6 +147,23 @@ win_locus(int x1, int y1, unsigned *pos) return w; } +/* win_resize - Resize or move a window to the specified + * location. The upper-left corner of the window is what + * moves to the passed coordinates. + */ +void +win_resize(W *w, int x, int y) +{ + W *dwin; + + if (w == &tag.win) { + if (y > w->gr.y) + tag.owner->rev = 0; + move(w, w->gr.x, y, w->gr.w, fheight - y); + return; + } +} + /* win_resize_frame - Called when the whole frame * is resized. */ @@ -36,6 +36,7 @@ void win_init(struct gui *g); W *win_new(EBuf *eb); void win_delete(W *); W *win_locus(int, int, unsigned *); +void win_resize(W *, int x, int y); void win_resize_frame(int w, int h); void win_redraw_frame(void); void win_scroll(W *, int); |
