aboutsummaryrefslogtreecommitdiff
path: root/rootston/desktop.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-11-01 08:57:30 -0400
committerDrew DeVault <sir@cmpwn.com>2017-11-01 08:57:30 -0400
commited74f473d60bb577aca9c7309664ae07d3ccf09b (patch)
treeae2c900b31bfd64b141268772211ff81e85e9dff /rootston/desktop.c
parent7f76f463181872f39356e5a4d6e2e34fd9a0a1bb (diff)
Fix various rebase-related bugs
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r--rootston/desktop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c
index f7f12eff..a724a40c 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -127,19 +127,21 @@ bool view_center(struct roots_view *view) {
int width, height;
wlr_output_effective_resolution(output, &width, &height);
- double view_x = (double)(width - size.width) / 2 + l_output->x;
- double view_y = (double)(height - size.height) / 2 + l_output->y;
+ double view_x = (double)(width - box.width) / 2 + l_output->x;
+ double view_y = (double)(height - box.height) / 2 + l_output->y;
view_set_position(view, view_x, view_y);
return true;
}
-void view_initialize(struct roots_view *view) {
+void view_setup(struct roots_view *view) {
struct roots_input *input = view->desktop->server->input;
view_center(view);
set_view_focus(input, view->desktop, view);
wlr_seat_keyboard_notify_enter(input->wl_seat, view->wlr_surface);
- view_update_output(view);
+ struct wlr_box before;
+ view_get_size(view, &before);
+ view_update_output(view, &before);
}
void view_teardown(struct roots_view *view) {