Commit Graph

6355 Commits

Author SHA1 Message Date
Lucas M. Dutra 84ea03109d fix typo 2020-02-04 19:02:27 +01:00
Nathan Rossi ffbf10d07b ipc: Handle unsupported binding event types
Handle binding event types that cannot be encoded gracefully by dropping
the event. This prevents issues for binding types like BINDING_SWITCH,
where the event would cause a crash.
2020-01-30 15:03:54 +01:00
salkin-mada 1dbc7f7521 add danish README 2020-01-27 11:31:41 -07:00
Jason Nader 5568f14e71 Docs: Add marks field to get_tree response 2020-01-24 10:37:21 +01:00
thermitegod 29a5ce5f65 Fix compiling with -fno-common 2020-01-24 10:16:59 +01:00
Jamelly Ferreira 9c93e1c0ce Adding the link to the Portuguese on the English version of README.md 2020-01-23 12:26:55 -07:00
Jamelly Ferreira 47a09f74ca Adding a version of README.md in Portuguese 2020-01-23 12:26:55 -07:00
Drew DeVault ab77efc6ca
Update version to 1.4 2020-01-22 20:40:37 +01:00
Eli Schwartz 4a73f69d10 fish-completion: use the correct fallback directory
fish completions should never be installed to share/fish/completions/ as
that directory is reserved exclusively for completions shipped as part
of the fish source code.

Use the same vendor_completions.d/ directory which the default fish
configuration uses.
2020-01-22 18:05:29 +01:00
Eli Schwartz 03e8ce7b20 completion: use pkg-config to get install location for bash/fish
Both shells provide pkg-config files which declare their designated
completionsdir. Use this as the primary source of truth.
2020-01-22 18:05:29 +01:00
Eli Schwartz fe558cf627 meson: use join_paths to build paths, instead of string concat
It makes sure to handle paths as paths, and is generally safer and the
blessed solution.
2020-01-22 18:05:29 +01:00
Alex Maese 8faaf52f7f Add documentation for floating_modifier 2020-01-20 09:19:04 -07:00
Alex Maese 86ee240a4a Add ability to remove the floating modifier 2020-01-20 09:19:04 -07:00
Jason Nader a576bc27bf Check argc>0 before strcasecmp. Should shortcircuit 2020-01-18 10:36:03 +01:00
Jason Nader 450b40c635 commands/move: Fix crash when required args not provided
Fixes #4919.
2020-01-18 10:36:03 +01:00
Brian Ashworth 9d827ef493 output: apply oc to outputs using wl_for_each_safe
If applying an output config to an output fails, the output may be
destroyed. To be able to handle this situation correctly,
apply_output_config_to_outputs needs to use wl_list_for_each_safe.
2020-01-16 19:55:24 -07:00
Ronan Pigott 5501d14a2e cmd_split: Refuse to split scratchpad hidden split containers 2020-01-16 21:48:25 -05:00
Ronan Pigott 72ad35ba16 cmd_move: Fix crash when moving to scratchpad hidden split containers 2020-01-16 21:48:25 -05:00
Ronan Pigott d88d4bbd9d Fix crash when showing scratchpad hidden split containers 2020-01-16 21:48:25 -05:00
Brian Ashworth 18507e62fd desktop/output: fix mem leak in handle_new_output
This fixes a memory leak of oc (the output config) in handle_new_output.
Output configs returned from find_output_config are not stored and need
to be freed after use.
2020-01-16 18:14:49 -07:00
Ronan Pigott 1bd51d9377 sway.5: Document missing bindsym flags for unbindsym
sway.5: Remove indents within long command descriptions
2020-01-16 16:15:50 +01:00
Ronan Pigott 5215cdfa92 sway-input.5: Document repeat_delay and repeat_rate only once 2020-01-16 16:15:50 +01:00
Ronan Pigott 33fc9c5f1f ipc-json: Remove unnecessary dereference 2020-01-16 16:15:50 +01:00
Ronan Pigott f68961fbe6 commands/split: Fix error message typos 2020-01-16 16:15:50 +01:00
Simon Ser 0d2a3fa835 Revert "Make all the container dimensions integers"
This reverts commit 79c5f5ba12.

Fixes: https://github.com/swaywm/sway/issues/4908
2020-01-15 17:56:14 +01:00
Brian Ashworth a4e4e21edf container: add inactive fullscreen to focus stack
When a container was being made fullscreen and it is on the focused
workspace for a seat, focus was being set to the container. However,
when the container was on a non-focused workspace, the focus stack
wasn't being touched. When assigning a fullscreen container to a
workspace or moving a fullscreen container to a different workspace,
this would make it so the fullscreen container was never added to the
focus stack for the workspace thus preventing access to the workspace.
This adds the container to the top of the focus stack, behind the
container on the focused workspace.
2020-01-14 07:38:57 -07:00
Jason c3353bb273 Docs: explain why menu command should be passed to sway
It was not obvious to me why until I saw a comment from @RyanDwyer on Reddit, so I think it's better to add an explanation.
2020-01-13 21:36:08 -05:00
Simon Ser 679aa6032d Fix unreliable scaling filter
Two changes were made:

- Bind the texture before glTexParameteri
- Set the scaling filter before each wlr_render_texture_with_matrix call

Logging in wlroots allows to check that the scaling filter is properly
set prior to rendering.

