feat(mirada): fullscreen iniciado por el cliente + HUD multi-salida
Dos remates de la tanda WM.
Fullscreen del cliente:
- BodyEvent::FullscreenRequest { id, fullscreen }. mirada-compositor
implementa XdgShellHandler::fullscreen_request / unfullscreen_request
y avisa al Cerebro; Desktop::on_event fija el fullscreen en el
escritorio que tiene la ventana. Así un reproductor o un juego que
llama a xdg set_fullscreen entra a pantalla completa solo.
HUD multi-salida (app mirada):
- El lienzo dibuja todas las salidas a escala (encaja su caja
envolvente en el lienzo fijo; con una salida, 1:1), cada una con su
marco y su número/escritorio. En simulación, Shift+n añade un monitor.
mirada-brain 63->65 tests.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@ use smithay::input::{Seat, SeatHandler, SeatState};
|
||||
use smithay::reexports::wayland_protocols::xdg::shell::server::xdg_toplevel;
|
||||
use smithay::reexports::wayland_server::backend::{ClientData, ClientId, DisconnectReason};
|
||||
use smithay::reexports::wayland_server::protocol::wl_buffer;
|
||||
use smithay::reexports::wayland_server::protocol::wl_output;
|
||||
use smithay::reexports::wayland_server::protocol::wl_seat;
|
||||
use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
|
||||
use smithay::reexports::wayland_server::{Client, Display, ListeningSocket};
|
||||
@@ -335,6 +336,32 @@ impl XdgShellHandler for App {
|
||||
}
|
||||
}
|
||||
|
||||
fn fullscreen_request(
|
||||
&mut self,
|
||||
surface: ToplevelSurface,
|
||||
_output: Option<wl_output::WlOutput>,
|
||||
) {
|
||||
let id = self
|
||||
.windows
|
||||
.iter()
|
||||
.find(|w| w.surface == *surface.wl_surface())
|
||||
.map(|w| w.id);
|
||||
if let Some(id) = id {
|
||||
self.brain_feed(BodyEvent::FullscreenRequest { id, fullscreen: true });
|
||||
}
|
||||
}
|
||||
|
||||
fn unfullscreen_request(&mut self, surface: ToplevelSurface) {
|
||||
let id = self
|
||||
.windows
|
||||
.iter()
|
||||
.find(|w| w.surface == *surface.wl_surface())
|
||||
.map(|w| w.id);
|
||||
if let Some(id) = id {
|
||||
self.brain_feed(BodyEvent::FullscreenRequest { id, fullscreen: false });
|
||||
}
|
||||
}
|
||||
|
||||
fn new_popup(&mut self, surface: PopupSurface, _positioner: PositionerState) {
|
||||
let _ = surface.send_configure();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user