File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -369,17 +369,20 @@ static void implementation_grow_and_center_fullscreen(struct viv_view *view) {
369
369
}
370
370
371
371
int width = output -> wlr_output -> width ;
372
- if ((hints -> max_width > 0 ) && ((int ) hints -> max_width < width )) {
373
- width = hints -> max_width ;
374
- } else if ((hints -> min_width > 0 ) && ((int ) hints -> min_width > width )) {
375
- width = hints -> min_width ;
376
- }
377
-
378
372
int height = output -> wlr_output -> height ;
379
- if ((hints -> max_height > 0 ) && ((int ) hints -> max_height < height )) {
380
- height = hints -> max_height ;
381
- } else if ((hints -> min_height > 0 ) && ((int ) hints -> min_height > height )) {
382
- height = hints -> min_height ;
373
+
374
+ if (hints ) {
375
+ if ((hints -> max_width > 0 ) && ((int ) hints -> max_width < width )) {
376
+ width = hints -> max_width ;
377
+ } else if ((hints -> min_width > 0 ) && ((int ) hints -> min_width > width )) {
378
+ width = hints -> min_width ;
379
+ }
380
+
381
+ if ((hints -> max_height > 0 ) && ((int ) hints -> max_height < height )) {
382
+ height = hints -> max_height ;
383
+ } else if ((hints -> min_height > 0 ) && ((int ) hints -> min_height > height )) {
384
+ height = hints -> min_height ;
385
+ }
383
386
}
384
387
385
388
int x = (output -> wlr_output -> width - width ) / 2 ;
You can’t perform that action at this time.
0 commit comments