aboutsummaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* sway-input.5.scd: Fix spelling errorsLibravatar Elyes HAOUAS2021-10-02
| | | | Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
* commands: Remove unused code after 1d3681f52135Libravatar Evgeniy Khramtsov2021-10-01
| | | | | | | | | | | | Clang 13 reports: ../sway/commands.c:470:23: error: variable 'context' set but not used [-Werror,-Wunused-but-set-variable] enum command_context context = 0; ^ Last use of was removed in commit 1d3681f52135. Downstream PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258813
* Chase wlr_xdg_surface breaking changesLibravatar Simon Ser2021-10-01
| | | | | | See [1]. [1]: https://github.com/swaywm/wlroots/pull/3106
* Add support for DRM panel orientationLibravatar Simon Ser2021-09-28
| | | | References: https://github.com/swaywm/wlroots/pull/3205
* layer-shell: fix commit handlerLibravatar Kirill Primak2021-09-25
| | | | | | | This commit makes sure the extents are kept up-to-date, fixes not damaging the surface if its layer shell-specific state didn't change, and adds a check if the layer shell-specific state didn't change but the surface got mapped/unmapped, which could affect keyboard focus.
* layer-shell: check `committed` bitmaskLibravatar Kirill Primak2021-09-24
| | | | This avoids infinite configure-ack_configure-commit loop.
* layer-shell: chase wlr layer surface refactorLibravatar Kirill Primak2021-09-23
|
* Revert "xdg_shell: schedule configure on maximize requests"Libravatar Kirill Primak2021-09-21
| | | | | This reverts commit 4dd46f06acc520449b980a5ea52be544cc5bfb6d, as the logic is now handled by wlroots.
* xdg-shell: chase wlr xdg toplevel refactorLibravatar Kirill Primak2021-09-21
|
* Add -Dnoscanout debug optionLibravatar Simon Ser2021-09-20
| | | | | | This can help debugging direct scan-out issues, such as [1]. [1]: https://github.com/swaywm/wlroots/issues/3185
* Drop hardcoded font metric valuesLibravatar Hugo Osvaldo Barrera2021-09-20
|
* Avoid unecessary font metric calculationsLibravatar Hugo Osvaldo Barrera2021-09-20
| | | | | | | | | | | | | | | | | | | | | Prior to 62d90a8e, titlebar's font height (and other related values) would change any time any titlebar's content changed, so these values were recalculated each time any titlebar's content changed (or a new titlebar was created). However, since the above was merge, these values no longer change so often and we only need to recalculate them when the configured font changes (and stop calling `config_update_font_height` each time titlebars are rendered). This commit removes all the unecessary calls to this function and avoids all those unecessary calculations. Whenever the font strays from the default value, the `font` command is called, and it calls `config_update_font_height`, which is enough to keep the value always up to date. I've also added a default value to the `font_baseline` config, since otherwise that's zero for setups that don't explicitly specify a font.
* sway-ipc.7.scd: fix typoLibravatar aajonusonline2021-09-19
|
* Rename pango_printf to render_textLibravatar Simon Ser2021-09-13
| | | | | This avoids using the pango_ prefix, reserved for functions coming from the Pango library.
* introduce wlr_drm_lease_v1Libravatar Simon Zeni2021-09-09
| | | | | | | | This prevents sway from extending the desktop to i.e. VR headsets, and makes them available for DRM leasing. Non-desktop wlr_outputs will be offered through the wlr_drm_lease_v1_manager interface for client to lease.
* view: fix child position calcLibravatar Kirill Primak2021-09-08
| | | | | Previously, the position was calculated incorrectly for nested subsurfaces.
* render: fix -Ddamage=rerenderLibravatar Kirill Primak2021-09-07
|
* surface: chase wlr subsurface list/link changeLibravatar Kirill Primak2021-09-06
|
* view: fix saved buffer orderLibravatar Kirill Primak2021-09-05
|
* Fix overly-wide mark texturesLibravatar Daniel De Graaf2021-09-04
| | | | | The width of the texture needs to be calculated using the string that is actually displayed in the texture.
* commands: update split none command for a047b5ee4Libravatar Ronan Pigott2021-09-04
|
* command: implement split noneLibravatar Ronan Pigott2021-09-03
|
* seatop_down: End if surface is destroyed or other seatop startsLibravatar Simon Plakolb2021-09-02
| | | | | | If the surface the pointer started to interact with is destroyed we also want the seatop_down to end. In case a drag is initiated we receive a call to handle_end.
* input: Use seatop_down on layer surface clickLibravatar Simon Plakolb2021-09-02
| | | | | | | This solves an issue where layer-shell items would not receive a button release event when the pointer left them while being pressed. The default seatop changes focus immediately while seatop_down defers any focus changes until the pointer is released or seatop_down is destroyed.
* Add `output modeline` commandLibravatar David Rosca2021-08-31
| | | | Only works with DRM backend.
* desktop/xwayland: restack surface upon activationLibravatar Tudor Brindus2021-08-28
| | | | This commit updates Sway for swaywm/wlroots#2915.
* Deduplicate code for rendering titlebar textsLibravatar Hugo Osvaldo Barrera2021-08-27
| | | | | | | | | The title itself and marks were being rendered by two very-similar yet different functions, and any changes made to one had to be reflected on the other. This mostly prevents such oversights from happening, and keeps makes sure we keep both consistent.
* Use fixed titlebar heightsLibravatar Hugo Osvaldo Barrera2021-08-26
| | | | | | | | | | | | | | | Use fixed titlebar heights. The default height is calculated based on font metrics for the configured font and current locale. Some testing with titles with emoji and CJK characters (which are substantially higher in my setup) shows that the titlebars retain their initial value, text does shift up or down, and all titlebars always remain aligned. Also drop some also now-unecessary title_height calculations. Makes also needed to be updated, since they should be positioned with the same rules.
* Update Pango font description URL in sway.5.scdLibravatar grumpey2021-08-19
| | | | Along with f4cda51 fixes #6217.
* Fix typo in sway.5.scdLibravatar quinno2021-08-16
| | | small typo fix (ptt => ppt)
* layer-shell: replace close() with destroy()Libravatar Simon Ser2021-08-14
| | | | | | Update for the wlroots breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3108
* cmd_bind_or_unbind_switch: fix copy/paste typo error messageLibravatar Eric Engestrom2021-08-14
| | | | | `[0]` is the switch type, not its state; we want `[1]` for that, and it's a string not an int :)
* Fallback to other output modes if preferred mode failsLibravatar Simon Ser2021-08-12
| | | | | | | Sometimes the preferred mode is not available due to hardware constraints (e.g. GPU or cable bandwidth limitations). In these cases it's better to fallback to lower modes than to end up with a black screen.
* layer_shell: damage previous area when a surface shrinksLibravatar Ronan Pigott2021-08-12
| | | | | | | When a layer surface shrinks we need to damage the area it previously occupied, but we don't know the location of all its subsurfaces in the previous state, so instead damage a rectangle that encloses the entire previous extent.
* xdg-decoration: let floating clients set bordersLibravatar Dudemanguy2021-08-12
| | | | | | | | | The xdg-decoration protocol allows clients to request whether they want to use server side decorations or client side decorations. Currently, sway ignores this and always enforces whatever the server is currently set to. Although tiled clients cannot be allowed to set borders, there is no harm in listening requests from floating clients. Sidenote: also fix an unrelated style error.
* seatop_down: Change type of sx, sy to double in begin_seatop_downLibravatar David Rosca2021-08-05
| | | | | | | | | | | | | | | Losing the precision resulted in wlr_cursor and wlr_seat::pointer_state getting out of sync during pointer motion in seatop_down. Since the difference was always under 1 px, it was practically impossible to notice in normal use. But because of being out of sync, cursor_rebase would always end up incorrectly calling wlr_seat_pointer_notify_motion from seatop_default_begin (on releasing mouse button) which broke cursor locking. See #5405 Closes #4632
* man: update Pango font description URLLibravatar frogtile2021-08-04
| | | The old URL gives a 404.
* Fix wl_pointer.frame not sent on touch emulationLibravatar Simon Ser2021-07-26
| | | | | | | | | | | | When emulating touch, the simulating_pointer_from_touch field is set to true. It's switched back to false when a touch_up event is received. However we need to ensure we always send a wl_pointer.frame event following a group of other wl_pointer events. Since a touch_frame event is always guaranteed to come after a group of touch events, unset simulating_pointer_from_touch in the touch_frame handler instead of the touch_up handler. Add a new field to know whether the touch_frame handler should stop emulation.
* Fix crash when starting without HOMELibravatar Tobias Stoeckmann2021-07-23
| | | | | | | | | | If HOME environment variable is not set, sway fails startup with a segmentation fault due to null pointer dereference. Also check calloc return value and only perform the fallback code when really needed. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* Add `gaps <type> <scope> toggle <px>` commandLibravatar bR3iN2021-07-22
| | | | | | | | Add a subcommand for `gaps` that allows to toggle gaps at runtime. This functionality is part of i3-gaps since [1] but is missing in sway. [1] https://github.com/Airblader/i3/pull/264
* Add support for touch frame eventsLibravatar Simon Ser2021-07-08
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3001
* Update wlr_box includesLibravatar Simon Ser2021-07-07
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
* container: ignore borders in fullscreen windowsLibravatar Dudemanguy2021-07-06
| | | | | | | | | | | | | | When setting the geometry from content for floating windows, the coordinates for borders are normally taken into account. However in the case of a floating fullscreen window, we should not be doing this. Since the content of the container takes the space of the entire output, this causes the calculated borders to neccesarily be outside of the output. This later causes a problem when sending surface entrance events since in a multi-monitor setup, the border coordinates will overlap with another output despite the surface not actually being on that output at all. The fix is to just ignore border coordinates for a floating fullscreen container since fullscreen, of course, does not actually have any borders. Fixes #6080.
* tree/container: fix indentationLibravatar Simon Ser2021-07-05
|
* input: Move get_current_time_msec in from utilLibravatar Kenny Levinsen2021-06-23
| | | | | | | get_current_time_msec is only used in cursor.c, so we can move it in and make it static. This is primarily intended to avoid a symbol collision with wlroots, which we unfortunately do not have a good solution for yet.
* Revert "Add workspace {prev,next}_on_output --create"Libravatar Ragnar Groot Koerkamp2021-06-22
| | | | | | | This reverts commit 487c83f0de9ca2a7650ad636eed6fd694ddcb82e. The --create flag is undocumented, not in i3, and at least partially broken (#5913), so this removes the feature.
* Don't apply hide_edge_borders to any floating containerLibravatar novenary2021-06-20
| | | | | | | | | This fixes the following scenario: - Place a floating window so its border is right at the edge of the screen - Create a new split - The border disappears - Moving the window does not restore the border
* Only call workspace_auto_back_and_forth when neededLibravatar Ragnar Groot Koerkamp2021-06-18
| | | | | | Instead of disabling it for some workspace subcommands, this explicitly calls it only in the 2 places it's actually needed: for switching to a named or numbered workspace.
* Move auto_back_and_forth logic out of workspace_switchLibravatar Ragnar Groot Koerkamp2021-06-18
| | | | | | | | This extracts the code to a separate workspace_auto_back_and_forth function. It also removes the bool argument by adding an extra if statement at the call site, and repurposes the no_auto_back_and_forth variable to auto_back_and_forth for simpler understanding.
* Fix #6299 Disable auto_back_and_forth for next_on_outputLibravatar Ragnar Groot Koerkamp2021-06-18
| | | | | | | | | | | | | | This forces no_auto_back_and_forth to true for `workspace next_on_output` and `workspace prev_on_output` to keep parity with i3. In i3, running next_on_output never changes focus to another output. In Sway currently, with workspace_auto_back_and_forth set to yet, running next_on_output on an output with only a single active workspace will typically end up focussing the other output: 1. next_on_output focusses the current workspace, because it's the only one 2. auto_back_and_forth focusses the last focussed workspace, because the current workspace to focus is the current one. This will usually be on the other monitor if the workspace there was last focussed.