mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-14 05:34:28 -04:00
backend/wayland: use request_state when toplevel is resized
This commit is contained in:
parent
666e92f15e
commit
5d8dd29d99
1 changed files with 11 additions and 2 deletions
|
|
@ -550,8 +550,17 @@ static void xdg_toplevel_handle_configure(void *data,
|
||||||
if (width == 0 || height == 0) {
|
if (width == 0 || height == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// loop over states for maximized etc?
|
if (width == output->wlr_output.width &&
|
||||||
output_set_custom_mode(&output->wlr_output, width, height, 0);
|
height == output->wlr_output.height) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct wlr_output_state state = {
|
||||||
|
.committed = WLR_OUTPUT_STATE_MODE,
|
||||||
|
.mode_type = WLR_OUTPUT_STATE_MODE_CUSTOM,
|
||||||
|
.custom_mode = { .width = width, .height = height },
|
||||||
|
};
|
||||||
|
wlr_output_send_request_state(&output->wlr_output, &state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xdg_toplevel_handle_close(void *data,
|
static void xdg_toplevel_handle_close(void *data,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue