Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Notification windows are still unmanaged #8

Open
Ashark opened this issue Oct 3, 2021 · 2 comments
Open

Notification windows are still unmanaged #8

Ashark opened this issue Oct 3, 2021 · 2 comments

Comments

@Ashark
Copy link

Ashark commented Oct 3, 2021

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
Copy link
Author

Ashark commented Oct 4, 2021

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
Copy link
Author

Ashark commented Oct 4, 2021

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant