Skip to content

Commit ec9a98e

Browse files
committed
wip: cargo fmt with imporved rustfmt
``` $ RUSTFMT="./target/debug/rustfmt" cargo run --bin cargo-fmt -- --manifest-path ../../kenoss/sabiniwm/Cargo.toml ``` with rust-lang/rustfmt#6165.
1 parent bd9e40d commit ec9a98e

File tree

3 files changed

+72
-84
lines changed

3 files changed

+72
-84
lines changed

src/input_handler.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ use smithay::desktop::{layer_map_for_output, WindowSurfaceType};
1919
use smithay::input::keyboard::{keysyms as xkb, FilterResult, Keysym, ModifiersState};
2020
use smithay::input::pointer::{AxisFrame, ButtonEvent, MotionEvent};
2121
use smithay::output::Scale;
22-
use smithay::reexports::wayland_protocols::xdg::decoration::zv1::server::zxdg_toplevel_decoration_v1;
22+
use smithay::reexports::wayland_protocols::xdg::decoration::zv1::server::
23+
zxdg_toplevel_decoration_v1;
2324
use smithay::reexports::wayland_server::protocol::wl_pointer;
2425
use smithay::reexports::wayland_server::DisplayHandle;
2526
use smithay::utils::{Logical, Point, Serial, Transform, SERIAL_COUNTER as SCOUNTER};

src/state.rs

+68-82
Original file line numberDiff line numberDiff line change
@@ -3,96 +3,82 @@ use std::sync::atomic::AtomicBool;
33
use std::sync::{Arc, Mutex};
44
use std::time::Duration;
55

6+
use smithay::backend::renderer::element::utils::select_dmabuf_feedback;
7+
use smithay::backend::renderer::element::{
8+
default_primary_scanout_output_compare, RenderElementStates,
9+
};
10+
use smithay::desktop::space::SpaceElement;
11+
use smithay::desktop::utils::{
12+
surface_presentation_feedback_flags_from_states, surface_primary_scanout_output,
13+
update_surface_primary_scanout_output, OutputPresentationFeedback,
14+
};
15+
use smithay::desktop::{PopupKind, PopupManager, Space};
16+
use smithay::input::keyboard::{Keysym, LedState, XkbConfig};
17+
use smithay::input::pointer::{CursorImageStatus, PointerHandle};
18+
use smithay::input::{Seat, SeatHandler, SeatState};
19+
use smithay::output::Output;
20+
use smithay::reexports::calloop::generic::Generic;
21+
use smithay::reexports::calloop::{Interest, LoopHandle, Mode, PostAction};
22+
use smithay::reexports::wayland_protocols::xdg::decoration::zv1::server::
23+
zxdg_toplevel_decoration_v1::Mode as DecorationMode;
24+
use smithay::reexports::wayland_protocols::xdg::decoration::{self as xdg_decoration};
25+
use smithay::reexports::wayland_server::backend::{ClientData, ClientId, DisconnectReason};
26+
use smithay::reexports::wayland_server::protocol::wl_data_source::WlDataSource;
27+
use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
28+
use smithay::reexports::wayland_server::{Display, DisplayHandle, Resource};
29+
use smithay::utils::{Clock, Monotonic, Rectangle};
30+
use smithay::wayland::compositor::{
31+
get_parent, with_states, CompositorClientState, CompositorState,
32+
};
33+
use smithay::wayland::dmabuf::DmabufFeedback;
34+
use smithay::wayland::fractional_scale::{
35+
with_fractional_scale, FractionalScaleHandler, FractionalScaleManagerState,
36+
};
37+
use smithay::wayland::input_method::{InputMethodHandler, InputMethodManagerState, PopupSurface};
38+
use smithay::wayland::keyboard_shortcuts_inhibit::{
39+
KeyboardShortcutsInhibitHandler, KeyboardShortcutsInhibitState, KeyboardShortcutsInhibitor,
40+
};
41+
use smithay::wayland::output::{OutputHandler, OutputManagerState};
42+
use smithay::wayland::pointer_constraints::{
43+
with_pointer_constraint, PointerConstraintsHandler, PointerConstraintsState,
44+
};
45+
use smithay::wayland::pointer_gestures::PointerGesturesState;
46+
use smithay::wayland::presentation::PresentationState;
47+
use smithay::wayland::relative_pointer::RelativePointerManagerState;
48+
use smithay::wayland::seat::WaylandFocus;
49+
use smithay::wayland::security_context::{
50+
SecurityContext, SecurityContextHandler, SecurityContextListenerSource, SecurityContextState,
51+
};
52+
use smithay::wayland::selection::data_device::{
53+
set_data_device_focus, ClientDndGrabHandler, DataDeviceHandler, DataDeviceState,
54+
ServerDndGrabHandler,
55+
};
56+
use smithay::wayland::selection::primary_selection::{
57+
set_primary_focus, PrimarySelectionHandler, PrimarySelectionState,
58+
};
59+
use smithay::wayland::selection::wlr_data_control::{DataControlHandler, DataControlState};
60+
use smithay::wayland::selection::SelectionHandler;
61+
use smithay::wayland::shell::wlr_layer::WlrLayerShellState;
62+
use smithay::wayland::shell::xdg::decoration::{XdgDecorationHandler, XdgDecorationState};
63+
use smithay::wayland::shell::xdg::{ToplevelSurface, XdgShellState, XdgToplevelSurfaceData};
64+
use smithay::wayland::shm::{ShmHandler, ShmState};
65+
use smithay::wayland::socket::ListeningSocketSource;
66+
use smithay::wayland::tablet_manager::{TabletManagerState, TabletSeatTrait};
67+
use smithay::wayland::text_input::TextInputManagerState;
68+
use smithay::wayland::viewporter::ViewporterState;
69+
use smithay::wayland::virtual_keyboard::VirtualKeyboardManagerState;
70+
use smithay::wayland::xdg_activation::{
71+
XdgActivationHandler, XdgActivationState, XdgActivationToken, XdgActivationTokenData,
72+
};
73+
use smithay::wayland::xdg_foreign::{XdgForeignHandler, XdgForeignState};
674
use smithay::{
7-
backend::renderer::element::{
8-
default_primary_scanout_output_compare, utils::select_dmabuf_feedback, RenderElementStates,
9-
},
1075
delegate_compositor, delegate_data_control, delegate_data_device, delegate_fractional_scale,
1176
delegate_input_method_manager, delegate_keyboard_shortcuts_inhibit, delegate_layer_shell,
1277
delegate_output, delegate_pointer_constraints, delegate_pointer_gestures,
1378
delegate_presentation, delegate_primary_selection, delegate_relative_pointer, delegate_seat,
1479
delegate_security_context, delegate_shm, delegate_tablet_manager, delegate_text_input_manager,
1580
delegate_viewporter, delegate_virtual_keyboard_manager, delegate_xdg_activation,
1681
delegate_xdg_decoration, delegate_xdg_shell,
17-
desktop::{
18-
space::SpaceElement,
19-
utils::{
20-
surface_presentation_feedback_flags_from_states, surface_primary_scanout_output,
21-
update_surface_primary_scanout_output, OutputPresentationFeedback,
22-
},
23-
PopupKind, PopupManager, Space,
24-
},
25-
input::{
26-
keyboard::{Keysym, LedState, XkbConfig},
27-
pointer::{CursorImageStatus, PointerHandle},
28-
Seat, SeatHandler, SeatState,
29-
},
30-
output::Output,
31-
reexports::{
32-
calloop::{generic::Generic, Interest, LoopHandle, Mode, PostAction},
33-
wayland_protocols::xdg::decoration::{
34-
self as xdg_decoration,
35-
zv1::server::zxdg_toplevel_decoration_v1::Mode as DecorationMode,
36-
},
37-
wayland_server::{
38-
backend::{ClientData, ClientId, DisconnectReason},
39-
protocol::{wl_data_source::WlDataSource, wl_surface::WlSurface},
40-
Display, DisplayHandle, Resource,
41-
},
42-
},
43-
utils::{Clock, Monotonic, Rectangle},
44-
wayland::{
45-
compositor::{get_parent, with_states, CompositorClientState, CompositorState},
46-
dmabuf::DmabufFeedback,
47-
fractional_scale::{
48-
with_fractional_scale, FractionalScaleHandler, FractionalScaleManagerState,
49-
},
50-
input_method::{InputMethodHandler, InputMethodManagerState, PopupSurface},
51-
keyboard_shortcuts_inhibit::{
52-
KeyboardShortcutsInhibitHandler, KeyboardShortcutsInhibitState,
53-
KeyboardShortcutsInhibitor,
54-
},
55-
output::{OutputHandler, OutputManagerState},
56-
pointer_constraints::{
57-
with_pointer_constraint, PointerConstraintsHandler, PointerConstraintsState,
58-
},
59-
pointer_gestures::PointerGesturesState,
60-
presentation::PresentationState,
61-
relative_pointer::RelativePointerManagerState,
62-
seat::WaylandFocus,
63-
security_context::{
64-
SecurityContext, SecurityContextHandler, SecurityContextListenerSource,
65-
SecurityContextState,
66-
},
67-
selection::data_device::{
68-
set_data_device_focus, ClientDndGrabHandler, DataDeviceHandler, DataDeviceState,
69-
ServerDndGrabHandler,
70-
},
71-
selection::{
72-
primary_selection::{
73-
set_primary_focus, PrimarySelectionHandler, PrimarySelectionState,
74-
},
75-
wlr_data_control::{DataControlHandler, DataControlState},
76-
SelectionHandler,
77-
},
78-
shell::{
79-
wlr_layer::WlrLayerShellState,
80-
xdg::{
81-
decoration::{XdgDecorationHandler, XdgDecorationState},
82-
ToplevelSurface, XdgShellState, XdgToplevelSurfaceData,
83-
},
84-
},
85-
shm::{ShmHandler, ShmState},
86-
socket::ListeningSocketSource,
87-
tablet_manager::{TabletManagerState, TabletSeatTrait},
88-
text_input::TextInputManagerState,
89-
viewporter::ViewporterState,
90-
virtual_keyboard::VirtualKeyboardManagerState,
91-
xdg_activation::{
92-
XdgActivationHandler, XdgActivationState, XdgActivationToken, XdgActivationTokenData,
93-
},
94-
xdg_foreign::{XdgForeignHandler, XdgForeignState},
95-
},
9682
};
9783

9884
use crate::cursor::Cursor;

src/udev.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ use smithay::reexports::drm::control::{connector, crtc, Device, ModeTypeFlags};
5757
use smithay::reexports::drm::Device as _;
5858
use smithay::reexports::input::{DeviceCapability, Libinput};
5959
use smithay::reexports::rustix::fs::OFlags;
60-
use smithay::reexports::wayland_protocols::wp::linux_dmabuf::zv1::server::zwp_linux_dmabuf_feedback_v1;
60+
use smithay::reexports::wayland_protocols::wp::linux_dmabuf::zv1::server::
61+
zwp_linux_dmabuf_feedback_v1;
6162
use smithay::reexports::wayland_protocols::wp::presentation_time::server::wp_presentation_feedback;
6263
use smithay::reexports::wayland_server::backend::GlobalId;
6364
use smithay::reexports::wayland_server::protocol::wl_surface;

0 commit comments

Comments
 (0)