steamwm icon indicating copy to clipboard operation
steamwm copied to clipboard

Notification windows are still unmanaged

Open Ashark opened this issue 4 years ago • 2 comments

I run steam via steamvm, but notification windows are still unmanaged.

From kde System Settings - "Window Management" - "Window Rules" I press "Detect Window Properties" and click on a notification from steam. Then in Window Rules I see Error window saying: Could not detect window properties. The window is not managed by KWin.

Ashark avatar Oct 03 '21 12:10 Ashark

When I use xprop on a notification, I got this:

_VARIABLE_REFRESH(CARDINAL) = 1
WM_CLIENT_LEADER(WINDOW): window id # 0x1600002
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified size: 240 by 74
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_TRANSIENT_FOR(WINDOW): window id # 0x1400005
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                window id # of group leader: 0x1600002
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_MENU, _KDE_NET_WM_WINDOW_TYPE_OVERRIDE
WM_CLASS(STRING) = "Steam", "Steam"

As I understand, the problem is that its type is menu (_NET_WM_WINDOW_TYPE_MENU).

Ashark avatar Oct 04 '21 00:10 Ashark

Setting of managed windows is done inside of name_changed function, but it is for some reason not invoked for notification windows. Probably, need to add additional condition for that case.

I have found out that following worked (notifications become managed windows). In the INTERCEPT XChangeProperty function at line 276 add

name_changed(dpy, w, data, n);

So the name_changed function is called at every property change.

At line 326 change

if(manage_errors && is_unmanaged_window(dpy, w) && is_dialog_window_name(value)) {

to

if(manage_errors && is_unmanaged_window(dpy, w)) {

because the notification windows have empty title, and not in dialog_windows array.

Now need to find out which proper condition to use for that (instead of invoking name_changed unconditionally).

Ashark avatar Oct 04 '21 01:10 Ashark