mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-16 06:59:44 -05:00
Always center fullscreen view on screen
This commit is contained in:
parent
17d9e2ce35
commit
9e29621ec3
2 changed files with 21 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue