mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Add comment about crash
This commit is contained in:
@@ -120,6 +120,7 @@ impl Niri {
|
||||
InputEvent::PointerAxis { event, .. } => {
|
||||
let source = event.source();
|
||||
|
||||
// FIXME: this crashes on keyboard scroll.
|
||||
let horizontal_amount = event
|
||||
.amount(Axis::Horizontal)
|
||||
.unwrap_or_else(|| event.amount_discrete(Axis::Horizontal).unwrap() * 3.0);
|
||||
|
||||
+11
-4
@@ -115,6 +115,8 @@ impl Tty {
|
||||
|
||||
match event {
|
||||
SessionEvent::PauseSession => {
|
||||
debug!("pausing session");
|
||||
|
||||
libinput.suspend();
|
||||
|
||||
if let Some(output_device) = &tty.output_device {
|
||||
@@ -122,14 +124,19 @@ impl Tty {
|
||||
}
|
||||
}
|
||||
SessionEvent::ActivateSession => {
|
||||
debug!("resuming session");
|
||||
|
||||
if libinput.resume().is_err() {
|
||||
error!("error resuming libinput");
|
||||
}
|
||||
|
||||
if let Some(output_device) = &tty.output_device {
|
||||
// FIXME: according to Catacomb, resetting DRM+Compositor is preferrable
|
||||
// here, but currently not possible due to a bug somewhere.
|
||||
tty.device_changed(output_device.id, niri);
|
||||
if let Some(output_device) = &mut tty.output_device {
|
||||
output_device.drm.activate();
|
||||
|
||||
if let Err(err) = output_device.drm_compositor.surface().reset_state() {
|
||||
warn!("error resetting DRM surface state: {err}");
|
||||
}
|
||||
output_device.drm_compositor.reset_buffers();
|
||||
}
|
||||
|
||||
niri.redraw(tty);
|
||||
|
||||
Reference in New Issue
Block a user