summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/display.c13
-rw-r--r--src/display.h3
-rw-r--r--src/view.c22
-rw-r--r--src/view.h5
4 files changed, 3 insertions, 40 deletions
diff --git a/src/display.c b/src/display.c
index 5b1be67..47b1b08 100644
--- a/src/display.c
+++ b/src/display.c
@@ -213,7 +213,7 @@ show_switcher(void)
y = guest_height / 2 + CURSOR_WIDTH;
TAILQ_FOREACH(v, &d->views, display_next) {
- view_set_position(v->thumb, x + v->tpos.x, y + v->tpos.y);
+ view_move(v->thumb, x + v->tpos.x, y + v->tpos.y);
v->thumb->visible = 1;
}
@@ -359,17 +359,6 @@ display_view_resize(struct view *v)
}
int
-display_view_move(struct view *v)
-{
- /* update thumbnail views */
- v->tpos.x = thumb_width * v->spos.x / v->buffer->desc.width;
- v->tpos.y = thumb_height * v->spos.y / v->buffer->desc.height;
-
- show_switcher();
- return 0;
-}
-
-int
display_view_show(struct view *v)
{
v->thumb->mapped = v->mapped;
diff --git a/src/display.h b/src/display.h
index 11407c2..8037f1d 100644
--- a/src/display.h
+++ b/src/display.h
@@ -106,9 +106,6 @@ int
display_view_resize(struct view *view);
int
-display_view_move(struct view *view);
-
-int
display_view_show(struct view *view);
int
diff --git a/src/view.c b/src/view.c
index 89b0bc4..7b3438e 100644
--- a/src/view.c
+++ b/src/view.c
@@ -333,32 +333,12 @@ view_set_viewport(struct view *v,
}
int
-view_set_position(struct view *v, int x, int y)
+view_move(struct view *v, int x, int y)
{
if (v->spos.x != x || v->spos.y != y) {
v->window->MoveTo(v->window, x, y);
v->spos.x = x;
v->spos.y = y;
-
- /* Notify display subsystem */
- if (!(v->flags & VIEW_FLAGS_THUMBNAIL))
- display_view_move(v);
- }
-
- return 0;
-}
-
-int
-view_translate(struct view *v, int dx, int dy)
-{
- if (dx != 0 || dy != 0) {
- v->window->Move(v->window, dx, dy);
- v->spos.x += dx;
- v->spos.y += dy;
-
- /* Notify display subsystem */
- if (!(v->flags & VIEW_FLAGS_THUMBNAIL))
- display_view_move(v);
}
return 0;
diff --git a/src/view.h b/src/view.h
index 06f1ee1..855dd79 100644
--- a/src/view.h
+++ b/src/view.h
@@ -99,10 +99,7 @@ view_set_viewport(struct view *v,
int force_refresh);
int
-view_set_position(struct view *v, int x, int y);
-
-int
-view_translate(struct view *v, int dx, int dy);
+view_move(struct view *v, int x, int y);
void
view_refresh(struct view *v);