Unconstrain the IME popup when it appeared, resized, requested to

repositioned

- places the IME popup correctly.
- adjusts its position to considering the output (screen) rect.
  - offset if right edge overflows
  - flip vertically if bottom edge overflows
This commit is contained in:
KENZ 2026-04-25 07:10:18 +09:00 committed by Jacob Kauffmann
parent 7a10fb1cc8
commit 677be79635
3 changed files with 40 additions and 3 deletions

View file

@ -281,6 +281,10 @@ impl CompositorHandler for State {
if let Some(popup) = self.common.popups.find_popup(surface) {
xdg_popup_ensure_initial_configure(&popup);
// The IME popup need to be repositioned when the size changed
if let PopupKind::InputMethod(_) = popup {
shell.unconstrain_popup(&popup);
}
return;
}