Fixes: 6968fb3123 ("add scale_filter output config option")
Closes: https://github.com/swaywm/sway/issues/4798
2020-01-13 12:36:14 -07:00
Jason Nader c976a14933 Amend typo 2020-01-13 13:20:16 +01:00
Cassandra McCarthy 8b251f068f integer scaling, not integral 2020-01-10 07:03:24 -07:00
JR Boyens 0106dd135c Use transparency arg in the window focus event 2020-01-09 19:53:53 -07:00
Brian Ashworth c99d423ad9 view: remove workspace pid mapping for assigns
If a view is mapped to a workspace using an assign, the pid should still
be removed from the pid mapping list. This prevents child processes from
matching against it and mapping a view to a likely undesired workspace.
2020-01-09 09:52:37 +01:00
Brian Ashworth 1e2a2b0778 input/cursor: handle setting a NULL image surface
This fixes a crash when attempting to listen to a signal on a NULL
cursor image surface. If the surface is NULL, the listener is just
reinitialized using wl_list_init.
2020-01-06 10:12:28 +01:00
Brian Ashworth 897c36b12c input/cursor: handle image surface destroy
This adds a listener for the destroy event of the cursor image surface.
This prevents a use-after-free when the last visible image surface is
freed, there has not been a new cursor set, and the cursor is reshown.
2020-01-05 23:03:34 +01:00
Brian Ashworth b977c02e35 render: do not render indicator on floating views
This adds a check to make it so the indicator is only rendered on views
with a parent, which floating views do not. Since floating views do not
have a parent, the workspace layout was being incorrectly used to
determine whether to show the split indicator previously. This has no
impact on floating containers and a view within a floating container
will still have indicators rendered appropriately.
2020-01-05 22:16:44 +01:00
Andri Yngvason fd24b1afd8 swaybar: Fix input device removal
Before swaybar would exit with a protocol error when a pointer or touch
device was removed.
2020-01-05 19:57:05 +01:00
Andri Yngvason 4c29a53386 swaynag: Add multi-seat support
This also adds cleanup for all seat resources
2020-01-05 19:57:05 +01:00
Ross Schulman b758b43085 Fix small typo in sway-input(5) 2020-01-05 11:16:15 -05:00
Thayne McCombs 218950c88d Add missing items to documentation for GET_TREE response in ipc.
A few items in the response for the get_tree ipc call were missing from
the documentation. This adds some documentation for them.
2020-01-05 10:53:16 +01:00
Rouven Czerwinski 1e44247baa xwayland: handle size_hints == NULL
In case xcb-iccm is not installed on the system, size_hints will be
null. Handle this as if the get_constraints functions was not
implemented and return the defaults.

Fixes #4870
2020-01-03 14:02:19 +01:00
Andri Yngvason d510684c47 input: Assign virtual input devices to their selected seats 2020-01-01 10:21:04 -07:00
Pedro Côrte-Real 79c5f5ba12 Make all the container dimensions integers
Containers are always fixed to the pixel grid so position and size them
with integers instead of doubles.

Functionally this should be no different since rounding down is already
being done on things like layout. But it makes it clear what the
intention is and avoids bugs where fractional pixels are used. The
translating and moving code is still using doubles because the cursors
can have fractional pixels and thus the code is plumbed that way. But
that could also probably be changed easily by doing the integer
conversions earlier and plumbing with int.
2020-01-01 10:14:40 -07:00
Pedro Côrte-Real bd1fb76e0f Make sure we don't calculate fractional pixel gaps
When gaps are resized for lack of space the calculation could result in
a gap size of non-integer pixels. This would result in containers
located at non-integer pixels which would be subtly broken.
2020-01-01 10:14:29 -07:00
Pedro Côrte-Real 8008344762 Avoid numerical instability in resize
Because the layout code rounds down the dimensions of the windows
resizing would often be off by one pixel. The width/height fraction
would not exactly reflect the final computed width and so the resize
code would end up calculating things wrong.

To fix this first snap the container size fractions to the pixel grid
and only then do the resize. Also use round() instead of floor() during
layout to avoid a slightly too small width. This applies in two cases:

1. For the container we are actually resizing using floor() might result
   in being 1px too small.
2. For the other containers it might result in resizing them down by 1px
   and then if the container being resized is the last all those extra
   pixels would make the resize too large.

Fixes #4391
2020-01-01 10:14:29 -07:00
Drew DeVault ed02261551 Update wlroots version 2019-12-31 11:18:58 -05:00
Drew DeVault 2a00bb0650 _incr_version: always overwrite old version number 2019-12-31 10:31:40 -05:00
Drew DeVault a44ae8869b _incr_version: prompt for target wlroots release 2019-12-31 10:27:13 -05:00
Josef Gajdusek f501a60c14 Add virtual pointer protocol 2019-12-31 16:04:50 +01:00
Paul Riou 2b5e75032b Fix sway_log using non initialised output_config pointer
This fixes a crash where the `oc->name` would be accessed by sway_log()
even when `oc` was NULL.
2019-12-31 15:56:32 +01:00
Simon Ser ef2332f7a6 Re-add support for wlr_output's atomic API
This reverts commit 724926ea6a and
re-applies commit 6e0565e9de.

Outputs now need to be explicitly enabled when performing a modeset.
We need to roll back wlr_output_attach_render when we decide not to
render.

See also: https://github.com/swaywm/wlroots/pull/1797 (wlroots PR)
See also: https://github.com/swaywm/sway/pull/4355 (Original sway PR)
See also: https://github.com/swaywm/sway/pull/4434 (Revert sway PR)
2019-12-30 11:24:11 -07:00