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

div over programs #8

Closed
danielmeloalencar opened this issue Apr 19, 2024 · 8 comments
Closed

div over programs #8

danielmeloalencar opened this issue Apr 19, 2024 · 8 comments

Comments

@danielmeloalencar
Copy link
Contributor

In packages/react-config/desktop.tsx, how can I make my component or div stay on top of any open application?

@wnayes
Copy link
Owner

wnayes commented Apr 19, 2024

That kind of layering would only be possible by involving additional browser windows. I didn't make an API to support that yet, but it sounds interesting.

@danielmeloalencar
Copy link
Contributor Author

danielmeloalencar commented Apr 19, 2024

Yes, and the possibility of positioning this browser window as you wish in relation to the width and height of the screen. A use case would be to create a start menu or a top panel, for example.

I would really like to help in the development of these things, but some things in the project end up making my understanding difficult, such as the use of packages for desktop, tray, wallpaper, etc... instead of just using components within a directory called Components.

@wnayes
Copy link
Owner

wnayes commented Apr 20, 2024

Here's an article that describes how this sort of thing might be possible:
https://pietrasiak.com/creating-multi-window-electron-apps-using-react-portals

The "ChildWindow" described in that article would probably be something that would live in the react package in this repository, which is the place where all the general React-related functionality lives.

There are only separate packages for things like wallpaper because they are "pluggable" aspects of the window manager that don't have to be used. It also makes them potentially a little bit easier to copy out and fork from if someone wanted to create derivative packages.

@danielmeloalencar
Copy link
Contributor Author

That kind of layering would only be possible by involving additional browser windows. I didn't make an API to support that yet, but it sounds interesting.

Do you intend to do so? I believe it should be a priority, as it will open up many possibilities.

@wnayes
Copy link
Owner

wnayes commented Apr 26, 2024

I would eventually get around to implementing it I think, but would also accept a PR for it.

@danielmeloalencar
Copy link
Contributor Author

I would eventually get around to implementing it I think, but would also accept a PR for it.

To do this, we need the ability to render components in a window without a title bar and transparent, in addition to being able to set the position, width and height of the window. This way we could create a start menu.

@danielmeloalencar
Copy link
Contributor Author

I would eventually get around to implementing it I think, but would also accept a PR for it.

I will try to do it

@danielmeloalencar
Copy link
Contributor Author

First attempt here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants