diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2020-11-17 00:26:38 +0000 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2020-11-17 00:26:38 +0000 |
| commit | 8d57beeaff68a6897d268b0f4d6aeb27fb251d61 (patch) | |
| tree | b2a2dcea5eb3b4261aefd9305182528143b441e6 /include | |
| parent | 220846ca01c16d11e531ebdf807d123957cbd1b7 (diff) | |
criteria: fix crash when comparing NULL properties
For each following combinations of criteria & command below, the command would
crash sway without the fix.
It's particular about the __focused__ criteria, where the view matches part of
the criteria but not the focused app, leading to a failure when calling
`strcmp` with NULL.
"xterm" is a non-wayland app (X11) and "kitty" is. Both are terminals.
# "class" is specific to X11
# The view is X11 (xterm) leading to the criteria checking for the
# focused app's class, leading to a crash
for_window [class="__focused__"] floating enable
exec kitty -e xterm
# Similarly, crash as the focused app (xterm) has no app_id when the view has one
for_window [app_id="__focused__"] floating enable
exec xterm -e kitty
# If the view has a title but not the focused app: NULL title will crash criteria checking
for_window [title="__focused__"] floating enable
exec xterm -title "" -e xterm
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
