Closed paulb-galacticadvisors closed 5 months ago
Can't you just manually resize the apps' window to extend it to fit on both monitors? Or do you mean in full screen mode? (edit: just noticed that the title says full screen reader, so I'm assuming that's the case) I don't have much experience with multi monitor configurations so at least for now I'm going to mark this as out of scope (edit: as I currently don't have an easy way to test your setup), but let me know exactly how you expect the app to behave in your situation in case I have some day the opportunity to research and try solutions for this (edit: extend through both monitors in fullscreen mode if possible or a borderless window that does the same, hiding the menu bar... what about the OS's task bar? would you mind it being still there or should it be a truly borderless full screen window and occupy all the space? Don't know how much of this, if any, is possible with Electron, but just in case I'm able to work on this in the future).
Sadly no, maximizing the window maximizes to just a single screen. And the graphics driver doesn't offer a span mode.
I've started to develop an application that uses the CefSharp library to embed a Chromium web brower into an app, and I have it spanning both screens.
The way multiple monitors work is similar to a single display a single 1920 x 1080 display has 0,0 as the top left and 1920,1080 as the bottom right.
Two 1080p screens side by side with the "main" screen set to the right would have. -1921,0 top left of left screen, -1, 1080 as bottom right of the left screen. 0,0 top left of the right screen, 1920, 1080 as as bottom right of the right screen.
Here's the code I'm using to automatically resize the window and display across both displays without using maximize which is limited to a single screen.
this.FormBorderStyle = FormBorderStyle.None;
foreach (Screen s in Screen.AllScreens)
{
if (s != Screen.FromControl(this)) // Blackout only the secondary screens
r = Rectangle.Union(r, s.Bounds);
}
// Resize the main form across all screens
this.Top = r.Top;screens.
this.Left = r.Left;
this.Width = r.Width;
this.Height = r.Height + r.Top;
So, if you manually resize it (not maximize it, but placing the mouse over a window border and dragging it to resize the window and stretch it across both screens), it doesn't let you go beyond the current screen? (I'd have thought that would achieve the same thing you are doing with your code)
I just tried it with my notebook and an external monitor and manually resizing it works for me on Windows and Linux. Edit: I can stretch the window to cover both screens.
What it doesn't do is restore that size the next time it's launched. I could try to add an option to enable forcing the app to resize itself, once started (as I feel like electron doesn't allow this at window creation), at the maximum size allowed by the combination of all the monitors available... and hope it works :)
If this is something you'd be interested in (it still wouldn't be a true fullscreen mode, just a windowed mode that stretches both screens), and I manage to make it work (I've read conflicting reports about managing to do this with electron, and with different versions of it, so I won't know until I try), I could try adding it as an experimental option (you'd have to enable it manually from the config file, wouldn't be on the UI for now) for the next release if you answer me on time to know it's worth the effort (the plan is to release it this weekend edit: I'm waiting for a translation file update and have a few more things to finish so it may take longer) and I can manage to squeeze it by then. After that, I don't know when the next release will be or will have time to experiment with this.
I had some time to implement what I mentioned before and found a way to, I think, make it work (setting the window's size to a value bigger than the main display doesn't seem to work on electron but setting the minimum size seems to do the trick, as I read mentioned somewhere). I've added an option in the config file to enable this and it will be part of the next release.
I'll try to let you know here when it's available to download and how to configure it so you can test it.
Just released the next stable version, 3.5.0, containing the option I mentioned. To enable it you have to edit acbr's config file. Its default location is something like:
C:\Users\<username>\AppData\Roaming\acbr-comic-book-reader\acbr.cfg
/home/<username>/.config/acbr-comic-book-reader/acbr.cfg
There, at the bottom, you have to change the entry (run the new version of ACBR at least once for it to appear, or add it yourself):
"experimentalForceMultimonitorSize": 0
From 0, which means that the option is disabled, to a number from 1 to 4, with each one doing the following:
Thanks for the quick implementation. This is looking great so far. I'll need to spend some time with it, but both 1 & 2 look great.
Only issue I saw was it initially opening with it shifted to the right and down a bit. But I think manually moving and exiting fit it. I'll see if I can get it to happen again and be repeatable.
Happy to hear it more or less works as you wanted. My laptop and external monitor have very different resolutions so I can't really replicate a setup like yours to properly test it.
I'll close the issue, as the requested feature seems to work, but don't hesitate to continue the conversation if you have anything to add.
I found a less expensive dual screen Windows laptop, but so far it doesn't look like any comic readers support display across multiple screens, and so far I haven't been successful in getting the display settings into a span mode as Intel claims that internal displays can't be combined with external monitors.
When just spanning a web browser across both screens the experience is really awesome as they are 14" displays to larger than a Omni or OHC. Would it be possible to have the reader display on both displays?
A true full screen mode might not be possible, but an always on top, borderless window that uses the full viewable area versus the a single display should work.