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

fix(gui): second instance triggers second capture window #580 #589

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

# Changelog

## v0.5.4 (upcoming)
## v0.5.4 (2024-01-15)

- All: Fix duplicate capture window if started twice
([#580](https://github.com/dynobo/normcap/issues/580))
- Linux: Improve robustness of window positioning on Wayland.
- Linux: Improve debug output regarding clipboard methods.
([#581](https://github.com/dynobo/normcap/issues/581))

## v0.5.3 (2024-01-04)

Expand Down
5 changes: 5 additions & 0 deletions normcap/gui/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,14 @@ def _on_ready_read(self) -> None:
"""Process messages received from other NormCap instances."""
if not self._socket_in:
return

message = self._socket_in.readAll()
# TODO: Test if `is message` check is necessary
if message and message.data().decode("utf-8", errors="ignore") == "capture":
logger.info("Received socket signal to capture.")
if self.windows:
logger.debug("Capture window(s) already open. Doing nothing.")
return
self._show_windows(delay_screenshot=True)

@QtCore.Slot(QtWidgets.QSystemTrayIcon.ActivationReason)
Expand Down