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

Fullscreen break on multiple monitors #89

Open
Hydro8 opened this issue Jun 22, 2020 · 17 comments
Open

Fullscreen break on multiple monitors #89

Hydro8 opened this issue Jun 22, 2020 · 17 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@Hydro8
Copy link

Hydro8 commented Jun 22, 2020

Hi

I have three screens at my work. Is it possible to have a setting to choose if break screen take only one screen or every screens ?
Or is it too much ?

Thank !

@roldanjr roldanjr added the question Further information is requested label Jun 22, 2020
@roldanjr
Copy link
Member

Is it occupying the whole three screens on break?

@Hydro8
Copy link
Author

Hydro8 commented Jun 22, 2020

The timer is on the right screen :

image

So the break is full screen for the right screen :

image

What will be awesome is to be able to have full screen break on all screen and the timer on middle screen. Don't know if it's possible and easy to implement ?

@roldanjr
Copy link
Member

It's really hard to tell. I think it is possible to occupy all screen but programmatically setting the timer on the middle of the all the screens is not doable.

@roldanjr
Copy link
Member

roldanjr commented Jun 23, 2020

@sekwah41 do you use multiple screens? Maybe you could help us if you do.

Here I found Electron Screen API but I can't implement it because I only used one.

Maybe you have an idea too? Thank you.

@sekwah41
Copy link
Member

sekwah41 commented Jun 23, 2020

Yea ive got 4 :)

The best method I can think of for this as its a react application would be to use the timer component and make x number of windows for the extra screens and figure out which one the application is currently on.

Or a more robust method would be to not turn the normal program into one of the windows and open new timeout timers over all the screens which are communicated with via sending messages over the ipc rather than having a timer for every single one.

As long as you move the window within the display before full screening it then it should go to the right display :)

Ive got a lot of projects to work on atm though I can take a look at it when I get a moment.

@roldanjr roldanjr added the help wanted Extra attention is needed label Jun 23, 2020
@sekwah41
Copy link
Member

The easiest way to achieve this would be to add a second router that can swap out the whole page with one that is only a timer for breaks and add timer pulses to the ipc. The new approach would be fine to use even in single desktop mode if wanted and would just replace the code for the fullscreen event.

I'm still learning react so it may be a bit fiddly or may need some cleanup from you. I'll see if I get any time tonight to try to make it.

@roldanjr
Copy link
Member

Thanks for the effort @sekwah41 .

@sekwah41
Copy link
Member

Sorry that ive vanished on this. I was relatively new to react and have been balancing my job and some personal work.

So the best way I thought of doing this was to make a new page on the top-level router and use that for the extra displays to be made for the other screens. Ive partially implemented it but when I get some time I'll try to finish it off :)

@roldanjr
Copy link
Member

No worries @sekwah41 . It's okay I understand.

By the way, I've restructured the app architecture to be more future proof.

I need to change it to a monorepo style using Lerna and Yarn Workspaces so that there's a clear separation of concerns between renderer and main process and also makes it easier for code sharing between those processes.

Please check it out as soon as you can. Thank you friend.

@roldanjr roldanjr added the enhancement New feature or request label Aug 21, 2020
@diegonz
Copy link

diegonz commented Dec 15, 2020

Hello, I think that not taking all screens somewhat breaks the purpose of full screen breaks.

For example, if I'm doing web development I usually have several open apps spread around all available screens, which in break time translates to my main window (editor, terminal) "having a break " but all remaining screens showing the web browser, developer tools pane, etc.

@sekwah41
Copy link
Member

I will take a look into this once we've merged the currently outstanding PR's. It's also been raised more recently as part of #207 and #180.

I've ended up writing some of my own apps since this issue was originally raised and have a better understanding of electron so likely can get it all sorted this time. Just need to schedule the time between my other projects though if anyone else wants to pick it up before I get to it they are more than welcome ❤️

@sekwah41 sekwah41 pinned this issue Feb 25, 2022
@sekwah41 sekwah41 changed the title Multiple screen Fullscreen break on multiple monitors Feb 25, 2022
@sekwah41
Copy link
Member

I've also pinned the issue as it's been opened a few times more and it's quite an old one.

@sekwah41
Copy link
Member

We are looking to switch platforms to Tauri but it seems the Linux targets are a bit limited. So I will take a look at getting it working hopefully on electron first. I mean if we just make sure it's calling a generic function of fullscreen break whatever backend system is running can handle that in its own way.

@roldanjr roldanjr self-assigned this May 5, 2023
@LeonPyramid
Copy link

Hello, do you have news on this issue?

@sekwah41
Copy link
Member

Atm I am planning to focus on the Tauri version so I am planning to re-visit this once we've got that fully replacing Electron or mostly replacing.

@gianpaj
Copy link

gianpaj commented Mar 7, 2024

While I'm not a Tauri developer, Pomatez only calls Tauri's API:

const setFullScreen = (
flag: boolean,
alwaysOnTop: boolean,
win: BrowserWindow | null,
isFullscreen: FullscreenState["isFullscreen"]
) => {
if (flag) {
win?.setResizable(true);
}
win?.setFullScreenable(true);
win?.setAlwaysOnTop(alwaysOnTop, "screen-saver");
win?.setFullScreen(flag);
win?.setVisibleOnAllWorkspaces(flag);
win?.show();
win?.focus();
isFullscreen = flag;
};

https://tauri.app/v1/api/js/window/#setfullscreen

And I can't find any issue about "multiple monitors" 'displays' or 'screens'
e.g. https://github.com/search?q=repo%3Atauri-apps%2Ftauri+multiple+fullscreen&type=issues

I believe they need to implement that first that first so that API can be used here.

@sekwah41
Copy link
Member

sekwah41 commented Mar 7, 2024

@gianpaj i'm not had a chance to take a look at this lately and other tasks have taken priority however it wouldn't be just Tauri that needs to implement this. Basically if it supports multiple windows we can get the screen locations and other data another way.

Also we'd need to implement it for both electron and Tauri unless I focused on making the electron version obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
Status: In Progress
Development

No branches or pull requests

6 participants