diff options
author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-09-08 12:24:13 -0500 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-02-13 13:14:29 -0600 |
commit | 23ede80f741d8452dbf223226974476ef8860541 (patch) | |
tree | 8c6c761d754b2d2316669ee54ad082baaa05e5cd /dwl.c | |
parent | f7d6a34cd98e3c090956c8a263a44972c3ffa05e (diff) |
allow configure x and y of outputs
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -194,6 +194,7 @@ typedef struct { float scale; const Layout *lt; enum wl_output_transform rr; + int x, y; } MonitorRule; typedef struct { @@ -908,6 +909,8 @@ createmon(struct wl_listener *listener, void *data) wlr_xcursor_manager_load(cursor_mgr, r->scale); m->lt[0] = m->lt[1] = r->lt; wlr_output_set_transform(wlr_output, r->rr); + m->m.x = r->x; + m->m.y = r->y; break; } } @@ -953,7 +956,10 @@ createmon(struct wl_listener *listener, void *data) * output (such as DPI, scale factor, manufacturer, etc). */ m->scene_output = wlr_scene_output_create(scene, wlr_output); - wlr_output_layout_add_auto(output_layout, wlr_output); + if (m->m.x < 0 || m->m.y < 0) + wlr_output_layout_add_auto(output_layout, wlr_output); + else + wlr_output_layout_add(output_layout, wlr_output, m->m.x, m->m.y); } void |