render: render DnD surface even if cursor is invisible
This commit is contained in:
parent
2a61aee979
commit
cf4c3bb4b5
1 changed files with 11 additions and 11 deletions
|
|
@ -253,18 +253,18 @@ impl dyn GfxFramebuffer {
|
|||
if let Some(rect) = cursor_rect {
|
||||
let seats = state.globals.lock_seats();
|
||||
for seat in seats.values() {
|
||||
if let Some(cursor) = seat.get_cursor() {
|
||||
let (mut x, mut y) = seat.get_position();
|
||||
if let Some(dnd_icon) = seat.dnd_icon() {
|
||||
let extents = dnd_icon.extents.get().move_(
|
||||
x.round_down() + dnd_icon.buf_x.get(),
|
||||
y.round_down() + dnd_icon.buf_y.get(),
|
||||
);
|
||||
if extents.intersects(&rect) {
|
||||
let (x, y) = rect.translate(extents.x1(), extents.y1());
|
||||
renderer.render_surface(&dnd_icon, x, y, None);
|
||||
}
|
||||
let (mut x, mut y) = seat.get_position();
|
||||
if let Some(dnd_icon) = seat.dnd_icon() {
|
||||
let extents = dnd_icon.extents.get().move_(
|
||||
x.round_down() + dnd_icon.buf_x.get(),
|
||||
y.round_down() + dnd_icon.buf_y.get(),
|
||||
);
|
||||
if extents.intersects(&rect) {
|
||||
let (x, y) = rect.translate(extents.x1(), extents.y1());
|
||||
renderer.render_surface(&dnd_icon, x, y, None);
|
||||
}
|
||||
}
|
||||
if let Some(cursor) = seat.get_cursor() {
|
||||
if render_hardware_cursor || !seat.hardware_cursor() {
|
||||
cursor.tick();
|
||||
x -= Fixed::from_int(rect.x1());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue