mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Fix various rebase-related bugs
This commit is contained in:
parent
7f76f46318
commit
ed74f473d6
2 changed files with 252 additions and 212 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue