mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
bug: fix view centering
This commit is contained in:
parent
11c1b811db
commit
19784360f1
8 changed files with 62 additions and 44 deletions
|
|
@ -68,14 +68,7 @@ static void handle_request_resize(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
static void handle_commit(struct wl_listener *listener, void *data) {
|
||||
struct roots_xdg_surface_v6 *roots_xdg_surface =
|
||||
wl_container_of(listener, roots_xdg_surface, commit);
|
||||
struct roots_view *view = roots_xdg_surface->view;
|
||||
|
||||
if (view->xdg_surface_v6->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL &&
|
||||
!roots_xdg_surface->initialized) {
|
||||
roots_xdg_surface->initialized = view_initialize(view);
|
||||
}
|
||||
// TODO is there anything we need to do here?
|
||||
}
|
||||
|
||||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||
|
|
@ -141,4 +134,6 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
|
|||
view->desktop = desktop;
|
||||
roots_surface->view = view;
|
||||
list_add(desktop->views, view);
|
||||
|
||||
view_initialize(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue