Always center fullscreen view on screen

This commit is contained in:
emersion 2017-11-21 10:14:50 +01:00
parent 17d9e2ce35
commit 9e29621ec3
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 21 additions and 0 deletions

View file

@ -53,6 +53,10 @@ static void view_update_output(const struct roots_view *view,
}
void view_move(struct roots_view *view, double x, double y) {
if (view->x == x && view->y == y) {
return;
}
struct wlr_box before;
view_get_box(view, &before);
if (view->move) {
@ -61,6 +65,7 @@ void view_move(struct roots_view *view, double x, double y) {
view->x = x;
view->y = y;
}
view_update_output(view, &before);
}
void view_activate(struct roots_view *view, bool activate) {