Skip to content

Conversation

@navi-desu
Copy link

By EWMH, the root window should have _NET_ACTIVE_WINDOW holding the id
of the currently focused window, some applications rely on it when
_NET_ACTIVE_WINDOW is supported to track focus, including wine >= 10.0

By EWMH, the root window should have _NET_ACTIVE_WINDOW holding the id
of the currently focused window, some applications rely on it when
_NET_ACTIVE_WINDOW is supported to track focus, including wine >= 10.0
Plagman pushed a commit to ValveSoftware/wine that referenced this pull request Jan 19, 2026
…der gamescope.

gamescope does not set the NET_ACTIVE_WINDOW property in the root
window, meaning we can't rely on it to track focus or some games will
keep input focus regardless of what window is on top

gamescope pull request: ValveSoftware/gamescope#2063

CW-Bug-Id: #26217
Window id = xwayland().id;

XRaiseWindow(ctx->dpy, id);
XChangeProperty(ctx->dpy, ctx->root, XInternAtom(ctx->dpy, "_NET_ACTIVE_WINDOW", false),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally you want to cache this: XInternAtom(ctx->dpy, "_NET_ACTIVE_WINDOW", false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants