diff options
-rw-r--r-- | sway/config/output.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 73d62aff..26d40f3e 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -361,26 +361,6 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
361 | output->current_mode = wlr_output->pending.mode; | 361 | output->current_mode = wlr_output->pending.mode; |
362 | } | 362 | } |
363 | 363 | ||
364 | if (oc) { | ||
365 | enum scale_filter_mode scale_filter_old = output->scale_filter; | ||
366 | switch (oc->scale_filter) { | ||
367 | case SCALE_FILTER_DEFAULT: | ||
368 | case SCALE_FILTER_SMART: | ||
369 | output->scale_filter = ceilf(wlr_output->scale) == wlr_output->scale ? | ||
370 | SCALE_FILTER_NEAREST : SCALE_FILTER_LINEAR; | ||
371 | break; | ||
372 | case SCALE_FILTER_LINEAR: | ||
373 | case SCALE_FILTER_NEAREST: | ||
374 | output->scale_filter = oc->scale_filter; | ||
375 | break; | ||
376 | } | ||
377 | if (scale_filter_old != output->scale_filter) { | ||
378 | sway_log(SWAY_DEBUG, "Set %s scale_filter to %s", oc->name, | ||
379 | sway_output_scale_filter_to_string(output->scale_filter)); | ||
380 | output_damage_whole(output); | ||
381 | } | ||
382 | } | ||
383 | |||
384 | if (oc && (oc->subpixel != WL_OUTPUT_SUBPIXEL_UNKNOWN || config->reloading)) { | 364 | if (oc && (oc->subpixel != WL_OUTPUT_SUBPIXEL_UNKNOWN || config->reloading)) { |
385 | sway_log(SWAY_DEBUG, "Set %s subpixel to %s", oc->name, | 365 | sway_log(SWAY_DEBUG, "Set %s subpixel to %s", oc->name, |
386 | sway_wl_output_subpixel_to_string(oc->subpixel)); | 366 | sway_wl_output_subpixel_to_string(oc->subpixel)); |
@@ -416,6 +396,26 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
416 | return false; | 396 | return false; |
417 | } | 397 | } |
418 | 398 | ||
399 | if (oc) { | ||
400 | enum scale_filter_mode scale_filter_old = output->scale_filter; | ||
401 | switch (oc->scale_filter) { | ||
402 | case SCALE_FILTER_DEFAULT: | ||
403 | case SCALE_FILTER_SMART: | ||
404 | output->scale_filter = ceilf(wlr_output->scale) == wlr_output->scale ? | ||
405 | SCALE_FILTER_NEAREST : SCALE_FILTER_LINEAR; | ||
406 | break; | ||
407 | case SCALE_FILTER_LINEAR: | ||
408 | case SCALE_FILTER_NEAREST: | ||
409 | output->scale_filter = oc->scale_filter; | ||
410 | break; | ||
411 | } | ||
412 | if (scale_filter_old != output->scale_filter) { | ||
413 | sway_log(SWAY_DEBUG, "Set %s scale_filter to %s", oc->name, | ||
414 | sway_output_scale_filter_to_string(output->scale_filter)); | ||
415 | output_damage_whole(output); | ||
416 | } | ||
417 | } | ||
418 | |||
419 | // Find position for it | 419 | // Find position for it |
420 | if (oc && (oc->x != -1 || oc->y != -1)) { | 420 | if (oc && (oc->x != -1 || oc->y != -1)) { |
421 | sway_log(SWAY_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); | 421 | sway_log(SWAY_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); |