Skip to content

staging/xdg-activation: add a request for choosing windows to activate

Some clients allow having multiple documents in a single window, while also allowing multiple windows at the same time. When such a client is asked to open a new document by another application, it needs to choose a window to open it in, but it doesn't have enough contextual information to do that well in all cases. It can for example not know if a window is currently on an inactive virtual desktop.

The added request and event solve this problem by having the client provide an activation token and a list of windows, so that the compositor can choose the best window for opening a new document for the application. It may also not choose any window, in which case the application should create a new window.

Signed-off-by: Xaver Hugl xaver.hugl@gmail.com

TODO:

  • a better name than "window_hint"? I can't think of anything atm that's both generic and specific enough
  • should this be a separate protocol? It sort of fits in with xdg activation but I'm not sure
  • should sending a wl_surface that isn't a "toplevel" be a protocol error, or should the compositor just ignore them? I'm not using xdg-shell toplevels to not unnecessarily restrict compatibility with future protocols, but allowing subsurfaces or popups is weird

WIP KWin implementation: https://invent.kde.org/plasma/kwin/-/tree/work/zamundaaa/window-activation-hint

Closes #137

Edited by Xaver Hugl

Merge request reports

Loading