Age | Commit message (Collapse) | Author |
|
When making the reload validation improvements, I forgot that input type
configs are stored in a separate list. This makes it so input type
configs are correctly applied on reload.
|
|
This reverts commit a3da7fec32b8f18d7a70ea346618e09892c707ed.
|
|
|
|
|
|
Repaint scheduling delays output render and frame done events from
output frame events, and block idle frame events from being scheduled in
between output frame done and output render in this period of time.
If a surface is committed after its frame done event, but before output
render, idle frame requests will be blocked, and the surface relies on
the upcoming render to schedule a frame.
If when the repaint timer expires, output render is deemed unnecessary,
no frame will be scheduled. This can lead to surfaces never having their
frame callbacks fire.
To fix this, we store that a surface has requested a frame in
surface_needs_frame. When the repaint expires, if no render is deemed
necessary, we check this flag and schedule an idle frame.
Fixes #4768
|
|
|
|
|
|
max_render_time can be set on output, view, or both. However, if only
applied to the output, send_frame_done_iterator would erroneously send
frame_done immediately, ignoring the output max_render_time. As
damage_handle_frame processed max_render_time correctly, idle frames
would be blocked in anticipation of the delay that was meant to happen.
Without the delay, frame events would be dispatched during the idle
frame block, and some clients would never receive the frame done events
they had requested, at least not until something else actively drove
another render.
Respecting both view and output max_render_time in
send_frame_done_iterator ensures that the frame events are always
correctly delayed.
Fixes #4756
|
|
|
|
If a sway keyboard is being destroyed, then the keyboard is being
removed from a seat. If the associated wlr_keyboard is the currently
set keyboard for the wlr_seat, then we need to reset the wlr_seat's
keyboard to NULL so it doesn't reference an invalid device for the seat.
The next configured keyboard from the seat or the next keyboard from
that seat that has an event will then become the seat keyboard.
Similarly, this needs to be done for a wlr_keyboard_group's keyboard
when the wlr_keyboard_group is being destroyed.
|
|
For the validation pass of reloading, there is no need to touch swaybg,
swaynag, inputs, outputs, or seats. This drastically improves the speed
of a reload by skipping over the expensive I/O configuration and
handling of wayland clients. As long as the syntax is valid, the
CMD_FAILURE's can be relayed during the actual reload.
|
|
In sway_keyboard_destroy, only remove the keyboard from a keyboard
group, if it is part of a keyboard group. If the keyboard is not part of
a keyboard group, then there is nothing to remove it from
|
|
When being created, non first seats would get through the list of devices
without the list being first initialised -> segfault.
Issue introduced with ab0248a54564b2f644b6fb367f9eb44fe0bf5f3c
Fixes #4750: Crash when reloading Sway with multiple seats configured
|
|
|
|
This has the advantage to (1) reduce boilerplate and (2) make us
correctly handle wlr_output_event_present.commit_seq.
|
|
A wlr_keyboard_group allows for multiple keyboard devices to be
combined into one logical keyboard. This is useful for keyboards that
are split into multiple input devices despite appearing as one physical
keyboard in the user's mind.
This adds support for wlr_keyboard_groups to sway. There are two
keyboard groupings currently supported, which can be set on a per-seat
basis. The first keyboard grouping is none, which disables all grouping
and provides no functional change. The second is keymap, which groups
the keyboard devices in the seat by their keymap. With this grouping,
the effective layout and repeat info is also synced across keyboard
devices in the seat. Device specific bindings will still be executed as
normal, but everything else related to key and modifier events will be
handled by the keyboard group's keyboard.
|
|
This allows for shell path expansion for input_cmd_xkb_file. The logic
has been extracted from output_cmd_background
|
|
This fixes an inverted fclose return value check and simplifies the
error handling and logging for xkb_file in sway_keyboard_compile_keymap
|
|
|
|
It's possible for the output to be disconnected in just the right moment
for wlr_output to be NULL in the repaint handler, causing a crash. This
check fixes that crash.
|
|
|
|
|
|
|
|
For extending wlr_surface with additional things.
|
|
|
|
|
|
|
|
Previously, Xwayland windows did not have size_constraints implemented,
resulting in the window being resizable. This implements the constraints
through the X11 size hints supplied by the window itself.
|
|
Fixes #4707
|
|
Instead of relying on the order of modes, use wlr_output_preferred_mode
to get the preferred mode.
|
|
best is NULL prior to being assigned to a mode.
Closes: https://github.com/swaywm/sway/issues/4705
Fixes: f33dcd4c604f ("Prefer higher refresh rate default modes")
|
|
|
|
|
|
This forces to set the mode as a custom mode.
|
|
|
|
|
|
|
|
set_cloexec is defined by both sway and wlroots (and who-knows-else),
so rename the sway one for supporting static linkage. We also remove
the duplicate version of this in client/.
Fixes: https://github.com/swaywm/sway/issues/4677
|
|
container is checked for NULL in other conditions earlier, it's not
obvious that it can't be undefined here.
|
|
If allocation of bindings failed.
Found with clang-tidy
|
|
Found with clang-tidy
|
|
|
|
Currently commented lines ending in the backslash character will be
concatenated with the following line.
```
# with this comment \
exec swaynag -m 'will not run'
```
This change modifies `getline_with_cont` to stop reading when the
initial character is a '#'.
|
|
Closes: https://github.com/swaywm/sway/issues/4663
|
|
Closes: https://github.com/swaywm/sway/issues/4644
References: https://github.com/emersion/rootston/commit/1982106c9b0fbd48ee9fe20e013524125f6ca3cf
|
|
|
|
|
|
Calling wlr_output_manager_v1_set_configuration with an enabled output
and a NULL mode is incorrect if the output doesn't support modes.
When DPMS'ing an output, wlr_output_enable(output, false) is called.
This de-allocates the CRTC and sets wlr_output.current_mode to NULL.
Because we mark DPMS'ed outputs as enabled, we also need to provide a
correct output mode. Add a field to sway_output to hold the current
mode.
Closes: https://github.com/swaywm/wlroots/issues/1867
|
|
apply_output_config would call output_enable and always return true,
even if the output couldn't be enabled.
|
|
Fixes regression introduced in 2c1a11016ccb7646a74de51eff003c18e5aa7902
|