visibility: Forward panel height information to window creation

This commit is contained in:
Dorota Czaplejewicz
2022-01-30 16:19:57 +00:00
parent a4b67c65ff
commit 697be64418
5 changed files with 62 additions and 31 deletions

View File

@ -141,14 +141,12 @@ on_surface_configure(ServerContextService *self, PhoshLayerSurface *surface)
}
static void
make_window (ServerContextService *self, struct wl_output *output)
make_window (ServerContextService *self, struct wl_output *output, uint32_t height)
{
if (self->window) {
g_error("Window already present");
}
uint32_t height = squeek_uiman_get_perceptual_height(self->manager);
self->window = g_object_new (
PHOSH_TYPE_LAYER_SURFACE,
"layer-shell", squeek_wayland->layer_shell,
@ -204,10 +202,10 @@ make_widget (ServerContextService *self)
// Called from rust
void
server_context_service_real_show_keyboard (ServerContextService *self, struct wl_output *output)
server_context_service_real_show_keyboard (ServerContextService *self, struct wl_output *output, uint32_t height)
{
if (!self->window) {
make_window (self, output);
make_window (self, output, height);
}
if (!self->widget) {
make_widget (self);