mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-20 06:47:19 -04:00
backend/wayland: handle subpixel
This commit is contained in:
parent
d37572486b
commit
7927cb1ecd
3 changed files with 12 additions and 2 deletions
|
|
@ -511,6 +511,7 @@ void surface_update(struct wlr_wl_output *output) {
|
|||
}
|
||||
|
||||
uint32_t scale = 1;
|
||||
enum wl_output_subpixel subpixel = WL_OUTPUT_SUBPIXEL_UNKNOWN;
|
||||
|
||||
struct wlr_wl_active_remote_output *active;
|
||||
wl_list_for_each(active, &output->active_remote_outputs, link) {
|
||||
|
|
@ -518,12 +519,18 @@ void surface_update(struct wlr_wl_output *output) {
|
|||
if (scale < output->scale) {
|
||||
scale = output->scale;
|
||||
}
|
||||
|
||||
if (output->subpixel != WL_OUTPUT_SUBPIXEL_UNKNOWN) {
|
||||
subpixel = output->subpixel;
|
||||
}
|
||||
}
|
||||
|
||||
struct wlr_output_state state = {
|
||||
.committed = WLR_OUTPUT_STATE_MODE | WLR_OUTPUT_STATE_SCALE,
|
||||
.committed = WLR_OUTPUT_STATE_MODE | WLR_OUTPUT_STATE_SCALE |
|
||||
WLR_OUTPUT_STATE_SUBPIXEL,
|
||||
.mode_type = WLR_OUTPUT_STATE_MODE_CUSTOM,
|
||||
.scale = scale,
|
||||
.subpixel = subpixel,
|
||||
.custom_mode = {
|
||||
.width = output->requested.width * scale,
|
||||
.height = output->requested.height * scale
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue