Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ cosmic-protocols = { git = "https://github.com/pop-os//cosmic-protocols", branch
cosmic-client-toolkit = { git = "https://github.com/pop-os//cosmic-protocols", branch = "main" }

[patch.crates-io]
smithay = { git = "https://github.com/smithay/smithay.git", rev = "211c19d" }
# smithay = { git = "https://github.com/smithay/smithay.git", rev = "211c19d" }
smithay = { git = "https://github.com/ids1024/smithay.git", branch = "dispatch2" }
1 change: 1 addition & 0 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ pub struct State {
pub ready: Once,
pub last_refresh: LastRefresh,
}
smithay::delegate_dispatch2!(State);

#[derive(Debug)]
pub struct Common {
Expand Down
6 changes: 0 additions & 6 deletions src/wayland/handlers/alpha_modifier.rs

This file was deleted.

3 changes: 0 additions & 3 deletions src/wayland/handlers/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use smithay::{
element::{Kind, surface::KindEvaluation},
utils::{on_commit_buffer_handler, with_renderer_surface_state},
},
delegate_compositor,
desktop::{LayerSurface, PopupKind, WindowSurfaceType, layer_map_for_output},
reexports::wayland_server::{Client, Resource, protocol::wl_surface::WlSurface},
utils::{Clock, Logical, Monotonic, SERIAL_COUNTER, Size, Time},
Expand Down Expand Up @@ -430,5 +429,3 @@ impl State {
false
}
}

delegate_compositor!(State);
7 changes: 1 addition & 6 deletions src/wayland/handlers/data_control/ext.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
use crate::state::State;
use smithay::{
delegate_ext_data_control,
wayland::selection::ext_data_control::{DataControlHandler, DataControlState},
};
use smithay::wayland::selection::ext_data_control::{DataControlHandler, DataControlState};

impl DataControlHandler for State {
fn data_control_state(&mut self) -> &mut DataControlState {
&mut self.common.ext_data_control_state
}
}

delegate_ext_data_control!(State);
7 changes: 1 addition & 6 deletions src/wayland/handlers/data_control/wlr.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
// SPDX-License-Identifier: GPL-3.0-only

use crate::state::State;
use smithay::{
delegate_data_control,
wayland::selection::wlr_data_control::{DataControlHandler, DataControlState},
};
use smithay::wayland::selection::wlr_data_control::{DataControlHandler, DataControlState};

impl DataControlHandler for State {
fn data_control_state(&mut self) -> &mut DataControlState {
&mut self.common.wlr_data_control_state
}
}

delegate_data_control!(State);
3 changes: 0 additions & 3 deletions src/wayland/handlers/data_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use crate::{state::State, utils::prelude::SeatExt};
use smithay::{
delegate_data_device,
input::{
Seat,
dnd::{DnDGrab, DndGrabHandler, DndTarget, GrabType},
Expand Down Expand Up @@ -135,5 +134,3 @@ impl DataDeviceHandler for State {
&mut self.common.data_device_state
}
}

delegate_data_device!(State);
4 changes: 0 additions & 4 deletions src/wayland/handlers/decoration.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{cell::RefCell, sync::Mutex};

use smithay::{
delegate_kde_decoration, delegate_xdg_decoration,
desktop::Window,
reexports::{
wayland_protocols::xdg::decoration::zv1::server::zxdg_toplevel_decoration_v1::Mode as XdgMode,
Expand Down Expand Up @@ -186,6 +185,3 @@ impl KdeDecorationHandler for State {
});
}
}

delegate_xdg_decoration!(State);
delegate_kde_decoration!(State);
3 changes: 0 additions & 3 deletions src/wayland/handlers/dmabuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::{
};
use smithay::{
backend::{allocator::dmabuf::Dmabuf, renderer::element::Kind},
delegate_dmabuf,
desktop::WindowSurfaceType,
reexports::wayland_server::protocol::wl_surface::WlSurface,
wayland::{
Expand Down Expand Up @@ -89,5 +88,3 @@ impl DmabufHandler for State {
}))
}
}

delegate_dmabuf!(State);
3 changes: 0 additions & 3 deletions src/wayland/handlers/drm_lease.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use crate::state::State;
use smithay::{
backend::drm::DrmNode,
delegate_drm_lease,
wayland::drm_lease::{
DrmLease, DrmLeaseBuilder, DrmLeaseHandler, DrmLeaseRequest, DrmLeaseState, LeaseRejected,
},
Expand Down Expand Up @@ -134,5 +133,3 @@ impl DrmLeaseHandler for State {
}
}
}

delegate_drm_lease!(State);
7 changes: 1 addition & 6 deletions src/wayland/handlers/drm_syncobj.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only

use crate::state::{BackendData, State};
use smithay::{
delegate_drm_syncobj,
wayland::drm_syncobj::{DrmSyncobjHandler, DrmSyncobjState},
};
use smithay::wayland::drm_syncobj::{DrmSyncobjHandler, DrmSyncobjState};

impl DrmSyncobjHandler for State {
fn drm_syncobj_state(&mut self) -> Option<&mut DrmSyncobjState> {
Expand All @@ -15,5 +12,3 @@ impl DrmSyncobjHandler for State {
kms.syncobj_state.as_mut()
}
}

delegate_drm_syncobj!(State);
6 changes: 0 additions & 6 deletions src/wayland/handlers/fixes.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/wayland/handlers/foreign_toplevel_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ impl ForeignToplevelListHandler for State {
&mut self.toplevel_info_state_mut().foreign_toplevel_list
}
}

