mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Update Smithay, use device changed session resume code
Should fix most cases of monitors failing to light up after a TTY switch.
This commit is contained in:
Generated
+20
-34
@@ -1406,25 +1406,22 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "input"
|
||||
version = "0.8.3"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6e74cd82cedcd66db78742a8337bdc48f188c4d2c12742cbc5cd85113f0b059"
|
||||
checksum = "7911ce3db9c10c5ab4a35c49af778a5f9a827bd0f7371d9be56175d8dd2740d0"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"bitflags 2.4.2",
|
||||
"input-sys",
|
||||
"io-lifetimes 1.0.11",
|
||||
"libc",
|
||||
"udev 0.7.0",
|
||||
"udev",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "input-sys"
|
||||
version = "1.17.0"
|
||||
version = "1.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05f6c2a17e8aba7217660e32863af87b0febad811d4b8620ef76b386603fddc2"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
checksum = "bd4f5b4d1c00331c5245163aacfe5f20be75b564c7112d45893d4ae038119eb0"
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
@@ -2301,9 +2298,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.76"
|
||||
version = "1.0.78"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c"
|
||||
checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@@ -2459,13 +2456,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.10.2"
|
||||
version = "1.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
|
||||
checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata 0.4.3",
|
||||
"regex-automata 0.4.4",
|
||||
"regex-syntax 0.8.2",
|
||||
]
|
||||
|
||||
@@ -2480,9 +2477,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.3"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
|
||||
checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
@@ -2658,9 +2655,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.2.0"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-registry"
|
||||
@@ -2688,14 +2685,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.13.0"
|
||||
version = "1.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b187f0231d56fe41bfb12034819dd2bf336422a5866de41bc3fec4b2e3883e8"
|
||||
checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
|
||||
|
||||
[[package]]
|
||||
name = "smithay"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/Smithay/smithay.git#b7284bc6ca6afc782bd55a5c34ef3f902005951f"
|
||||
source = "git+https://github.com/Smithay/smithay.git#810df8986f9e76a1a5ffa728e70574abcf191263"
|
||||
dependencies = [
|
||||
"appendlist",
|
||||
"bitflags 2.4.2",
|
||||
@@ -2726,7 +2723,7 @@ dependencies = [
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
"udev 0.8.0",
|
||||
"udev",
|
||||
"wayland-backend",
|
||||
"wayland-egl",
|
||||
"wayland-protocols",
|
||||
@@ -2766,7 +2763,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "smithay-drm-extras"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/Smithay/smithay.git#b7284bc6ca6afc782bd55a5c34ef3f902005951f"
|
||||
source = "git+https://github.com/Smithay/smithay.git#810df8986f9e76a1a5ffa728e70574abcf191263"
|
||||
dependencies = [
|
||||
"drm",
|
||||
"edid-rs",
|
||||
@@ -3062,17 +3059,6 @@ version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "udev"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ebdbbd670373442a12fe9ef7aeb53aec4147a5a27a00bbc3ab639f08f48191a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"libudev-sys",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "udev"
|
||||
version = "0.8.0"
|
||||
|
||||
+7
-39
@@ -280,7 +280,7 @@ impl Tty {
|
||||
|
||||
self.libinput.suspend();
|
||||
|
||||
for device in self.devices.values() {
|
||||
for device in self.devices.values_mut() {
|
||||
device.drm.pause();
|
||||
}
|
||||
}
|
||||
@@ -323,47 +323,13 @@ impl Tty {
|
||||
device_list.remove(&node.dev_id());
|
||||
|
||||
// It hasn't been removed, update its state as usual.
|
||||
let device = &self.devices[&node];
|
||||
device.drm.activate();
|
||||
|
||||
// HACK: force reset the connectors to make resuming work across sleep.
|
||||
let device = &self.devices[&node];
|
||||
let crtcs: Vec<_> = device
|
||||
.drm_scanner
|
||||
.crtcs()
|
||||
.map(|(_conn, crtc)| crtc)
|
||||
.collect();
|
||||
for crtc in crtcs {
|
||||
self.connector_disconnected(niri, node, crtc);
|
||||
}
|
||||
|
||||
let device = self.devices.get_mut(&node).unwrap();
|
||||
let _ = device.drm_scanner.scan_connectors(&device.drm);
|
||||
let crtcs: Vec<_> = device
|
||||
.drm_scanner
|
||||
.crtcs()
|
||||
.map(|(conn, crtc)| (conn.clone(), crtc))
|
||||
.collect();
|
||||
for (conn, crtc) in crtcs {
|
||||
if let Err(err) = self.connector_connected(niri, node, conn, crtc) {
|
||||
warn!("error connecting connector: {err:?}");
|
||||
}
|
||||
if let Err(err) = device.drm.activate(true) {
|
||||
warn!("error activating DRM device: {err:?}");
|
||||
}
|
||||
|
||||
// // Refresh the connectors.
|
||||
// self.device_changed(node.dev_id(), niri);
|
||||
|
||||
// // Refresh the state on unchanged connectors.
|
||||
// let device = self.devices.get_mut(&node).unwrap();
|
||||
// for surface in device.surfaces.values_mut() {
|
||||
// let compositor = &mut surface.compositor;
|
||||
// if let Err(err) = compositor.surface().reset_state() {
|
||||
// warn!("error resetting DRM surface state: {err}");
|
||||
// }
|
||||
// compositor.reset_buffers();
|
||||
// }
|
||||
|
||||
// niri.queue_redraw_all();
|
||||
// Refresh the connectors.
|
||||
self.device_changed(node.dev_id(), niri);
|
||||
}
|
||||
|
||||
// Add new devices.
|
||||
@@ -378,6 +344,8 @@ impl Tty {
|
||||
}
|
||||
|
||||
self.refresh_ipc_outputs();
|
||||
|
||||
niri.queue_redraw_all();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ impl State {
|
||||
TouchUp { .. } => (),
|
||||
TouchCancel { .. } => (),
|
||||
TouchFrame { .. } => (),
|
||||
SwitchToggle { .. } => (),
|
||||
Special(_) => (),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user