summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2024-10-06build: bump version to 1.10-rc21.10-rc2Furkan Sahin-1/+1
2024-10-02Re-init renderer for all outputs on lost contextFurkan Sahin-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. (cherry picked from commit c90cb37b2a0861548461daa9b75d75317e01b679)
2024-09-29Fix alpha-modifier-v1Furkan Sahin-0/+10
(cherry picked from commit 9a9be01ad4130e4e19b437fd064f90982974971f)
2024-09-29release: push tags before creating GitHub releaseFurkan Sahin-0/+1
Otherwise the GitHub release isn't attached to the Git tag. (cherry picked from commit a2757e5f165eae445ae550fd1d13f9ec0db44efc)
2024-09-29build: bump version to 1.10-rc11.10-rc1Furkan Sahin-1/+1
2024-09-29Add support for alpha-modifier-v1Furkan Sahin-0/+2
(cherry picked from commit a0b3606f1725ee56e8dc15ae51ce62d042c0668a)
2024-09-25swaybar: 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. (cherry picked from commit 00e9a941523baa4afa1f9c077235aa7aa5e8aeab)
2024-09-21desktop/output: Clear modeset timer on output manager applyFurkan Sahin-0/+4
If a modeset timer exists at the time we apply an output manager config, clear it to avoid a useless double commit. (cherry picked from commit 63345977e2c411359a049c40cf2c1044a22b4f4a)
2024-09-21config: Batch input/output configuration on loadFurkan Sahin-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. (cherry picked from commit cdff4f7c74b76e9141164b8c154621646140d8ec)
2024-09-21desktop/output: Expose request_modesetFurkan Sahin-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. (cherry picked from commit b73f54a966a30c2253818b89fefda16477531c14)
2022-02-15Removed destination-is-ancestor check from container_move_to_container to ↵Furkan Sahin-1/+0
match i3 behaviour (cherry picked from commit b6da218974d2e0508e7816f707fe0b1f1c97f0d6)
2024-09-21commands/gaps: Check config->reading insteadFurkan Sahin-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. (cherry picked from commit 861dde100ab5536bea190b078c6c51adb6814be5)
2024-09-18ext-session-lock: Do not use commit listener to arrangeFurkan Sahin-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. (cherry-picked from 785a459a55d8b55b4bed1fdc55b04c32be5b450c)
2024-09-09config/output: Rename to apply_stored_output_configsFurkan Sahin-5/+5
(cherry-picked from d7a76d381bbe4321578bc3a95fbc82d76b67ef05)
2024-09-09config/output: Accept a list of output_configs to useFurkan Sahin-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. (cherry picked from 29b3f00e6fd99296cde7e94b7063acfd075c559c)
2024-09-09config/output: Always start with default in find_output_configFurkan Sahin-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. (cherry picked from 0496477f92e60d504c3938a54e823ad56c8b1868)
2024-09-05config/output: Support multiple matches in find_output_configFurkan Sahin-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. (cherry picked from a0c03499348a4a3d4d2e9a387bf366ccbcf68186)
2024-09-06tree/arrange; Skip arranging disabled outputsFurkan Sahin-0/+3
Disabled outputs might not have a geometry to arrange for, so skip the arrange to avoid messing up the workspace geometry. (cherry picked from f4a6b0395f3fe38cb14bec1f5ac30445496e525c)
2024-09-06tree/arrange: Remove redundant output geometry updateFurkan Sahin-8/+0
This is handled by apply_output_configs. (cherry picked from 4f9ce4675cf428e8acd632de31482981e1bedcf8)
2024-09-05tree/output: Avoid duplicate input mapping configureFurkan Sahin-2/+0
(cherry picked from 4fe054c6db74401f4afc7453fc74665097b5261d)
2024-09-05desktop/output: Avoid duplicate output manager updateFurkan Sahin-4/+0
(cherry picked from 4fe054c6db74401f4afc7453fc74665097b5261d)
2024-09-03(desktop|tree)/output: Do not use layout listener to arrangeFurkan Sahin-24/+0
Output layout changes originate from the centralized modeset infrastructure and request_state which already takes care of arranging and updating outputs as needed. (cherry picked from af28ac04a4d523aecd74dacc94a91f7d9e537982)
2024-09-03tree/output: Rely on modeset arranging rootFurkan Sahin-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. (cherry picked from 6045ad9a0224ea2aab2d488cd356b5557007f5d1)
2024-09-03desktop/output: Do not use commit listener to arrangeFurkan Sahin-15/+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. (cherry picked from commit b83e5aaa546792336ecc60d2e61708f3cd6b1f5d)
2024-06-08text_input: Inline input_popup_update into input_popup_set_focusFurkan Sahin-42/+31
This seems to be the intention of input_popup_update in the first place: handle the scenario where the focus moves. (cherry picked from commit e9dd2182313e9a480e2b3d48162142414d1fee48)
2024-08-04text_input: Properly handle map/unmap eventsFurkan Sahin-9/+57
The last implementation would ignore these and get it could get into a bad state where it would start crashing sway. (cherry picked from commit 74e507962e32ec8d6606d28383ac109fbf2370e4)
2024-08-04transaction: Allow no popup descriptor in popup listFurkan Sahin-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. (cherry picked from commit 023f6b0a50dd4fe17a29d7f02922e18ef37df857)
2024-08-04text_input: Move popup placement to own functionFurkan Sahin-69/+84
(cherry picked from commit 1537c9dae53eebea4926321aa9f7fd982375859f)
2024-06-04text_input: Check for allocation failureFurkan Sahin-0/+5
(cherry picked from commit 48069097ea55021afa0af3c5148cb7caab724dcf)
2024-09-20Remove unguarded double includeFurkan Sahin-1/+0
(cherry picked from commit 266cd4515a015b5684eaf6c0b48ce1afa9be2739)
2024-09-20Add toggle for output adaptive_syncFurkan Sahin-5/+21
(cherry picked from commit e940acd3749a5af08d5c404cae242c8693784ddc)
2024-08-30config/output: Stringify render format when logging itFurkan Sahin-1/+4
(cherry picked from commit 9765c29be11f04f903a45f34b9142a865784fc46)
2024-08-29config/output: Add support for 6-bit render fmtFurkan Sahin-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. (cherry picked from commit 034d02f8a5099ad1283ce3bd1ced524a17f8ba2f)
2024-09-13config/output: support DRM_FORMAT_ARGB8888Furkan Sahin-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> (cherry picked from commit f957c7e658871c27935f88f6e1d18b9db67f3808)
2024-09-07readme: update Czech translationFurkan Sahin-3/+8
(cherry picked from commit fb5eadc363a7f8b9eeeb0ba562ecb3c40e0e6e5a)
2024-09-08sway/input/keyboard: always set active keyboard if there is noneFurkan Sahin-7/+7
Previously, we incorrectly only set active keyboard for non-virtual devices. 2498e694fb3aa99b3c863320d1bc936c334f241c incorrectly put unrelated code in `sway_keyboard_set_layout`. Fixes: 2498e694fb3aa99b3c863320d1bc936c334f241c (cherry picked from commit c5ba7f23a50cd43d39fbb45274484abbcaa4e157)
2024-09-06desktop/transaction: Deactivate workspace on inactive outputsFurkan Sahin-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. (cherry picked from commit 14bff7b451d865f16e3fc82279dfba314b11269c)
2024-09-06container: Skip % char if it doesn't match a view propertyFurkan Sahin-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 (cherry picked from commit fc6b8d6af2a8b5c68bbf49753b0e560ad2cff208)
2024-09-02move title_format to containerFurkan Sahin-89/+102
(cherry picked from commit be840f730e747a24106c8366ecb89e6b982cfa38)
2024-08-27use subheadings insteadFurkan Sahin-5/+4
(cherry picked from commit 980a4e02113789d0cca94aa023557c6f6e87ec73)
2024-08-26Use heading markdown to demarcate sections of commandsFurkan Sahin-1/+5
Its a little tought to notice that the COMMANDS section is actually 3 sections. Use markdown to make this easier to see for the user. (cherry picked from commit f2b2a8114900060f667d7ddd55ef9f8a1e74c1b4)
2024-08-23sway/tree/container: don't trunc coords in `floating_fix_coordinates`Furkan Sahin-4/+4
This can cause issues such as the window not being shown at the exact same coordinates when the old and new wlr_box aren't the same dimensions and the container is being moved back-and-forth between them. For example, in the case where a floating window gets moved from one output to another but the outputs aren't the same resolution. For e.g. have two displays that aren't the same resolution then: 1. Open a floating window and set it to pos 0,0 on output 2 2. Send it to scratchpad then `scratchpad show` on output 1 3. `scratchpad show` on output 2 again Observe that the window isn't at 0,0 on output 2 anymore. (cherry picked from commit 77b9ddabe2a97c5d04c30929b0f8cbde3470fdd7)
2024-06-29sway/commands/move.c: arrange new workspaceFurkan Sahin-0/+1
When moving a container to a new workspace, the workspace's dimension are left unset. Usually this doesn't matter, but when moving a floating container to a new workspace on a different output, this leads to the position of the container being calculated with 0, so the container ends up halfway offscreen on the leftmost topmost monitor. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev> (cherry picked from commit f00f964abf0eae36a1cce03c532115319499e570)
2024-08-19config/output: Skip search if config has a modeFurkan Sahin-3/+4
When doing an output configuration search, the intent is to only look for modes if the output's configuration does not contain a specific mode. This was done by testing if config_has_auto_mode returned false. config_has_auto_mode had its return values backwards, leading to other modes being tested if the output configuration had specified modes or modelines, leading to unwanted modes being selected. Invert the function to config_has_manual_mode to give it a clearer name, and fix the return values in the process. (cherry picked from commit f9c0f043e5ec39574c9d9b0fb3dece6169a0e67d)
2024-08-18config/output: Do not set adaptive_sync if not supportedFurkan Sahin-1/+1
After 622be4526a93 ("config/output: Skip VRR tests when not supported"), the configuration search no longer touches VRR state for outputs that are known to not support it. This also means that it will not remove VRR if already set, which could cause output configuration to fail. Ensure that VRR state is never set for outputs that do not support it by adding the same test for support to queue_output_config. Fixes: 622be4526a93 ("config/output: Skip VRR tests when not supported") Fixes: https://github.com/swaywm/sway/issues/8296 (cherry picked from commit ae7c1b139a3c71d3e11fe2477d8b21c36de6770e)
2024-08-07commands/output/color_profile: allows use of relative path for ICC profileFurkan Sahin-1/+13
(cherry picked from commit 6576b99c243e2b66d077db0a99ec9683747e3fe9)
2024-08-11Switch default config to wmenu-runFurkan Sahin-3/+1
This removes the last dependency bit on dmenu. No need for "swaymsg exec" anymore: wmenu-run handles the xdg-activation shenanigans. (cherry picked from commit b44015578a3d53cdd9436850202d4405696c1f52)
2024-02-29Bind a few utilities to special keys in default configFurkan Sahin-0/+13
(cherry picked from commit 9ba1beee580d07adfba903257ce8762b96ea3833)
2024-08-09Add null-safety check for virtual keyboard keymapsFurkan Sahin-2/+12
Note that in the `sway_keyboard_configure` function of sway/input/keyboard.c, we have skipped the `sway_keyboard_set_layout` function for virtual keyboards, which then have null keymaps. Hence, a null-safety check is needed at runtime. (cherry picked from commit f344e9d5a5afe6ba1aeaf781be3bd18dbf8596f1)
2024-08-07tearing: fix UAF on destroyFurkan Sahin-0/+2
Fixes: 9a1c411abd8261c121dcd50dfe54132718768084 (cherry picked from commit 32e5e5232d1b0b5a34b4296a79a4e8cfa32b5090)