shell: Fix position of floating windows before/after drag

This fixes two issues that seem to have been introduced by 98dc342:

* During drag, CSD windows being offset from their original location and
  the frames rendered around them.
* Windows on additional monitors being positioned incorrectly when
  dragged.

This seems to work well in floating mode with `OutputBound` workspaces.
With `Global` workspaces it seems position of dragged windows on
additional monitors isn't right before or after this...
This commit is contained in:
Ian Douglas Scott 2023-03-08 15:36:26 -08:00
parent ef894aebfc
commit e8dcc22ad7

View file

@ -66,7 +66,7 @@ impl MoveGrabState {
elements.extend(AsRenderElements::<R>::render_elements::<I>( elements.extend(AsRenderElements::<R>::render_elements::<I>(
&self.window, &self.window,
renderer, renderer,
render_location.to_physical_precise_round(scale), (render_location - self.window.geometry().loc).to_physical_precise_round(scale),
scale, scale,
)); ));
elements elements
@ -179,7 +179,7 @@ impl MoveSurfaceGrab {
let grab_state = MoveGrabState { let grab_state = MoveGrabState {
window: window.clone(), window: window.clone(),
window_offset: dbg!(initial_window_location) + output.geometry().loc window_offset: dbg!(initial_window_location)
- dbg!(initial_cursor_location.to_i32_round()), - dbg!(initial_cursor_location.to_i32_round()),
}; };