mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-30 00:15:58 +01:00
Only center toplevel wl_shell views
This commit is contained in:
parent
3774d6c2c0
commit
e66e18f4de
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
|
||||||
wl_container_of(listener, roots_surface, surface_commit);
|
wl_container_of(listener, roots_surface, surface_commit);
|
||||||
struct roots_view *view = roots_surface->view;
|
struct roots_view *view = roots_surface->view;
|
||||||
|
|
||||||
if (!roots_surface->initialized) {
|
if (view->wl_shell_surface->state == WLR_WL_SHELL_SURFACE_STATE_TOPLEVEL &&
|
||||||
|
!roots_surface->initialized) {
|
||||||
bool centered = view_center(view);
|
bool centered = view_center(view);
|
||||||
if (centered) {
|
if (centered) {
|
||||||
roots_surface->initialized = true;
|
roots_surface->initialized = true;
|
||||||
|
|
Loading…
Reference in a new issue