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

Issue with Restoring Application from System Tray after PC Wakes from Sleep #54

Open
AbdelrahmanBayoumi opened this issue Jun 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AbdelrahmanBayoumi
Copy link
Owner

AbdelrahmanBayoumi commented Jun 8, 2024

Description:
There is a problem with the application's ability to restore from the system tray after the PC wakes from sleep. The app does not open when clicking the tray icon, and the memory usage in the task manager shows only 20MB, while normally it should be around 150MB.

Steps to Reproduce:
Unfortunately, this issue does not happen all the time, so there are no specific steps to reproduce it consistently.

Expected Behavior:
The application should restore and display the main window when clicking the tray icon after the PC wakes from sleep.

Actual Behavior:
The application does not restore and remains in the system tray. The task manager shows the application is using only 20MB of memory, which is significantly less than the normal 150MB.

Additional Information:

  • The tray icon's right-click menu still works, and menu items such as 'Exit' function correctly.
  • This issue only occurs after the PC wakes from sleep; otherwise, the tray functionality works as expected.
  • This issue is intermittent and does not happen every time the PC wakes from sleep.

Possible Cause:
It might be related to how the application handles system sleep and wake events. Proper handling of these events could help maintain the application state and prevent issues with memory usage.

Suggested Solution:
Implement a system event listener to handle sleep and wake events, ensuring the application restores correctly from the system tray. Using a native library like JNA (Java Native Access) to interface with the Windows API might help in detecting these power events.

@AbdelrahmanBayoumi AbdelrahmanBayoumi added the bug Something isn't working label Jun 8, 2024
@AbdelrahmanBayoumi AbdelrahmanBayoumi moved this to 🚢 Todo in Azkar Roadmap Jun 8, 2024
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
Status: 🚢 Todo
Development

No branches or pull requests

1 participant