mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Merge branch 'wlroots' into split-containers2
This commit is contained in:
commit
741e3959e3
14 changed files with 386 additions and 138 deletions
|
|
@ -18,10 +18,14 @@
|
|||
|
||||
struct sway_container root_container;
|
||||
|
||||
static void output_layout_change_notify(struct wl_listener *listener,
|
||||
static void output_layout_handle_change(struct wl_listener *listener,
|
||||
void *data) {
|
||||
struct wlr_box *layout_box = wlr_output_layout_get_box(
|
||||
root_container.sway_root->output_layout, NULL);
|
||||
struct wlr_output_layout *output_layout =
|
||||
root_container.sway_root->output_layout;
|
||||
const struct wlr_box *layout_box =
|
||||
wlr_output_layout_get_box(output_layout, NULL);
|
||||
root_container.x = layout_box->x;
|
||||
root_container.y = layout_box->y;
|
||||
root_container.width = layout_box->width;
|
||||
root_container.height = layout_box->height;
|
||||
|
||||
|
|
@ -33,8 +37,8 @@ static void output_layout_change_notify(struct wl_listener *listener,
|
|||
}
|
||||
struct sway_output *output = output_container->sway_output;
|
||||
|
||||
struct wlr_box *output_box = wlr_output_layout_get_box(
|
||||
root_container.sway_root->output_layout, output->wlr_output);
|
||||
const struct wlr_box *output_box =
|
||||
wlr_output_layout_get_box(output_layout, output->wlr_output);
|
||||
if (!output_box) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -74,7 +78,7 @@ void layout_init(void) {
|
|||
wl_signal_init(&root_container.sway_root->events.new_container);
|
||||
|
||||
root_container.sway_root->output_layout_change.notify =
|
||||
output_layout_change_notify;
|
||||
output_layout_handle_change;
|
||||
wl_signal_add(&root_container.sway_root->output_layout->events.change,
|
||||
&root_container.sway_root->output_layout_change);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue