gnif / LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
GNU General Public License v2.0
4.66k stars 257 forks source link

Support Extended Window Manager Hints #1013

Closed jfu334 closed 2 years ago

jfu334 commented 2 years ago

The "Extended Window Manager Hints" Specification states some additional data fields to be set for X11 windows:

https://specifications.freedesktop.org/wm-spec/latest/ and more specific https://specifications.freedesktop.org/wm-spec/latest/ar01s05.html

Currently the looking-glass-client window does not conform to this spec. For example without _NET_WM_PID it is impossible on X11 systems to find the PID responsible for a certain window.

On a full working desktop with around 20 open windows (GTK, QT and some other) looking-glass-client was the only window without _NET_WM_PID set.

Actual use case:

A background script checks the processes behind the X11 windows shown through Xlib. If the process matches certain criteria (being from another user, having different home etc.) WM_CLASS is modified. A subsequent KWin rule is used to colorize the titlebar of these special windows.

Without _NET_WM_PID it is not possible to get the process, thus the window can't be colorized.