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

Override redirect type of root Window (force floating, force geometry)? #2289

Closed
Animeshz opened this issue Feb 26, 2023 · 4 comments
Closed
Labels
a:backend-winit Winit backend (mS,mO) enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this

Comments

@Animeshz
Copy link

Animeshz commented Feb 26, 2023

Applications like rofi / dmenu / launcy / alfred / wox, etc uses something called as override-redirect to make them appear at the middle (or some specific location) on the screen bypassing the interference of the window-manager and other utilities.

(PS: We can also start rofi as normal window with rofi -normal-window to see the difference)

It allows them to draw custom popup menu anywhere on the screen, including on tiling window managers, on their own decision.

It is very useful for applications including:

  • App Launchers
  • File Searchers
  • Quick Workspace Navigation
  • Clipboard Management
  • Quick Calculator
  • Quick Access to Song Selector / Controller (as popup), etc.

Is there support for this in slint already, or can there be support for this? I would like to make a few applications on this purpose, and finding it difficult to find a good fit framework instead of going system-specific library for each platform...

I'm open for any discussion!

@Animeshz
Copy link
Author

@tronical
Copy link
Member

tronical commented Feb 27, 2023

I think that's a very reasonable request. I can think of two ways of fitting this in:

  1. You run your own event loop, create the window with winit and use low-level winit API to configure the window. The downside is that this requires also using low-level Slint platform API and at the moment only the Software Renderer is available for use here. We're working on splitting out the Skia and FemtoVG renderers (in Extract the FemtoVG renderer into a separate crate #2142) into separate crates, but they don't have public API yet.

  2. We expose the raw window handle (as per expose window as RawWindowHandle #877) and then you configure window attributes after creation.

I think 2. is the cleaner approach in a way, but it's not ready yet. 1. is more flexible in the long run, but requires the use of private API at the moment :(

What do you think?

@tronical
Copy link
Member

In #2617 we added a third way: provide access to the winit window.

@ogoffart ogoffart added the a:backend-winit Winit backend (mS,mO) label Jul 18, 2023
@ogoffart ogoffart added enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this labels Jan 16, 2024
@ogoffart
Copy link
Member

I discussed with @tronical and we thought that this is an exotic API and it can only be done using the internal API and using winit API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:backend-winit Winit backend (mS,mO) enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this
Projects
None yet
Development

No branches or pull requests

3 participants