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

Taskbar progress #3241

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

valaphee
Copy link
Contributor

@valaphee valaphee commented Nov 25, 2023

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

This adds a simple way to set the progress indicator in the taskbar on Windows, there is still no way to set the state to error or paused, and don't know if it should be added.

@daxpedda
Copy link
Member

daxpedda commented Nov 26, 2023

Dropping some stuff I found while searching for cross-platform compatibility:

  • taskbar_interface - Rust crate that can do this externally (with window handles). Supports Windows and Linux.
  • X11 can be supported through libxapps with _NET_WM_XAPP_PROGRESS. Actual DE support is spotty.
  • There is a Unity Launcher API for this, which e.g. KDE supports. I assume this isn't something we can support in Winit.
  • MacOS has the ability to draw whatever in the taskbar, so there are some implementations that simply draw a progressbar. See e.g. DockProgressBar.

@valaphee
Copy link
Contributor Author

Ah didn't know that this is not only a Windows thing, will look into it

@daxpedda
Copy link
Member

Ah didn't know that this is not only a Windows thing, will look into it

Let's do it in follow-ups though, because this here is uncontroversial while the others are not.
You should get the other backends approved by the corresponding backend maintainers first before putting in any significant work.

@kchibisov
Copy link
Member

Such stuff generally has nothing to do with windowing which is all winit about. That's the reason external APIs exist.

On Linux there's no standard interface for that, the same goes to tray. It's usually all dbus, because again, nothing to do with windowing and tied to specific DE, so not winit job.

@notgull
Copy link
Member

notgull commented Nov 26, 2023

Agreed with @kchibisov. If it has nothing to do with windowing, it doesn't belong in winit.

@valaphee
Copy link
Contributor Author

valaphee commented Nov 27, 2023

I mean there is already a function to hide the window in the taskbar, and I agree that the taskbar and tray area are not really window related. But the necessary groundwork is already there and setting the progress requires the hwnd, and having the functionality in winit makes it also more visible to the user. It's also relatively light-weight, easy to maintain, and common.

But I would never add other taskbar functionalities though like adding buttons, etc.

@valaphee
Copy link
Contributor Author

@daxpedda
Copy link
Member

Such stuff generally has nothing to do with windowing which is all winit about. That's the reason external APIs exist.

On Linux there's no standard interface for that, the same goes to tray. It's usually all dbus, because again, nothing to do with windowing and tied to specific DE, so not winit job.

I assume this was meant for Linux only? Windows still seems in scope to me considering we are handling plenty of similar taskbar related things there already.

I would consider MacOS not in scope as well because it doesn't actually offer an API to do that.

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

Successfully merging this pull request may close these issues.

None yet

4 participants