Make it possible to build "standard" dialogs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
By "standard", I mean something akin to `Gdk.MessageDialog` or `Gtk.Dialog`.
Currently, the two options I see are:
- `WindowLevel::AppWindow`, but then the window isn't properly transient for its parent, the parent is not disabled, and `_NET_WM_STATE_SKIP_TASKBAR` is not available.
- `WindowLevel::Modal`, where override redirect is set, fixing most of the points above, but also removing titlebars in the process (and on most window managers the ability to move the window).
Given how common dialogs are, it might be suitable to create a `WindowLevel::Dialog(parent)` that sets things up akin to `Gtk.Dialog`.
But ideally, `WindowDesc` would be given more customizability instead. Especially because you can write something like this right now and wonder why there is no titlebar:
```rust
WindowDesc::new(widget)
// I demand a titlebar
.set_titlebar(true)
// But the modal will silently ignore it
.window_level(WindowLevel::Modal(parent))
```
So my wishlist to extend a `WindowLevel::Modal` window description would be:
- `WindowDesc::set_titlebar` works
- titlebar buttons can be toggled (e.g. `All`/`Close`/`None`)
- `WindowDesc::resizable` works
- `_NET_WM_STATE_SKIP_TASKBAR`/`GtkWindow:skip-taskbar-hint` can be set
- `GTK_DIALOG_DESTROY_WITH_PARENT` can be set
- override redirect should either not be set or customizable
- incompatible options (e.g. `set_redirect_override(true)` + `set_titlebar(true)`) produce some kind of notice
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with WindowDesc and WindowLevel::Modal, then trace how the listed window options are handled. Compare the current behavior with the requested standard-dialog behavior, including titlebars, buttons, resizability, taskbar hints, parent destruction, and override redirect. Done means the API behavior and incompatibility notices are defined and the requested dialog capabilities work together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100