wayland: surface: add show/hide functionality

While the keyboard is running, it may want to automatically show or hide
itself depending on whether a text input is active. Add functions to
show and hide the surface by destroying and re-creating it.

Phosh's compositor, phoc, does not emit configure events in reaction to
a surface being committed with no buffer attached. The complicated
surface creation/destruction process is for compatibility with phoc.
This commit is contained in:
Richard Acayan 2024-07-24 21:33:46 -04:00
parent 53f4daedc0
commit b5d09e655b
3 changed files with 96 additions and 35 deletions

View file

@ -68,7 +68,7 @@ impl Dispatcher {
};
let disp = Surface::new(queue.clone(),
&shm, &compositor, &layer_shell,
&shm, compositor, layer_shell,
frac_scale_man, vper, 185)?;
let gfx = Graphics::new(disp);
let gfx = Mutex::new(gfx);