diff --git a/compositor/shell/inspector.mbt b/compositor/shell/inspector.mbt index b98aff5..644d183 100644 --- a/compositor/shell/inspector.mbt +++ b/compositor/shell/inspector.mbt @@ -348,7 +348,6 @@ fn DesktopShell::render_inspector( let ty = 52 + (th - thumb) * first / max_scroll local.push(@ui.fill_rect(@ui.rect(dw - 8, 52, 3, th), p.border)) local.push(@ui.fill_rect(@ui.rect(dw - 8, ty, 3, thumb), p.accent)) - local.push(@ui.text(dw - 24 - 90, 34, "scroll for more", 11, p.foreground_muted)) } let scene_ops : Array[@scene.DrawOp] = [] translate(local, dx, dy, scene_ops) diff --git a/compositor/shell/shell.mbt b/compositor/shell/shell.mbt index 9f03be9..662fcac 100644 --- a/compositor/shell/shell.mbt +++ b/compositor/shell/shell.mbt @@ -682,6 +682,26 @@ pub fn DesktopShell::pointer_move(self : DesktopShell, x : Int, y : Int) -> Bool Some(w) => ignore(self.deliver(w, false, PointerMove(x - w.rect.x, y - w.rect.y))) None => () } + // Hover: the widget under the pointer sees moves, the one it left sees a leave. + let hovered = match self.widget_at(x, y) { + Some(w) if !self.popup_covers(x, y) => Some(w) + _ => None + } + let hslot = match hovered { + Some(w) => w.slot + None => "" + } + if hslot != self.hover_slot { + match self.widget_by_slot(self.hover_slot) { + Some(old) => ignore(self.deliver(old, false, PointerLeave)) + None => () + } + self.hover_slot = hslot + } + match hovered { + Some(w) => ignore(self.deliver(w, false, PointerMove(x - w.rect.x, y - w.rect.y))) + None => () + } let mut over = false for w in self.widgets.copy() { if w.popup_rect.w > 0 { diff --git a/compositor/sys/sys_stub.c b/compositor/sys/sys_stub.c index 2be095b..1e77b0b 100644 --- a/compositor/sys/sys_stub.c +++ b/compositor/sys/sys_stub.c @@ -381,7 +381,11 @@ int32_t mp_spawn(moonbit_bytes_t cmd_bytes, moonbit_bytes_t display_bytes) { if (pid < 0) return -1; if (pid == 0) { setsid(); - if (private_bus[0]) setenv("DBUS_SESSION_BUS_ADDRESS", private_bus, 1); + /* SIG_IGN survives exec; apps (e.g. terminals that wait() on a helper) need the default. */ + signal(SIGCHLD, SIG_DFL); + /* Flatpak apps reach the host (shell lookup, portals) through org.freedesktop.Flatpak + * on the real session bus, so they keep it; the sandbox isolates their instances anyway. */ + if (private_bus[0] && strstr(cmd, "flatpak run") == NULL) setenv("DBUS_SESSION_BUS_ADDRESS", private_bus, 1); setenv("WAYLAND_DISPLAY", display, 1); unsetenv("DISPLAY"); /* Make toolkits pick our Wayland socket, not X11 or the host session. */