Skip to content

Commit

Permalink
Switch to upstream idle-notify
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisduerr committed Feb 9, 2024
1 parent fb107f2 commit 794eb6f
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 352 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = ["catacomb_ipc"]

[dependencies.smithay]
git = "https://github.com/chrisduerr/smithay"
rev = "48d7a8cff7c17758e5435ac94ce3f954a10cb39a"
rev = "805038526f4d300c1389fda7a860126b7fd94470"
default-features = false
features = [
"use_system_lib",
Expand Down
2 changes: 1 addition & 1 deletion catacomb_ipc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2021"

[dependencies.smithay]
git = "https://github.com/chrisduerr/smithay"
rev = "48d7a8cff7c17758e5435ac94ce3f954a10cb39a"
rev = "805038526f4d300c1389fda7a860126b7fd94470"
default-features = false
features = [
"use_system_lib",
Expand Down
19 changes: 8 additions & 11 deletions src/catacomb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use smithay::wayland::fractional_scale::{
self, FractionalScaleHandler, FractionalScaleManagerState,
};
use smithay::wayland::idle_inhibit::{IdleInhibitHandler, IdleInhibitManagerState};
use smithay::wayland::idle_notify::{IdleNotifierHandler, IdleNotifierState};
use smithay::wayland::input_method::{
InputMethodHandler, InputMethodManagerState, InputMethodSeat, PopupSurface as ImeSurface,
};
Expand Down Expand Up @@ -72,12 +73,12 @@ use smithay::wayland::xdg_activation::{
};
use smithay::{
delegate_compositor, delegate_data_control, delegate_data_device, delegate_dmabuf,
delegate_fractional_scale, delegate_idle_inhibit, delegate_input_method_manager,
delegate_kde_decoration, delegate_keyboard_shortcuts_inhibit, delegate_layer_shell,
delegate_output, delegate_presentation, delegate_primary_selection, delegate_seat,
delegate_session_lock, delegate_shm, delegate_text_input_manager, delegate_viewporter,
delegate_virtual_keyboard_manager, delegate_xdg_activation, delegate_xdg_decoration,
delegate_xdg_shell,
delegate_fractional_scale, delegate_idle_inhibit, delegate_idle_notify,
delegate_input_method_manager, delegate_kde_decoration, delegate_keyboard_shortcuts_inhibit,
delegate_layer_shell, delegate_output, delegate_presentation, delegate_primary_selection,
delegate_seat, delegate_session_lock, delegate_shm, delegate_text_input_manager,
delegate_viewporter, delegate_virtual_keyboard_manager, delegate_xdg_activation,
delegate_xdg_decoration, delegate_xdg_shell,
};
use tracing::{error, info};
use zbus::zvariant::OwnedFd;
Expand All @@ -87,17 +88,13 @@ use crate::drawing::CatacombSurfaceData;
use crate::input::TouchState;
use crate::orientation::{Accelerometer, AccelerometerSource};
use crate::output::Output;
use crate::protocols::idle_notify::{IdleNotifierHandler, IdleNotifierState};
use crate::protocols::screencopy::frame::Screencopy;
use crate::protocols::screencopy::{ScreencopyHandler, ScreencopyManagerState};
use crate::protocols::single_pixel_buffer::SinglePixelBufferState;
use crate::udev::Udev;
use crate::windows::surface::Surface;
use crate::windows::Windows;
use crate::{
dbus, delegate_idle_notify, delegate_screencopy, delegate_single_pixel_buffer, ipc_server,
trace_error,
};
use crate::{dbus, delegate_screencopy, delegate_single_pixel_buffer, ipc_server, trace_error};

/// Time before xdg_activation tokens are invalidated.
const ACTIVATION_TIMEOUT: Duration = Duration::from_secs(10);
Expand Down
2 changes: 1 addition & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ impl Catacomb {
}

// Reset idle sleep timer.
self.idle_notifier_state.notify_activity();
self.idle_notifier_state.notify_activity(&self.seat);

match event {
InputEvent::Keyboard { event, .. } => {
Expand Down
Loading

0 comments on commit 794eb6f

Please sign in to comment.