moving: Let stacking indicator follow mouse
This commit is contained in:
parent
952db34056
commit
51a59b167f
1 changed files with 7 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ use smithay::{
|
|||
},
|
||||
output::Output,
|
||||
reexports::wayland_server::protocol::wl_surface::WlSurface,
|
||||
utils::{IsAlive, Logical, Point, Rectangle, Serial},
|
||||
utils::{IsAlive, Logical, Point, Rectangle, Serial, Size},
|
||||
wayland::compositor::SurfaceData,
|
||||
};
|
||||
use std::{
|
||||
|
|
@ -123,7 +123,8 @@ impl MoveGrabState {
|
|||
.flat_map(|(indicator, location)| {
|
||||
indicator.render_elements(
|
||||
renderer,
|
||||
location.to_physical_precise_round(output_scale),
|
||||
(cursor_at.to_i32_round() - output.geometry().loc - Point::from((250, 50)))
|
||||
.to_physical_precise_round(output_scale),
|
||||
output_scale,
|
||||
1.0,
|
||||
)
|
||||
|
|
@ -229,7 +230,10 @@ impl PointerGrab<State> for MoveGrab {
|
|||
|
||||
if indicator_location.is_some() != grab_state.stacking_indicator.is_some() {
|
||||
grab_state.stacking_indicator = indicator_location.map(|geo| {
|
||||
let element = stack_hover(state.common.event_loop_handle.clone(), geo.size);
|
||||
let element = stack_hover(
|
||||
state.common.event_loop_handle.clone(),
|
||||
Size::from((500, 100)),
|
||||
);
|
||||
for output in &self.outputs {
|
||||
element.output_enter(output, output.geometry());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue