Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Added ICCCM WM_HINTS #406

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added ICCCM WM_HINTS #406

wants to merge 1 commit into from

Conversation

TAAPArthur
Copy link

@TAAPArthur TAAPArthur commented Jun 23, 2020

When the window is mapped, some ICCCM WM_HINTS are set.
The input field is set to true and state is set to NormalState.

To quote the spec, "The input field is used to communicate to the window
manager the input focus model used by the client" and "[c]lients with
the Passive and Locally Active models should set the input flag to
True". sxiv falls under the Passive Input model, since it expects keyboard
input, but only listens for key events on its single, top-level window instead
of subordinate windows (Locally Active) or the root window (Globally Active).

From the end users prospective, all EWMH/ICCCM compliant WMs (especially
the minimalistic ones) will allow the user to focus sxiv, which will
allow sxiv to receive key events. If the input field is not set, WMs are
allowed to assume that sxiv doesn't require focus.

For reference, the ICCC spec.

Summary of Input models

  • No Input (false) - for windows that don't have keybindings
  • Passive Input (true) - for windows whose keybindings are active only when the window has explicitly focus
  • Locally Active (true) - for programs with multiple mapped windows
  • Globally Active Input (true) - global keybindings

The reason why sxiv should provide WM_HINTS is because its perfectly acceptable for WMs to assume "convenient" values when they are not set. My ICCCM compliant, tiling WM (which is very similar to dwm and xmonad) choose to not give sxiv focus which made it basically impossible to interact with it. Of course its trivial to tell the WM to give sxiv focus ahead of time, but wanted other people to not run it this problem.

When the window is mapped, some ICCCM WM_HINTS are set.
The input field is set to true and state is set to NormalState.

To quote the spec, "The input field is used to communicate to the window
manager the input focus model used by the client" and "[c]lients with
the Passive and Locally Active models should set the input flag to
True". sxiv falls under the Passive Input model, since it expects keyboard
input, but only listens for key events on its single, top-level window instead
of subordinate windows (Locally Active) or the root window (Globally Active).

From the end users prospective, all EWMH/ICCCM compliant WMs (especially
the minimalistic ones) will allow the user to focus sxiv, which will
allow sxiv to receive key events. If the input field is not set, WMs are
allowed to assume that sxiv doesn't require focus.
@eylles
Copy link

eylles commented Apr 23, 2021

@TAAPArthur could you please mention what window manager experiences problems with sxiv? i plan to mantain a sxiv fork, already merged this PR onto my fork but would like to know what window manager to add it into the changelog

@bakkeby
Copy link

bakkeby commented Apr 23, 2021

@eylles I got the impression that the scenario was hypothetical and that this was added just out of principle.

@eylles
Copy link

eylles commented Apr 23, 2021

@bakkeby welp he wrote My ICCCM compliant, tiling WM (which is very similar to dwm and xmonad) choose to not give mpv focus which made it basically impossible to interact with it. Of course its trivial to tell the WM to give sxiv focus ahead of time, but wanted other people to not run it this problem. that means sxiv has a problem with whatever WM he uses thus i want to know which window manage is to properly document the changelog.

also it seems he goof'ed an wrote mpv instead of sxiv...

@eylles
Copy link

eylles commented Apr 23, 2021

ahhh so he wrote a window manager, MPX Manager
welp good to know

@TAAPArthur
Copy link
Author

@eylles Yeah my bad. mpv had a similar problem and copied the description of the fix. Will correct.

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

Successfully merging this pull request may close these issues.

None yet

3 participants