Oxygem / Kanmail

:inbox_tray: An email client that functions like a kanban board.
https://kanmail.io
Other
1.3k stars 89 forks source link

Fullscreen detection/remember (Kanmail doesn't remember it's window position and size [Win 10 20H2]) #145

Open georks opened 3 years ago

georks commented 3 years ago

Describe the bug When I start the app, Kanmail doesn't remember it's window position and size. I havo to resize the window everytime to fit the size to my screen. After reopening, the window size is bigger than the screen size and I have to resize again. Even when I set the app to fullscrenn, after reopening the window is bigger than the screen, so I can't reach the close button (X).

Screenshots If applicable, add screenshots to help explain your problem.

Additional context OS: Windows 10 20H2 Screen: 14'' full HD

Fizzadar commented 3 years ago

Thank you for spotting this! I shall do some tests on this over the next few days.

Fizzadar commented 3 years ago

This seems to happen specifically when making the window fullscreen - ie dragging the corners to the edge of the screen work as expected, but it looks like Windows shrinks the title bar ever so slightly when fullscreen. If possible I'd like to detect whether the app is fullscreen and save that information, so next time it opens up exactly as it was.

georks commented 3 years ago

So, I opened the app, resized it and set it to fullscreen. Then closed the app and reopened. It looks like the app is saving the fullscreen information. I have the dock on the right side and then it looks like this on the most upper right side:

Screenshot 2020-12-02 172027

The close button is behind the dock and the app not in fullscreen. Clicking fullscreen button and it looks fine.

grafik

Closing and reopening the app will reproduce this behaior

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Fizzadar commented 3 years ago

No real update here but I almost have a working Windows development environment, which should allow me a way to properly investigate potential fixes for this!

georks commented 3 years ago

@Fizzadar Do you have any advice, how I can help you to investigate the Windows version? Does Kanmail for Windows have some kind of development tools, like web browsers, or electron has?

Fizzadar commented 3 years ago

@georks for general development any browser will work (I use Firefox personally) - but for issues such as this the only way to debug is using the actual window implementation, which on Windows uses Edge normally. This is implemented by the pywebview library.

I did manage to get my Windows machine running - the fix stops the window saving larger than the screen, which is some improvement. However I cannot figure out any way to detect whether a window is fullscreen in JavaScript (I believe it's not a thing for privacy reasons) - so need to look into whether this is possible on the Python-side window object itself, managed by pywebview.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.