smithay::delegate_foreign_toplevel_list!(State);
3 changes: 0 additions & 3 deletions src/wayland/handlers/fractional_scale.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::{state::State, utils::prelude::SeatExt};
use smithay::{
delegate_fractional_scale,
desktop::utils::surface_primary_scanout_output,
reexports::wayland_server::protocol::wl_surface::WlSurface,
wayland::{
Expand Down Expand Up @@ -55,5 +54,3 @@ impl FractionalScaleHandler for State {
});
}
}

delegate_fractional_scale!(State);
3 changes: 1 addition & 2 deletions src/wayland/handlers/idle_inhibit.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use smithay::{
delegate_idle_inhibit, reexports::wayland_server::protocol::wl_surface::WlSurface,
reexports::wayland_server::protocol::wl_surface::WlSurface,
wayland::idle_inhibit::IdleInhibitHandler,
};

Expand All @@ -16,4 +16,3 @@ impl IdleInhibitHandler for State {
self.common.refresh_idle_inhibit();
}
}
delegate_idle_inhibit!(State);
3 changes: 1 addition & 2 deletions src/wayland/handlers/idle_notify.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use smithay::{delegate_idle_notify, wayland::idle_notify::IdleNotifierHandler};
use smithay::wayland::idle_notify::IdleNotifierHandler;

use crate::state::State;

Expand All @@ -9,4 +9,3 @@ impl IdleNotifierHandler for State {
&mut self.common.idle_notifier_state
}
}
delegate_idle_notify!(State);
9 changes: 1 addition & 8 deletions src/wayland/handlers/image_capture_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
use crate::{
state::State,
wayland::protocols::{
image_capture_source::{ImageCaptureSourceKind, delegate_cosmic_image_capture_source},
toplevel_info::window_from_ext,
image_capture_source::ImageCaptureSourceKind, toplevel_info::window_from_ext,
},
};
use smithay::{
Expand Down Expand Up @@ -51,9 +50,3 @@ impl ToplevelCaptureSourceHandler for State {
source.user_data().insert_if_missing(|| data);
}
}

smithay::delegate_image_capture_source!(State);
smithay::delegate_output_capture_source!(State);
smithay::delegate_toplevel_capture_source!(State);

delegate_cosmic_image_capture_source!(State);
2 changes: 0 additions & 2 deletions src/wayland/handlers/image_copy_capture/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,5 +449,3 @@ fn constraints_for_renderer(

constraints
}

smithay::delegate_image_copy_capture!(State);
3 changes: 0 additions & 3 deletions src/wayland/handlers/input_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use crate::state::State;
use smithay::{
delegate_input_method_manager,
desktop::{PopupKind, PopupManager, space::SpaceElement},
reexports::wayland_server::protocol::wl_surface::WlSurface,
utils::Rectangle,
Expand Down Expand Up @@ -34,5 +33,3 @@ impl InputMethodHandler for State {

fn popup_repositioned(&mut self, _: PopupSurface) {}
}

delegate_input_method_manager!(State);
9 changes: 2 additions & 7 deletions src/wayland/handlers/keyboard_shortcuts_inhibit.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only

use crate::state::State;
use smithay::{
delegate_keyboard_shortcuts_inhibit,
wayland::keyboard_shortcuts_inhibit::{
KeyboardShortcutsInhibitHandler, KeyboardShortcutsInhibitState, KeyboardShortcutsInhibitor,
},
use smithay::wayland::keyboard_shortcuts_inhibit::{
KeyboardShortcutsInhibitHandler, KeyboardShortcutsInhibitState, KeyboardShortcutsInhibitor,
};

impl KeyboardShortcutsInhibitHandler for State {
Expand All @@ -18,5 +15,3 @@ impl KeyboardShortcutsInhibitHandler for State {
inhibitor.activate();
}
}

delegate_keyboard_shortcuts_inhibit!(State);
3 changes: 0 additions & 3 deletions src/wayland/handlers/layer_shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use crate::{shell::PendingLayer, utils::prelude::*};
use smithay::{
delegate_layer_shell,
desktop::{LayerSurface, PopupKind, WindowSurfaceType, layer_map_for_output},
output::Output,
reexports::wayland_server::protocol::wl_output::WlOutput,
Expand Down Expand Up @@ -79,5 +78,3 @@ impl WlrLayerShellHandler for State {
}
}
}

delegate_layer_shell!(State);
9 changes: 0 additions & 9 deletions src/wayland/handlers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only

pub mod a11y;
pub mod alpha_modifier;
pub mod buffer;
pub mod compositor;
pub mod corner_radius;
Expand All @@ -12,7 +11,6 @@ pub mod dmabuf;
pub mod drm;
pub mod drm_lease;
pub mod drm_syncobj;
pub mod fixes;
pub mod foreign_toplevel_list;
pub mod fractional_scale;
pub mod idle_inhibit;
Expand All @@ -27,22 +25,15 @@ pub mod output_configuration;
pub mod output_power;
pub mod overlap_notify;
pub mod pointer_constraints;
pub mod pointer_gestures;
pub mod presentation;
pub mod primary_selection;
pub mod relative_pointer;
pub mod seat;
pub mod security_context;
pub mod selection;
pub mod session_lock;
pub mod shm;
pub mod single_pixel_buffer;
pub mod tablet_manager;
pub mod text_input;
pub mod toplevel_info;
pub mod toplevel_management;
pub mod viewporter;
pub mod virtual_keyboard;
pub mod workspace;
pub mod xdg_activation;
pub mod xdg_foreign;
Expand Down
4 changes: 1 addition & 3 deletions src/wayland/handlers/output.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only

use crate::state::State;
use smithay::{delegate_output, wayland::output::OutputHandler};
use smithay::wayland::output::OutputHandler;

impl OutputHandler for State {}

delegate_output!(State);
Loading