Fixes#2568
The binding that gets stored in the keyboard's `repeat_binding` would
get freed on reload, leaving a dangling pointer.
Rather than attempt to unset the keyboard's `repeat_binding` along with
the other bindings, I opted to just not set it for the reload command
because there's no point in reloading repeatedly by holding the binding.
This disables repeat bindings for the reload command.
As we now need to detect whether it's a reload command in two places,
I've added a binding flag to track whether it's a reload or not.
Depends on https://github.com/swaywm/wlroots/pull/1222.
I don't know of a program that sets the state to modal without setting
the window type, but I know the modal property works because logging the
property shows it's true for the Firefox Open File dialog.
May as well make it as easy as possible for users who are coming from
i3.
This also changes the `border` command to accept a thickness when
setting the border to normal. This makes it work the same way as the
`default_border` command. Eg. `border normal 5`
If sway is reloaded using a bindsym which has multiple commands, it
failed to detect the reload command, didn't create a duplicate of the
binding and would crash because the reload command frees the bindings.
For example:
mode system {
bindsym r reload, mode default
}
In this example, the binding->command is "reload, mode default".
Fixes#2545
This moves the arrange_windows call into the arrange_layers function,
where we know the output actually needs to be arranged.
Additionally, we shouldn't set focus to the parent of an unknown
container type, because the parent may be an output and this causes a
crash because outputs can't have direct focus.
Fixes#2543
Rootston calls "wlr_xwayland_destroy" and "wl_display_destroy_clients"
on shutdown, but these were not called by Sway. Without them, Sway
crashes on exit before the display destroy event handler could be
called. This causes two problems:
- The TTY is not reset, and it locks up after exiting Sway.
- drmDropMaster is not called, and the implicit drop (that should
occur when the DRM fd is closed) seems not to be working in some
scenarios (e.g. if you have a tmux session running - maybe the fd
is retained somehow by tmux?). In other words, it you exit Sway,
you can't start it (or any other program that wants to be DRM
master) again until you close all your tmux sessions.
The "login" PAM configuration means somathing entirely different on
FreeBSD than on Linux: if you try to authenticate as the calling user,
it OKs the request without prompting for password. The "passwd" config
implements the desired functionality, therefore it should be used by
swaylock.
SYSCONFDIR is used to determine the path of the default configuration
file. 'sysconfdir' is set to 'prefix/sysconfdir' later (on line 139),
so configuration files are installed under 'prefix', but SYSCONFDIR did
not reflect it.