Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

add xwayland unmanaged tests to support dmenu #670

Merged
merged 1 commit into from
Feb 27, 2018

Conversation

Ongy
Copy link

@Ongy Ongy commented Feb 25, 2018

This adds wlr_xwayland_surface_is_unamanged, to allow compositors more
fine grained control over XWayland focus.
A surface that is unmanaged should not receive focus, while other
windows that are just override redirect may want it (dmenu).
The way unamanged is determined is taken from wlc.

This fixes #636

I have only tested this with a single seat. With the current way inital focus is applied, it may have interesting effect in multiseat setups when a popup/tooltip doesn't have the NET_WM_TYPE set.

NET_WM_WINDOW_TYPE_POPUP_MENU,
NET_WM_WINDOW_TYPE_COMBO, };

for (unsigned i = 0; i < sizeof(needles) / sizeof(needles[0]); ++i) {
Copy link
Member

Choose a reason for hiding this comment

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

Use size_t



bool wlr_xwayland_surface_is_unmanaged(const struct wlr_xwayland_surface *surface) {
static enum atom_name needles[] = { NET_WM_WINDOW_TYPE_UTILITY,
Copy link
Member

Choose a reason for hiding this comment

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

Style nitpick: add a newline after opening brackets and before closing brackets.

This adds `wlr_xwayland_surface_is_unamanged`, to allow compositors more
fine grained control over XWayland focus.
A surface that is unmanaged should not receive focus, while other
windows that are just override redirect may want it (dmenu).
The way unamanged is determined is taken from wlc.
@emersion
Copy link
Member

@Ongy It seems GitHub doesn't send notifications when you force-push. Feel free to ping again the reviewer when you do that.

@emersion emersion merged commit c2ba186 into swaywm:master Feb 27, 2018
@Ongy Ongy deleted the xwayland_unmanaged branch May 7, 2018 10:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

rootston: dmenu doesn't receive focus
3 participants