mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
Add guard for changing the size of X11 backend windows
Events that set the window to either a width or height of zero are now ignored and logged.
This commit is contained in:
parent
55cca6deaa
commit
da79fef5f7
1 changed files with 10 additions and 4 deletions
|
@ -190,11 +190,17 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
|
||||||
|
|
||||||
void handle_x11_configure_notify(struct wlr_x11_output *output,
|
void handle_x11_configure_notify(struct wlr_x11_output *output,
|
||||||
xcb_configure_notify_event_t *ev) {
|
xcb_configure_notify_event_t *ev) {
|
||||||
|
// ignore events that set an invalid size:
|
||||||
|
if (ev->width > 0 && ev->height > 0) {
|
||||||
wlr_output_update_custom_mode(&output->wlr_output, ev->width,
|
wlr_output_update_custom_mode(&output->wlr_output, ev->width,
|
||||||
ev->height, output->wlr_output.refresh);
|
ev->height, output->wlr_output.refresh);
|
||||||
|
|
||||||
// Move the pointer to its new location
|
// Move the pointer to its new location
|
||||||
update_x11_pointer_position(output, output->x11->time);
|
update_x11_pointer_position(output, output->x11->time);
|
||||||
|
} else {
|
||||||
|
wlr_log(WLR_DEBUG,"Ignoring X11 configure event for height=%d, width=%d",
|
||||||
|
ev->width, ev->height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wlr_output_is_x11(struct wlr_output *wlr_output) {
|
bool wlr_output_is_x11(struct wlr_output *wlr_output) {
|
||||||
|
|
Loading…
Reference in a new issue