mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
bug: fix view centering
This commit is contained in:
parent
11c1b811db
commit
19784360f1
8 changed files with 62 additions and 44 deletions
|
|
@ -50,14 +50,7 @@ static void handle_request_resize(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
static void handle_surface_commit(struct wl_listener *listener, void *data) {
|
||||
struct roots_wl_shell_surface *roots_surface =
|
||||
wl_container_of(listener, roots_surface, surface_commit);
|
||||
struct roots_view *view = roots_surface->view;
|
||||
|
||||
if (view->wl_shell_surface->state == WLR_WL_SHELL_SURFACE_STATE_TOPLEVEL &&
|
||||
!roots_surface->initialized) {
|
||||
roots_surface->initialized = view_initialize(view);
|
||||
}
|
||||
// TODO do we need to do anything here?
|
||||
}
|
||||
|
||||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||
|
|
@ -137,4 +130,5 @@ void handle_wl_shell_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