added sending closing event message to settings windows (#7)
Release / release (push) Successful in 5m7s
Release / release (push) Successful in 5m7s
Reviewed-on: #7 Co-authored-by: Aleksandr Neychev <alexnejchev73@gmail.com>
This commit was merged in pull request #7.
This commit is contained in:
@@ -81,19 +81,26 @@ the next time the window is asked for.
|
||||
the layout tracking. No UI, and it must stay that way — whatever lands there lands
|
||||
in the background process.
|
||||
|
||||
The connection between the two is `settings.json` and nothing else. The window
|
||||
writes it — whole, into a temporary file moved into place in one step — and then
|
||||
Everything the window has to say to the agent goes through `settings.json` and
|
||||
nothing else. The window writes it — whole, into a temporary file moved into place in one step — and then
|
||||
posts a registered window message to the agent, which re-reads. The message carries
|
||||
no data: sending the changed values along would make the file stop being the only
|
||||
source of truth. An agent that is not running is a normal case — the window works the
|
||||
same. Nobody watches the file: it has one writer, and that writer speaks up.
|
||||
|
||||
The one word in the other direction is the last one: Exit in the tray menu asks an
|
||||
open settings window to close before the agent goes, so that no window is left
|
||||
belonging to nothing. It travels as a named event of the session rather than a
|
||||
window message — the agent starts that process and deliberately keeps no handle to
|
||||
it. Nobody listening is the usual case, and it is a normal answer.
|
||||
|
||||
## The tray
|
||||
|
||||
The settings window is a guest on the screen rather than the app itself: it shows
|
||||
up after the installation and whenever the icon or its menu is asked for. Both
|
||||
buttons in its title bar mean what they say — the window closes and its process
|
||||
ends. The way out of the app itself is the Exit item of the tray menu.
|
||||
ends. The way out of the app itself is the Exit item of the tray menu — and it
|
||||
closes an open settings window along with the agent.
|
||||
|
||||
The menu of the icon is a system one, drawn by Windows. Its captions still follow
|
||||
the language chosen in the settings, but the theme no longer reaches it: a WPF
|
||||
|
||||
Reference in New Issue
Block a user