aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2024-10-25desktop/output: chase wlroots private fields updateKirill Primak-2/+2
This will be replaced with a proper solution later.
2024-10-20config/output: Remove remaining logs from queue_output_configKenny Levinsen-15/+1
The job of queue_output_config is now just to fill out a wlr_output_state according to the output configuration, but it still has a lot of logging from before we had wlr_output_state or the new modeset logic, when queue_output_state instead touched the implicit pending state of wlr_output. Whatever debug logs it had would already be covered by the output state debug logs or the command debug logs, so let's just remove it.
2024-10-20config/output: Remove initial values in find_output_configKenny Levinsen-9/+0
Starting by setting some special initial output config values settings was something sway used to do when the config was initially being processed. This was later changed to always happen, as there shouldn't be differences in how output config is calculated during config load and after. Most of these values are redundant, as they are either the zero value or a value that would be selected if the unset (-1) value was found. For output transforms, the automatic panel orientation code would only trigger if the final output config has an unset transform, which the initial values set in find_output_config made impossible. Remove these initial values and instead use a fresh output config as is.
2024-10-20config/output: Always set all output fields on finalizeKenny Levinsen-29/+22
2024-10-20config/output: Always set output states from configKenny Levinsen-32/+21
queue_output_config had some remaining logic that would avoid setting output states if they already appeared to be in effect. That is not what most of the states did nor what is currently expected, so clean that up.
2024-10-20config/output: Improve modeset state loggingKenny Levinsen-2/+8
Include scale and subpixel in the output state log, and log the output state on first commit attempt instead of just during fallback search.
2024-10-20input/seatop_default: refactor move/resize button logicSimon Ser-39/+34
Make it so config->floating_mod_inverse only applies when pressing mod, not when clicking on titlebars. Centralize logic into shared variables.
2024-10-18layer_shell: Restore sway 1.9 orderingAlexander Orzechowski-6/+7
2024-10-18layer_shell: Arrange exclusive zone clients firstAlexander Orzechowski-5/+13
This makes layer_shell more stable against the order of clients.
2024-10-16trigger container update after disabling urgent in timerJan Palus-0/+1
switching workspace directly to urgent window creates timer which delays reset of urgent state so user is able to notice it. make sure state change is reflected visually as well (border change) by triggering container update Fixes: #8377
2024-10-14input/keyboard: add support for pointer keysSimon Ser-0/+37
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4775
2024-10-11server: check backend support for timelinesSimon Ser-1/+2
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4848
2024-10-08input/mouse: bugfix button2 being interpreted as trying to move the containerFurkan Sahin-1/+3
Man sway(5) specifies that when tiling_drag is enable, the floating_mod can be used to drag tiling, as well as floating containers. However the current code indiscriminately assumes any button press to be intended for moving the container, consequently causing an unintended call to `seatop_move_tilting:handle_button` rather than `seatop_default:handle_button` to pass `state=WL_POINTER_BUTTON_STATE_RELEASED` to `get_active_mouse_binding` My idea was to make 'Handle moving a tiling container' follow the same path as 'Handle moving a floating container' because the initial call to handle moving a floating correctly exits that branch and ends up passing the RELEASED state to `get_active_mouse_binding`. Fixes #8334
2024-10-07fix: sway crashes if switch to another workspace with surface when IME popup ↵ShootingStarDragons-0/+4
is shown in pr https://github.com/swaywm/sway/pull/8196, when im_popup_surface is unmapped, author set the popup->relative to NULL, butt popup is still in popup groups, where assert the relative is not NULL, this cause the panic Take the suggestion of Nefsen402, remove the line where set relative to NULL, and add NULL check in scene_descriptor_destory
2024-10-02Re-init renderer for all outputs on lost contextKenny Levinsen-2/+2
sway_root.outputs only include enabled outputs. We also need to re-init the renderer for any disabled outputs, so use sway_root.all_outputs instead. Resolves the following heap-use-after-free accessing the render formats when a disabled output is modeset after a GPU reset has occurred.
2024-09-29Fix alpha-modifier-v1Alexander Orzechowski-0/+10
2024-09-29release: push tags before creating GitHub releaseSimon Ser-0/+1
Otherwise the GitHub release isn't attached to the Git tag.
2024-09-29Add support for alpha-modifier-v1Simon Ser-0/+2
2024-09-28swaybar: Fix 100% cpu usage if dbus dies.Furkan Sahin-5/+12
Currently, swaybar does not gracefully die if it detects that the dbus connection was lost. Although it's not recommended to restart dbus without restarting the compositor, it can very easily happen. In the case it does, compositor's tray should not consume 100% cpu until it has to be force killed. apply suggestions just setting the bar to not running will call teardown and unref the dbus.
2024-09-21desktop/output: Clear modeset timer on output manager applyKenny Levinsen-0/+4
If a modeset timer exists at the time we apply an output manager config, clear it to avoid a useless double commit.
2024-09-21config: Batch input/output configuration on loadKenny Levinsen-16/+17
We batch modesets and input configuration performed during config reload but commit for every command during the intial config load. There is no need to perform commits during the initial config load as outputs have not yet been created, but swaybg spawn should still be batched. At the same time, replace direct calls to apply output configuration with request_modeset to properly handle the modeset timer.
2024-09-21desktop/output: Expose request_modesetKenny Levinsen-10/+10
We remove the struct sway_server argument for consistency with the rest of our internal APIs which rely on the global server instance.
2024-09-21Removed destination-is-ancestor check from container_move_to_container to ↵Olivia Taliesin-1/+0
match i3 behaviour
2024-09-21commands/gaps: Check config->reading insteadKenny Levinsen-4/+2
Checking if the config is not active or is reloading is just a convoluted way of checking if the config is being read.
2024-09-20text_input: Inline input_popup_update into input_popup_set_focusAlexander Orzechowski-42/+31
This seems to be the intention of input_popup_update in the first place: handle the scenario where the focus moves.
2024-09-20text_input: Properly handle map/unmap eventsAlexander Orzechowski-9/+57
The last implementation would ignore these and get it could get into a bad state where it would start crashing sway.
2024-09-20transaction: Allow no popup descriptor in popup listAlexander Orzechowski-3/+5
Input method popups in the future will destroy the scene descriptor when it isn't mapped and therefore shouldn't be tampered with here.
2024-09-20text_input: Move popup placement to own functionAlexander Orzechowski-69/+84
2024-09-20text_input: Check for allocation failureAlexander Orzechowski-0/+5
2024-09-20Remove unguarded double includeScott Dubinsky-1/+0
2024-09-20Add toggle for output adaptive_syncEmil Engberg-5/+21
2024-09-20config/output: Stringify render format when logging itKenny Levinsen-1/+4
2024-09-20config/output: Add support for 6-bit render fmtKenny Levinsen-11/+28
GUD devices uses RGB565 by default for performance reasons. Allow specifying render_bit_depth 6 to pick this format. The definition works out if you consider the maximum number of bits per channel instead of the average.
2024-09-20ext-session-lock: Do not use commit listener to arrangeKenny Levinsen-17/+20
Arranging lock surfaces rely on the sway_output width and height being updated, but these are only updated after the commit has been completed and all commit listeners have executed. This means that the lock surfaces will not be appropriately scaled to match a change in output dimensions, and may reveal what is under the lock background. Replace the implicit arrange through the output commit listener with an explicit arrange after the output configuration is finalized. This might have regressed by other transition away from output commit listeners for other arrange tasks, but even then it would have erroneously relied on signalling order.
2024-09-13config/output: support DRM_FORMAT_ARGB8888Steffen Dirkwinkel-0/+1
Some display output hardware [1] doesn't support any of the current formats, but works with ARGB8888. Fall back to it if available. [1] https://github.com/torvalds/linux/blob/196145c606d0f816fd3926483cb1ff87e09c2c0b/drivers/gpu/drm/xlnx/zynqmp_disp.c#L313 Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2024-09-10config/output: Rename to apply_stored_output_configsKenny Levinsen-5/+5
2024-09-10config/output: Accept a list of output_configs to useKenny Levinsen-75/+67
Instead of using a single finalized output config per output, accept a regular list of output configs like the one ultimately stored for configuration purposes. This allows the output management code to test an augmented configuration while still using the same output config logic, without having to mutate the stored configuration. This in turn allows us to make a few APIs private. A bug note about an existing issue with derade to off is added as well.
2024-09-10config/output: Always start with default in find_output_configKenny Levinsen-30/+11
We always need to start out with the default configuration, regardless of whether the config is reloading or not to ensure that config decisions are stable given a specific configuration.
2024-09-10config/output: Support multiple matches in find_output_configKenny Levinsen-26/+13
Simplify find_output_config and inline the search through the output configs instead of using list_seq_find with a comparator function. The new implementation will merge any amount of matched configs in order, which will be relied upon in a future commit.
2024-09-08readme: update Czech translationAdam Chovanec-3/+8
2024-09-08sway/input/keyboard: always set active keyboard if there is nonellyyr-7/+7
Previously, we incorrectly only set active keyboard for non-virtual devices. 4c3c0602116c12c2821e1e505e7248b3c642b4ca incorrectly put unrelated code in `sway_keyboard_set_layout`. Fixes: 4c3c0602116c12c2821e1e505e7248b3c642b4ca
2024-09-07tree/arrange; Skip arranging disabled outputsKenny Levinsen-0/+3
Disabled outputs might not have a geometry to arrange for, so skip the arrange to avoid messing up the workspace geometry.
2024-09-07desktop/transaction: Deactivate workspace on inactive outputsKenny Levinsen-1/+1
If the output is not active, it might not have a valid geometry to arrange for. Outputs do not gain a geometry until modeset, so if an output is connected with a configuration present to disable it, it will not have a geometry. If the output has a past workspace restored, this will be attemtped arranged to fit a 0x0 rectangle, which asserts when trying to sort out borders. Consider the workspace activated only if the output itself is active to get the scene nodes disabled.
2024-09-07tree/arrange: Remove redundant output geometry updateKenny Levinsen-8/+0
This is handled by apply_output_configs.
2024-09-07container: Skip % char if it doesn't match a view propertyAlexander Orzechowski-0/+4
The else condition was missed here and we would never skip the % char if it didn't end up matching with any property. Since we fail to skip we would re-evaluate the % in an infinite loop never achieving any forward-progress. Fixes: https://github.com/swaywm/sway/issues/8333
2024-09-05tree/output: Avoid duplicate input mapping configureKenny Levinsen-2/+0
2024-09-05desktop/output: Avoid duplicate output manager updateKenny Levinsen-4/+0
2024-09-04(desktop|tree)/output: Do not use layout listener to arrangeKenny Levinsen-25/+0
Output layout changes originate from the centralized modeset infrastructure and request_state which already takes care of arranging and updating outputs as needed.
2024-09-04tree/output: Rely on modeset arranging rootKenny Levinsen-10/+0
output_enable/output_disable are only called from modeset, and from output destroy which requests modeset. As such, they can rely on the modeset handling arrange.
2024-09-04desktop/output: Do not use commit listener to arrangeKenny Levinsen-28/+24
The reasoning for using a commit handler is to ensure that all paths for output changes are correctly handled. With the centralized modeset infrastructure in place, we can move the logic there. This allows us to be smarter and avoid extraneous arranges, output manager updates and transaction commits. The side-effect is a minor duplication for the special-case request_state, but the shared path will be relied upon further in future commits to justify this duplication.