mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 11:46:31 +00:00
don't try to move outputs when its x,y hasn't change
when using wlr_output_layout_move() wlroots internally change the state of the output to manually configured and when updating the layout these outputs aren't ignored by wlroots, leaving us at our own
This commit is contained in:
parent
c8a9f63451
commit
ba7dcb2dea
1 changed files with 6 additions and 2 deletions
4
dwl.c
4
dwl.c
|
@ -1607,6 +1607,7 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test)
|
||||||
/* Then enable outputs that need to */
|
/* Then enable outputs that need to */
|
||||||
wl_list_for_each(config_head, &config->heads, link) {
|
wl_list_for_each(config_head, &config->heads, link) {
|
||||||
struct wlr_output *wlr_output = config_head->state.output;
|
struct wlr_output *wlr_output = config_head->state.output;
|
||||||
|
Monitor *m = wlr_output->data;
|
||||||
if (!config_head->state.enabled)
|
if (!config_head->state.enabled)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1619,6 +1620,9 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test)
|
||||||
config_head->state.custom_mode.height,
|
config_head->state.custom_mode.height,
|
||||||
config_head->state.custom_mode.refresh);
|
config_head->state.custom_mode.refresh);
|
||||||
|
|
||||||
|
/* Don't move monitors if position wouldn't change, this to avoid
|
||||||
|
* wlroots marking the output as manually configured */
|
||||||
|
if (m->m.x != config_head->state.x || m->m.y != config_head->state.y)
|
||||||
wlr_output_layout_move(output_layout, wlr_output,
|
wlr_output_layout_move(output_layout, wlr_output,
|
||||||
config_head->state.x, config_head->state.y);
|
config_head->state.x, config_head->state.y);
|
||||||
wlr_output_set_transform(wlr_output, config_head->state.transform);
|
wlr_output_set_transform(wlr_output, config_head->state.transform);
|
||||||
|
|
Loading…
Reference in a new issue