diff options
author | Sevz <leohdz172@protonmail.com> | 2022-03-10 10:11:17 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 10:11:17 -0600 |
commit | 2630664fefacc9e4c6a5a12de8b96a04657f3c5f (patch) | |
tree | 2ce1b3640e34a41ab6d073b61321214ffc1440d5 /dwl.c | |
parent | f85d8e79d09bb167f133fbaa40dd01bc3d3d26a3 (diff) | |
parent | 76b3756d1111031aacc044bf1c73a842d2226c6a (diff) |
Merge pull request #193 from fauxmight/chasing-wlroots
Chasing wlroots
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -36,6 +36,7 @@ #include <wlr/types/wlr_screencopy_v1.h> #include <wlr/types/wlr_server_decoration.h> #include <wlr/types/wlr_seat.h> +#include <wlr/types/wlr_subcompositor.h> #include <wlr/types/wlr_viewporter.h> #include <wlr/types/wlr_virtual_keyboard_v1.h> #include <wlr/types/wlr_xcursor_manager.h> @@ -863,7 +864,7 @@ createmon(struct wl_listener *listener, void *data) * output (such as DPI, scale factor, manufacturer, etc). */ wlr_output_layout_add(output_layout, wlr_output, r->x, r->y); - sgeom = *wlr_output_layout_get_box(output_layout, NULL); + wlr_output_layout_get_box(output_layout, NULL, &sgeom); /* When adding monitors, the geometries of all monitors must be updated */ wl_list_for_each(m, &mons, link) { @@ -2029,6 +2030,7 @@ setup(void) wlr_gamma_control_manager_v1_create(dpy); wlr_primary_selection_v1_device_manager_create(dpy); wlr_viewporter_create(dpy); + wlr_subcompositor_create(dpy); /* Initializes the interface used to implement urgency hints */ activation = wlr_xdg_activation_v1_create(dpy); @@ -2305,7 +2307,7 @@ updatemons(struct wl_listener *listener, void *data) struct wlr_output_configuration_v1 *config = wlr_output_configuration_v1_create(); Monitor *m; - sgeom = *wlr_output_layout_get_box(output_layout, NULL); + wlr_output_layout_get_box(output_layout, NULL, &sgeom); wl_list_for_each(m, &mons, link) { struct wlr_output_configuration_head_v1 *config_head = wlr_output_configuration_head_v1_create(config, m->wlr_output); @@ -2314,7 +2316,8 @@ updatemons(struct wl_listener *listener, void *data) /* TODO: move focus if selmon is disabled */ /* Get the effective monitor geometry to use for surfaces */ - m->m = m->w = *wlr_output_layout_get_box(output_layout, m->wlr_output); + wlr_output_layout_get_box(output_layout, m->wlr_output, &(m->m)); + wlr_output_layout_get_box(output_layout, m->wlr_output, &(m->w)); /* Calculate the effective monitor geometry to use for clients */ arrangelayers(m); /* Don't move clients to the left output when plugging monitors */ |