mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-14 06:59:43 -05:00
xwm: add surface to rootston on surface commit
This commit is contained in:
parent
c666d34d2d
commit
a3f2754668
4 changed files with 56 additions and 19 deletions
|
|
@ -99,10 +99,10 @@ bool view_center(struct roots_view *view) {
|
|||
int width, height;
|
||||
wlr_output_effective_resolution(output, &width, &height);
|
||||
|
||||
view->x = (double)(width - size.width) / 2
|
||||
+ l_output->x;
|
||||
view->y = (double)(height - size.height) / 2
|
||||
+ l_output->y;
|
||||
double view_x = (double)(width - size.width) / 2 + l_output->x;
|
||||
double view_y = (double)(height - size.height) / 2 + l_output->y;
|
||||
|
||||
view_set_position(view, view_x, view_y);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue