Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixscalefinal #127

Closed
wants to merge 27 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
68a5c6a
Refactor: introduce FrameGuard, ScreenCapturer, and Logical/EmbeddedR…
Decodetalkers Feb 2, 2024
a023ff1
Add freeze functionality
AndreasBackx Feb 2, 2024
87be331
Move to clap_derive so CLI arguments are typed
AndreasBackx Feb 2, 2024
736b651
Improve CLI design
AndreasBackx Feb 2, 2024
7d6e20b
Remove explicit panics and exits
AndreasBackx Feb 2, 2024
044910d
Make region, sizing, and positioning data structs reusable
AndreasBackx Feb 2, 2024
f2aa2b6
feat: Merge pull request #78
Shinyzenith Feb 12, 2024
8f22e6d
First version of scaling fix. (#85)
AndreasBackx Feb 21, 2024
9e7919e
chore: remove useless roundtrip (#105)
shivkr6 Mar 23, 2024
b9219b1
feat(clipboard): implement clipboard integration (#91)
CheerfulPianissimo Mar 23, 2024
e43ab9f
docs(ManPage): Fix capitalization issue
Shinyzenith Mar 23, 2024
440bd26
docs: Document clipboard interaction
Shinyzenith Mar 23, 2024
f7f134f
chore: Update Cargo.lock
Shinyzenith Mar 23, 2024
5370c08
feat: added time_stamp flag (#93)
rachancheet Mar 23, 2024
d7200c7
chore: Update Cargo.lock
Shinyzenith Mar 23, 2024
017be62
feat: Add support for webp (#98)
Gigas002 Mar 23, 2024
f53e650
refactor(libwayshot): Reduce allocations (#99)
murlakatamenka Mar 23, 2024
2afa5b0
feat: account for directories in file path (#96)
rachancheet Mar 23, 2024
7381159
fix: Clipboard flag ignored if path is qualified to file (#108)
CheerfulPianissimo Mar 26, 2024
2cb242c
chore: make clippy happy (#111)
Decodetalkers Mar 28, 2024
10b748f
feat(clipboard): fix interaction with freeze and select feature: Issu…
CheerfulPianissimo Apr 6, 2024
2dd8af6
Destroy layer shell surfaces
CheerfulPianissimo May 28, 2024
7934fd2
Implement missing conversion from string to webp enum (#121)
Gigas002 Jun 18, 2024
1c3c802
Replace nix with rustix (#120)
Gigas002 Jun 18, 2024
5c3e220
Update documentation with changes in freeze-feat (#116)
CheerfulPianissimo Aug 25, 2024
5d69000
Add screencopy dmabuf backend (#122)
CheerfulPianissimo Aug 28, 2024
ce83302
fix: I find out a smart way to fix scale problem
Decodetalkers Oct 6, 2024
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
Prev Previous commit
Next Next commit
Destroy layer shell surfaces
* [fix] unmap layer shell surfaces before destroying them
  • Loading branch information
CheerfulPianissimo authored May 28, 2024
commit 2dd8af66476606e363f9696c29a3f73e48606687
16 changes: 13 additions & 3 deletions libwayshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ impl WayshotConnection {
}
};

let mut layer_shell_surfaces = Vec::with_capacity(frames.len());

for (frame_copy, frame_guard, output_info) in frames {
tracing::span!(
tracing::Level::DEBUG,
Expand Down Expand Up @@ -491,15 +493,23 @@ impl WayshotConnection {

debug!("Committing surface with attached buffer.");
surface.commit();

layer_shell_surfaces.push((surface, layer_surface));
event_queue.blocking_dispatch(&mut state)?;

Ok(())
})?;
}

let callback_result = callback();
layer_shell.destroy();
event_queue.blocking_dispatch(&mut state)?;

debug!("Unmapping and destroying layer shell surfaces.");
for (surface, layer_shell_surface) in layer_shell_surfaces.iter() {
surface.attach(None, 0, 0);
surface.commit(); //unmap surface by committing a null buffer
layer_shell_surface.destroy();
}
event_queue.roundtrip(&mut state)?;

callback_result
}

Expand Down
Loading