mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-23 06:59:44 -05:00
Update output layout when scale or transform changes
This commit is contained in:
parent
808ab5aa1b
commit
3b4b8953d9
11 changed files with 38 additions and 15 deletions
|
|
@ -453,11 +453,7 @@ static bool wlr_drm_connector_set_mode(struct wlr_output *output,
|
|||
|
||||
conn->state = WLR_DRM_CONN_CONNECTED;
|
||||
conn->output.current_mode = mode;
|
||||
if (conn->output.width != mode->width || conn->output.height != mode->height) {
|
||||
conn->output.width = mode->width;
|
||||
conn->output.height = mode->height;
|
||||
wl_signal_emit(&conn->output.events.resolution, &conn->output);
|
||||
}
|
||||
wlr_output_update_size(&conn->output, mode->width, mode->height);
|
||||
|
||||
// Since realloc_crtcs can deallocate planes on OTHER outputs,
|
||||
// we actually need to reinitalise any than has changed
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ static bool wlr_wl_output_set_custom_mode(struct wlr_output *_output,
|
|||
struct wlr_wl_backend_output *output = (struct wlr_wl_backend_output *)_output;
|
||||
wl_egl_window_resize(output->egl_window, width, height, 0, 0);
|
||||
wlr_output_update_size(&output->wlr_output, width, height);
|
||||
wl_signal_emit(&output->wlr_output.events.resolution, output);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +227,6 @@ static void xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *x
|
|||
// loop over states for maximized etc?
|
||||
wl_egl_window_resize(output->egl_window, width, height, 0, 0);
|
||||
wlr_output_update_size(&output->wlr_output, width, height);
|
||||
wl_signal_emit(&output->wlr_output.events.resolution, output);
|
||||
}
|
||||
|
||||
static void xdg_toplevel_handle_close(void *data, struct zxdg_toplevel_v6 *xdg_toplevel) {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ static bool handle_x11_event(struct wlr_x11_backend *x11, xcb_generic_event_t *e
|
|||
xcb_configure_notify_event_t *ev = (xcb_configure_notify_event_t *)event;
|
||||
|
||||
wlr_output_update_size(&output->wlr_output, ev->width, ev->height);
|
||||
wl_signal_emit(&output->wlr_output.events.resolution, output);
|
||||
|
||||
// Move the pointer to its new location
|
||||
xcb_query_pointer_cookie_t cookie =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue