Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache _NET_WM_STATE property and add rule target wm_state #549

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Commits on Nov 29, 2020

  1. c2: Perform matching against "all" property values if no index is spe…

    …cified
    
    When matching against custom window properties or atoms perform the
    matching against all available values (currently hardcoded to a max. of 10)
    using logical OR if no index is specified.
    
    This should help when an atom has multiple values and you only want to
    check against any of these — e.g. hiding windows with state `hidden`:
    `--opacity-rule "0:_NET_WM_STATE@32a *= '_NET_WM_STATE_HIDDEN'"` —
    without having to explicitly specify each index separately.
    tryone144 committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    0e57e5e View commit details
    Browse the repository at this point in the history
  2. win: cache _NET_WM_STATE property for each window

    Keep track of the `_NET_WM_STATE` property for each managed window. Use
    the cached state to determine if window is fullscreen instead of
    querying the Xserver every time.
    tryone144 committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    9125693 View commit details
    Browse the repository at this point in the history
  3. c2: add new predefined target wm_state to match against `_NET_WM_ST…

    …ATE` in string
    
    New predefined target `wm_state` for rule-based matching. Matches
    against the cached `_NET_WM_STATE` property of a window in string
    representation.
    
    NOTE: `wm_state = 'fullscreen'` is not neccessarily identical to
    `fullscreen`, and `wm_state = 'focused'` is not identical to `focused`.
    tryone144 committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    dac6785 View commit details
    Browse the repository at this point in the history