swaywm/wlr-protocols

foreign-toplevel-management: skip taskbar hint?

dkondor opened this issue · 2 comments

Some toplevels might better not be displayed as a separate entity in a taskbar / dock. Typical examples are the "Exit without saving changes?" confirmation dialogs in many apps, or "properties", "settings" and similar modal dialogs. In many cases, these are implemented as toplevels, and thus communicated in the foreign-toplevel-management protocol.

Is there a supported way to identify these cases so that a dock can skip these?

Specific example:

  1. Start wayfire and wf-dock (https://github.com/WayfireWM/wayfire/ and https://github.com/WayfireWM/wf-shell)
  2. Start gedit. An icon for it shows up in wf-dock (as expected).
  3. Type something
  4. Try to close gedit. A dialog appears prompting to save changes.

Expected behavior: the confirmation dialog is not shown in the dock.

Actual behavior: a second gedit icon appears in the dock, corresponding to the dialog.

Similar behavior happens e.g. with the properties dialog in nautilus, confirmation and search dialogs in geany, etc.

I don't think it is a problem specific to wf-dock, at least I do not see anything in this protocol that could be used to identify that a toplevel is a dialog that should be skipped. Furthermore, while e.g. GTK has a gtk_window_set_skip_taskbar_hint() function, in the xdg-shell protocol, I also do not see any way for an app to communicate this to the compositor.

Reporting the parent (as per #52 ) could help, since in this case, a dock could decide to not show child windows / views, or group them with the parent. But this might not be a complete solution, in some cases, it might be preferred to show a child separately.

I think reporting the parent would be enough. At least it's enough for GNOME and KDE right now.

Closing this, since #52 solves this at least for dialogs