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

scrot: received DestroyNotify event #319

Closed
daltomi opened this issue May 25, 2023 · 1 comment · Fixed by #304
Closed

scrot: received DestroyNotify event #319

daltomi opened this issue May 25, 2023 · 1 comment · Fixed by #304
Labels
bug Something isn't working

Comments

@daltomi
Copy link
Collaborator

daltomi commented May 25, 2023

Branch: 0d2e5ef
Executing the edge line mode and with another selection mode the message is received.

scrot --select=hide --line mode=edge
scrot: received DestroyNotify event

It was introduced here: #267

@daltomi daltomi added the bug Something isn't working label May 25, 2023
@N-R-K
Copy link
Collaborator

N-R-K commented May 25, 2023

#304 should fix this issue.

@N-R-K N-R-K linked a pull request May 25, 2023 that will close this issue
N-R-K added a commit to N-R-K/scrot that referenced this issue May 25, 2023
* xeventUnmap() did not check the union type before reading from it.
* unmap event should always come, no need to sleep/retry 30 times.
* remove xeventUnmap() and waitUnmapWindowNotify() entirely. the main
  logic is short enough to inline directly at the call site.
* rather than unmapping the window, and then destroying it, destroy it
  directly and wait for the DestroyNotify event.
* compare window ID against `None` rather than `0`. no functional
  difference, but using `None` is more idiomatic for X11 things.

this commit also fixes a regression introduced in b2d4358. because we
pull the event out now, the DestroyNotify event won't stick around in
the queue anymore.

Fixes: resurrecting-open-source-projects#319
N-R-K added a commit to N-R-K/scrot that referenced this issue May 26, 2023
* xeventUnmap() did not check the union type before reading from it.
* unmap event should always come, no need to sleep/retry 30 times.
* remove xeventUnmap() and waitUnmapWindowNotify() entirely. the main
  logic is short enough to inline directly at the call site.
* rather than unmapping the window, and then destroying it, destroy it
  directly and wait for the DestroyNotify event.
* compare window ID against `None` rather than `0`. no functional
  difference, but using `None` is more idiomatic for X11 things.

this commit also fixes a regression introduced in b2d4358. because we
pull the event out now, the DestroyNotify event won't stick around in
the queue anymore.

Fixes: resurrecting-open-source-projects#319
N-R-K added a commit that referenced this issue May 26, 2023
* xeventUnmap() did not check the union type before reading from it.
* unmap event should always come, no need to sleep/retry 30 times.
* remove xeventUnmap() and waitUnmapWindowNotify() entirely. the main
  logic is short enough to inline directly at the call site.
* rather than unmapping the window, and then destroying it, destroy it
  directly and wait for the DestroyNotify event.
* compare window ID against `None` rather than `0`. no functional
  difference, but using `None` is more idiomatic for X11 things.

this commit also fixes a regression introduced in b2d4358. because we
pull the event out now, the DestroyNotify event won't stick around in
the queue anymore.

Fixes: #319
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

Successfully merging a pull request may close this issue.

2 participants