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

Doesn't capture window decorations #14

Open
kattjevfel opened this issue Dec 16, 2020 · 5 comments
Open

Doesn't capture window decorations #14

kattjevfel opened this issue Dec 16, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@kattjevfel
Copy link

Describe the bug
When trying to select a window with either capture or record, it will only select the area excluding the top border, and if I had any on the sides I'd assume those would be missing too.

To Reproduce
Steps to reproduce the behavior:

  1. Run menyoki capture
  2. Select a window
  3. See marked area excludes the window decorations

Expected behavior
The entire window to be captured

Screenshots/Logs
The top part of the window is cut off:
2020-12-16_01-30-21

System Information

  • OS: Arch Linux x86_64 5.9.14-zen1-1-zen
  • Rust Version: 1.48.0-1 from [extra]
  • Project Version: 1.1.0
@orhun
Copy link
Owner

orhun commented Dec 16, 2020

Hey!

As far as I know, window decorations are generally a part of the parent window (although it depends on the compositor). So I added --parent flag to record/capture subcommands for using the parent window for those operations. (5e7b057)
I'm not sure if this approach will fix your issue but it was a necessary flag to add at the end of the day.

Please let me know if it works or not for further research.

@kattjevfel
Copy link
Author

Doesn't seem to work with --parent, in fact all it changes is that there's no longer a green border visible, other than for seemingly only firefox (my only gtk application, so that could be it), but it also didn't show with steam so I'm not 100% sure.

On another perhaps relevant note, slop is listed as an optdepend for window selection, but it doesn't make a difference whatsoever having it installed or not.

@orhun
Copy link
Owner

orhun commented Dec 16, 2020

Doesn't seem to work with --parent, in fact all it changes is that there's no longer a green border visible, other than for seemingly only firefox (my only gtk application, so that could be it), but it also didn't show with steam so I'm not 100% sure.

What are the window names (logs) changing into when you use --parent? What happens when you capture the window although there's not a green border?

On another perhaps relevant note, slop is listed as an optdepend for window selection, but it doesn't make a difference whatsoever having it installed or not.

Here. Maybe I should remove that since it doesn't affect the runtime.

@kattjevfel
Copy link
Author

kattjevfel commented Dec 16, 2020

What are the window names (logs) changing into when you use --parent? What happens when you capture the window although there's not a green border?

Sorry if I wasn't clear, it's only visual, the screenshot is exactly the same just that the border doesnt show up.

Anyway here's comparing with and without --parent:

katt@main ~ » menyoki capture --parent
[2020-12-16T17:04:31 INFO menyoki::x11::display] 
 Window title  -> "(?)"
 Window size   -> [1207x1019]
^Celected area -> [1207x1019] 
katt@main ~ » menyoki capture
[2020-12-16T17:04:35 INFO menyoki::x11::display] 
 Window title  -> "katt@main:~"
 Window size   -> [1207x1019]
^Celected area -> [1207x1019]

Both are focusing my terminal emulator

On another perhaps relevant note, slop is listed as an optdepend for window selection, but it doesn't make a difference whatsoever having it installed or not.

Here. Maybe I should remove that since it doesn't affect the runtime.

Ah, right, I assumed the program would make use of it directly, I hadn't read that part, my bad.

@orhun
Copy link
Owner

orhun commented Dec 18, 2020

I've been looking into this issue and I'm afraid it might be a limitation about Xlib. I'll keep searching for alternative implementations and post results here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants