mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-17 01:00:41 +01:00
X11: select one monitor with UU_X11_MULTISCREEN=1 (#100)
Opt-in X11 monitor selection for #98: RandR monitors from xrandr --listmonitors through the existing screen-switch path; x11grab reads display+x,y at the monitor size, absolute input adds the monitor offset, in-process engine and xrandr resize are skipped while a region is captured. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
979b62d271
commit
69aecf0269
8 files changed
+164
-24
No files matched your search
@@ -56,6 +56,12 @@ pub fn x11_size() -> Option<(u32, u32)> {
|
||||
}
|
||||
|
||||
/// The root size from the last refresh, without an X round trip (pointer mapping).
|
||||
/// Display the X11 engine opened, once a capture has initialized it.
|
||||
pub fn x11_display() -> Option<String> {
|
||||
let name = unsafe { x11_display_name() };
|
||||
if name.is_null() { None } else { Some(unsafe { std::ffi::CStr::from_ptr(name) }.to_string_lossy().into_owned()) }
|
||||
}
|
||||
|
||||
pub fn x11_last_size() -> Option<(u32, u32)> {
|
||||
let (mut w, mut h): (libc::c_int, libc::c_int) = (0, 0);
|
||||
if unsafe { x11_get_dimensions(&mut w, &mut h) } != 0 || w <= 0 || h <= 0 { return None; }
|
||||
|
||||
Reference in new issue
Block a user