mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-29 14:12:24 +03:00
feat: media bitrate control, HDR (#346)
Fixes: #335 Still a work-in-progress. --------- Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Wanjohi <elviswanjohi47@gmail.com>
This commit is contained in:
co-authored by
DatCaptainHorse
Claude Opus 5
Wanjohi
parent
1c721962f4
commit
0811f57f1a
@@ -11,6 +11,7 @@ use smithay::desktop::Window;
|
||||
use smithay::input::pointer::{CursorImageStatus, PointerHandle};
|
||||
use smithay::input::{Seat, SeatHandler, SeatState};
|
||||
use smithay::output::Output;
|
||||
use smithay::reexports::wayland_protocols::xdg::shell::server::xdg_toplevel;
|
||||
use smithay::reexports::wayland_server::protocol::wl_buffer;
|
||||
use smithay::reexports::wayland_server::protocol::wl_output::WlOutput;
|
||||
use smithay::reexports::wayland_server::protocol::wl_seat::WlSeat;
|
||||
@@ -119,7 +120,6 @@ impl CompositorHandler for NescopeState {
|
||||
|
||||
fn destroyed(&mut self, surface: &WlSurface) {
|
||||
self.hdr.surface_destroyed(surface);
|
||||
self.vulkan_surfaces.remove(surface);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ impl DmabufHandler for NescopeState {
|
||||
_dmabuf: Dmabuf,
|
||||
notifier: ImportNotifier,
|
||||
) {
|
||||
// Accept unconditionally — libhudless reads buffers
|
||||
// Accept unconditionally — the nescapture layer reads buffers
|
||||
// directly from the game's Vulkan queue; nescope doesn't need to.
|
||||
let _ = notifier.successful::<NescopeState>();
|
||||
}
|
||||
@@ -187,6 +187,29 @@ impl XdgShellHandler for NescopeState {
|
||||
self.determine_and_apply_focus();
|
||||
}
|
||||
|
||||
// Granted, not merely acknowledged. The default answers with a configure
|
||||
// that lacks the fullscreen state, which a client reads as a refusal: Wine
|
||||
// then asks again on every window update and never treats its window as
|
||||
// fullscreen, so a game switching to exclusive fullscreen -- Control does
|
||||
// this on leaving its title screen -- stalls in the transition and stays
|
||||
// where it was. Wine also scales an emulated display mode up to the output
|
||||
// only for a fullscreen window.
|
||||
fn fullscreen_request(&mut self, surface: ToplevelSurface, _output: Option<WlOutput>) {
|
||||
surface.with_pending_state(|state| {
|
||||
state.states.set(xdg_toplevel::State::Fullscreen);
|
||||
state.size = Some((self.width as i32, self.height as i32).into());
|
||||
});
|
||||
surface.send_configure();
|
||||
}
|
||||
|
||||
// Still the size of the output: there is nowhere else for a window to be.
|
||||
fn unfullscreen_request(&mut self, surface: ToplevelSurface) {
|
||||
surface.with_pending_state(|state| {
|
||||
state.states.unset(xdg_toplevel::State::Fullscreen);
|
||||
});
|
||||
surface.send_configure();
|
||||
}
|
||||
|
||||
fn new_popup(&mut self, _: PopupSurface, _: PositionerState) {}
|
||||
fn grab(&mut self, _: PopupSurface, _: WlSeat, _: Serial) {}
|
||||
fn reposition_request(&mut self, _: PopupSurface, _: PositionerState, _: u32) {}
|
||||
|
||||
Reference in New Issue
Block a user