-
Notifications
You must be signed in to change notification settings - Fork 67
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
Support pinned windows #11
Comments
Would have to detect if it's roughly half/quarter screen size, then mark as appropriate, and recalc on load... OSX may be harder with the dock as part of the calculation. |
@tracker1 it still wouldn't be pinned though in that case. A new Electron method might be required to pin the window. Also, it's not always half the screen by the way (the separator can be dragged to adjust the ratio). |
I just checked on macOS: the window is reported as being fullscreen and will get streched to the whole screen on restart. Even if we could find out that its a split window there is currently no API in electron to reset this. It seems there isn´t even a native API to trigger this: electron/electron#3545 So I´m not if anything can be done here. |
That is an acceptable outcome for me. (Might be worth documenting that this happens though)
Maybe we could have an option (or just do it always) that if it was pinned on Windows, don't try to restore it at all. I.e. leave the size screen alone if it was pinned when your app was last open. |
Also
I read that after replying... woops. I had assumed you meant there was no native API for Mac or Windows. So Electron might be able to add an API method for it for Windows hypothetically. But still, even if that's true, before then we could still have it do nothing if it was pinned on Windows. |
Just checked on a windows machine. When the window is pinned to the left I get a state like this:
So the window does not get reported as maximized and just looking at the dimensions also seems quite error prone to kind of guess a pinned window from them. |
I am using Windows Powertools FancyZones to snap program windows to custom screen areas. In fact I have a very simple horizontal layout of two areas, a left part with just a fraction below two thirds of my screen width and a right part with just about one third of my screen width. I would prefer to snap Element Desktop Client to that right part. When restarting Element Desktop Client after having it snapped, it will always appear as a top left positioned window with about half screen height and approx. 40% screen width. In contrast to that, when I snap Element to my right screen area and then manually reduce its size so its window borders do not touch the lower and right screen border (it has to be both; my windows task bar is at the top of my screen), it will restart in exactly that size and at that position. |
Nice module. This is a tricky one.
If you pin a window to the left/right on Windows 10 or Mac OS X for example, kill the app, and re-open it, the window will be put on the left/right but it won't be correct. It'll just be placed in the right place, but it won't be pinned. So ideally this should be supported like how maximizing is supported already (instead of simply restoring the coordinates and dimensions of the maximized window).
I'm not sure how you could work around this though 😞
The text was updated successfully, but these errors were encountered: