@ -255,20 +255,20 @@ static void apply_container_state(struct sway_container *container,
// the container. This is important for fullscreen views which
// refuse to resize to the size of the output.
if ( view & & view - > surface ) {
if ( view - > surface- > current . width < container - > width) {
container - > surface_x = container - > c ontent_x +
( container - > c ontent_width - view - > surface- > current . width ) / 2 ;
if ( view - > geometry . width < container - > current. content_ width) {
container - > surface_x = container - > c urrent. c ontent_x +
( container - > c urrent. c ontent_width - view - > geometry . width ) / 2 ;
} else {
container - > surface_x = container - > c ontent_x;
container - > surface_x = container - > c urrent. c ontent_x;
}
if ( view - > surface- > current . height < container - > height) {
container - > surface_y = container - > c ontent_y +
( container - > c ontent_height - view - > surface- > current . height ) / 2 ;
if ( view - > geometry . height < container - > current. content_ height) {
container - > surface_y = container - > c urrent. c ontent_y +
( container - > c urrent. c ontent_height - view - > geometry . height ) / 2 ;
} else {
container - > surface_y = container - > c ontent_y;
container - > surface_y = container - > c urrent. c ontent_y;
}
container - > surface_width = view- > surface - > current . width;
container - > surface_height = view- > surface - > current . height;
container - > surface_width = container - > current . content_ width;
container - > surface_height = container - > current . content_ height;
}
if ( ! container - > node . destroying ) {