mirror of
https://github.com/swaywm/sway.git
synced 2026-02-20 01:40:41 -05:00
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
|
||
|---|---|---|
| .. | ||
| commands | ||
| config | ||
| desktop | ||
| input | ||
| tree | ||
| commands.c | ||
| config.c | ||
| criteria.c | ||
| decoration.c | ||
| ipc-json.c | ||
| ipc-server.c | ||
| main.c | ||
| meson.build | ||
| server.c | ||
| sway-bar.5.scd | ||
| sway-input.5.scd | ||
| sway-ipc.7.scd | ||
| sway-output.5.scd | ||
| sway.1.scd | ||
| sway.5.scd | ||
| swaynag.c | ||
| xdg_decoration.c | ||