swayfx/include
Brian Ashworth 7d2076cbff criteria: fix __focused__ when no focus or unset
This fixes the behavior of `__focused__` when there is no focused view
to match i3's behavior of successfully matching no views instead of
returning an error of a missing value. It also applies the same logic
when a token is not applicable (or unset) for a view such as `app_id`
for a focused xwayland view or `class` for a focused xdg-shell view.

This adds an `autofail` boolean to `struct criteria`. If it is set to
`true`, then `criteria_matches_view` will immediately bail out as a
no match. If `autofail` is set, the criteria will also not be
considered empty by `criteria_is_empty`.

To set this new `autofail` property, `get_focused_prop` will now take
in a boolean pointer of the same name. If `__focused__` is supported
for the token and there is no focused view or the focused view does not
have a value for the token, then the boolean will be set to true. In
`parse_token`, the boolean value will be checked and if set to true,
then `criteria->autofail` will be set to true and `parse_token` will
bail successfully. Tokens will still be parsed to make sure the whole
criteria is syntactically valid, which is also why
`&criteria->autofail` is not passed to `get_focused_prop` and a local
boolean is declared in `parse_token`.
2019-03-23 09:53:23 +02:00
..
sway criteria: fix __focused__ when no focus or unset 2019-03-23 09:53:23 +02:00
swaybar swaybar: add overlay mode (fix #1620) 2019-02-24 20:05:47 -05:00
swaynag Implement swaynag -B/--button-no-terminal 2018-11-27 23:34:51 -05:00
background-image.h Initial swaylock port 2018-04-04 18:47:48 -04:00
cairo.h Removed unused wlroots dependency for sway(bg|bar|msg|nag) 2019-01-21 13:04:15 -05:00
ipc-client.h swaybar: move core functionality to state.c 2016-01-24 14:22:19 +01:00
ipc.h Add failure reply on IPC_SYNC 2018-12-29 17:07:26 +01:00
list.h list.c: rename free_flat_list to list_free_items_and_destroy 2018-12-09 01:15:38 +00:00
log.h Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
loop.h Remove timerfd from loop implementation 2018-10-15 00:26:27 +10:00
meson.build Address review comments 2018-03-28 14:43:23 -04:00
pango.h Fix pango escaping and refactor escape_markup_text 2018-09-22 18:33:28 +10:00
pool-buffer.h client/pool-buffer: munmap in destroy_buffer 2018-05-27 14:09:48 +01:00
stringop.h stringop.c: remove unused functions 2019-03-11 14:42:58 +01:00
util.h util.c: remove numlen function 2019-01-22 13:10:25 +01:00