Devlog 1 (after shipping webos1)
- so its been like 2 months since i last worked on this project so i just revised the whole codebase once
Realism
- so when i decided to build this my main goal was to make it as realistic as possible
- by realistic i mean to make use of concepts that is used in real linux OS, not just UI but the actual inner workking
What went down
- any application when opened in OS has two parts
- The window
- The process
- Like for notepad app, there is a wrapper window which has the close button and menu options and then there is the actual notepad process which handles things related to the creation and saving of the notes file
what was the problem
-
In real OS whenever we try to close a window, the window wrapper simply sends a closing signal to the actual process saying hey process user wants to close you for now.
-
after this the process either saves logs, current changes or show user a confirmation dialog before closing
-
but in my webOS i was jsut closign the process when user clicked the close button on the window wrapper, which is not realistic at all
There are three kinds of closing signals that a process can receive
- SIGTERM
- SIGKILL
- SIGQUIT
- i will not get into the details of these signals but they mean different things , like SIGTERM is a request to terminate the process whereas SIGKILL forces the process to terminate.
Solution
- so i basically added a new property to the window state to track if a window has requested to close the process
- process actively listen to such state change from the window and replies accordingly and closes the app
- performs tasks like askeing user to save changes, show warning dialog etc before closing the process
there are still some bugs and a lot of things to improve in this thing but i will do that in the next devlog
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.