Commit graph

6300 commits

Author SHA1 Message Date
Martin Michlmayr 8724900e38 swaymsg.1: fix description of --pretty 2019-09-10 00:14:59 +03:00
Ivan Molodetskikh db6a9d08f9 Add Russian translation of the README 2019-09-09 19:09:57 +03:00
Aleksis 982e01f46c remove unused layer shell surface variable 2019-09-07 20:22:54 +03:00
Brian Ashworth aa8ea2fa82 sway.5: clarify that a marks are unqiue
This just clarifies that a mark can only be set for a single window
since they are used as unique identifiers
2019-09-05 22:04:02 +03:00
Nils ANDRÉ-CHANG 21717d2ed2 Fix type (an -> and) 2019-09-05 22:02:33 +03:00
Versus Void 2c1a11016c Do not search for edges on subsurfaces, fix #4381
Subsurfaces (in most cases popups) aren't decorated by sway
and will never have any borders, but may be drawn beyond container
boundaries producing false positive when searching for edge.
So we want to skip edge search when handling mouse event on subsurface.
2019-09-05 17:41:23 +03:00
Brian Ashworth 1fd2c6ba49 swaybar: complete barconfig_update event handling
This adds complete support for the barconfig_update ipc event. This also
changes the bar command and subcommand handlers to correctly emit the
event. This makes it so all bar subcommands other than id and
swaybar_command are dynamically changeable at runtime. sway-bar.5 has
been updated accordingly
2019-09-04 16:48:50 -10:00
Brian Ashworth 187306640b seatop_default: only focus container on press
This matches i3's behavior of only focusing a container when pressed.
This allows for `bindsym button1 nop`, `bindsym BTN_LEFT nop`, or
`bindcode 272 nop` to be used to disable focusing when clicking on the
title (or with additional flags to bind{code,sym} other portions of
the container).

Without this additional condition, the user would need both
`bindsym button1 nop` and `bindsym --release button1 nop` to override
both the pressed and released behavior.
2019-09-04 16:48:34 -10:00
Ben Brown 0ad5e355bd Add icon_theme_path to find_icon() search if set
find_icon() will search in theme appropriate subdirs.
2019-09-04 03:32:45 -04:00
xPMo 42a7860dcf Fix bar_state_update docs 2019-09-03 22:22:25 -04:00
Ben Brown b46c53957f Fix typo for the force/immediate option in xwayland_mode enum 2019-09-02 17:06:38 +03:00
Simon Ser 1b396273bb man: document how to specify multiple xkb layouts and options
This isn't described in xkeyboard-config(7).
2019-09-02 08:39:25 +09:00
Simon Ser 53e01bf5c7 layer-shell: don't give focus to unmapped layer surfaces
Focused layers are not cleared when destroyed, they are cleared on unmap.
Giving focus to an unmapped layer surface is (1) incorrect and (2) triggers a
use-after-free.

Closes: https://github.com/swaywm/sway/issues/4517
2019-09-01 09:58:03 +09:00
Kenny Levinsen b2ee5bc05d Ensure that seat->focused_layer is cleared on unmap
The current seat may have changed between the last focus change and
this unmap, so we need to scan through all seats to find our layer.
2019-09-01 00:03:18 +03:00
xdavidwu 07d7af593d seat: set cursor image only if no pointer cap previously
This make seat_update_capabilities set cursor image only if
there was no pointer cap before update. This avoid resetting
cursor to left_ptr if an input device is removed.
2019-08-31 23:13:12 +09:00
xdavidwu afde6369b8 seat: avoid unneeded reloading xcursor theme
Load xcursor theme on configuring pointer or tablet tool only if
there was no pointer cap before.
2019-08-31 23:12:33 +09:00
Martin Michlmayr 3dcfa2ee90 Fix markup syntax in man pages 2019-08-31 22:50:39 +09:00
Brian Ashworth 1a8b9fda8a cmd_mode: don't reset to default after subcommand
In cmd_mode, the mode is currently being reset to the default mode after
a mode subcommand handler is executed. This stores and restores the mode
instead
2019-08-27 13:45:04 +09:00
Drew DeVault c55bc40cc1 chmod +x contrib/_incr_version 2019-08-27 12:30:48 +09:00
Drew DeVault c2030b9abd Add _incr_version to contrib/ 2019-08-27 12:29:42 +09:00
asdfjkluiop f07b9afee5 A layer-shell will only be focused if it is non-null 2019-08-27 10:09:41 +09:00
Michael Aquilina a298cad05c Fix formatting for title_format in man 5 sway
Use explicit linebreaks to make scdoc use a separate line for each entry
listed
2019-08-25 09:19:05 +09:00
Dark c3fbb01e07 Update titlebar borders to match i3's current behavior. 2019-08-24 00:41:19 -04:00
Brian Ashworth 90bef0364b cmd_move: fix move to scratchpad hidden container
When moving to a scratchpad hidden container (using `move
[window|container] [to] mark <mark>`), this moves the container to the
scratchpad (equivalent to `move [window|container] [to] scratchpad`).

Previously, this would crash since the destination did not have a
workspace.
2019-08-23 09:12:06 +09:00
Laurent Bonnans a074e0f504 ipc: collapse multi-container command results
Match i3's behavior and only return one status response per command,
even if it applies to several nodes.

Also returns an error if the criteria returns an empty match.

Closes #4483
2019-08-22 13:09:38 -04:00
Brian Ashworth aa9ba58169 sway.5: remove mention of floating_scroll
It looks like floating_scroll was still in the sway(5) man page as a
remnant of the 0.x era. This just removes it from the man page since it
is no longer a valid command. Mouse bindings with Button4-7 can be used
instead
2019-08-22 10:40:13 +09:00
lbonn 7baa3ffece Allow moving a container hidden in scratchpad
(as i3 allows it)

Just update the container's coordinates so that they will be applied at
the next show.
2019-08-20 13:09:52 -04:00
Brian Ashworth ff7d979d99 cmd_xwayland: add force for immediate launch
This just adds a force option to cmd_xwayland that allows for xwayland
to be immediately launched instead of lazily launched. This is useful
for slower machines so it can be part of the startup time instead of
when the user is actively trying to use it
2019-08-20 11:34:34 +09:00
Brian Ashworth 384afc5cb5 input/keyboard: send released only if pressed sent
This keeps track of whether surfaces received a key press event and
will only send a key release event if the pressed event was sent. This
also requires changing the keycodes that are sent via wl_keyboard_enter
to only include those that were previously sent. This makes it so
surfaces do not receive key release events for keys that they never
received a key press for and makes it so switching focus doesn't leak
keycodes that were consumed by bindings.
2019-08-20 11:14:56 +09:00
Simon Ser 7488d33d42 Remove xdg-shell v6 support
All major toolkits and apps have gained xdg-shell stable support.

Closes: https://github.com/swaywm/sway/issues/3690
2019-08-20 10:57:20 +09:00
Ilia Bozhinov 06c36f8435 properly check pixman_region32_contains_rectangle return
pixman_region32_contains_rectangle() returns
pixman_region_intersection_t not a bool.
2019-08-19 12:28:40 +03:00
Brian Ashworth 8441711990 input/seatop_down: add axis handler
This adds an axis handler to seatop_down so that it is possible to
manually scroll while having a mouse button down. This is mainly useful
for selecting text. Some applications may not automatically scroll when
the cursor is near the edge of the application or the user may just
prefer manually scrolling for more control over the scrolling speed.
2019-08-16 08:57:17 +03:00
Brian Ashworth 6061d083ca sway{,-bar}.5: add link to pango font description
This just specifies that both cmd_font and bar_cmd_font should be
specified using the pango font description and adds a link to the pango
documentation regarding the font description
2019-08-16 08:53:55 +03:00
Drew DeVault cb8f68d74b layer-shell: add support for popups 2019-08-14 22:10:05 +03:00
Brian Ashworth f36240208c workspace_split: focus middle if workspace focused
In workspace_split, the middle container that wraps the workspace's
children should be focused for any seat that is focusing the workspace
2019-08-14 13:19:16 +09:00
Brian Ashworth 75a7b02529 container_replace: copy {width,height}_fraction
This copies the width and height fractions from the container to the
container replacing it. Without setting these values, the container
is treated as a new container and throws off the existing sizing. Since
one container is replacing the other, it makes sense for the sizing to
remain the same.
2019-08-14 13:18:57 +09:00
Brian Ashworth 9bac7e6558 swaymsg.1: add tip about two hyphens for commands
This adds a tip to the command section about using two hyphens before a
command to signal that no swaymsg options will follow to allow for sway
commands with leading hyphens.
2019-08-13 11:31:51 +09:00
Brian Ashworth acd3db4fe1 workspace: do not destroy if any seat is focusing
Since each seat has its own focus, do not destroy a workspace until it
is no longer focused by any seat. This prevents seats from being forced
to evacuate the workspace just because another seat switched focus away
from it
2019-08-13 11:30:28 +09:00
Brian Ashworth 3e33e1c76f handle_seat_node_destroy: do not focus own node
In handle_seat_node_destroy, it was possible to focus the node attached
to the seat node that is being destroyed when an empty workspace was
being destroyed in a multiple seat environment. This resulted in
infinite recursion when attempting to destroy the workspace. This just
moves the seat node destruction higher so it cannot be the focus
inactive for the seat. This is the same ordering that is applied to
destruction of seat nodes for containers
2019-08-13 10:16:32 +09:00
Brian Ashworth 804aacb8c7 workspace: prefer identifiers for output priority
Since output names can change in various configurations, including
DisplayPort MST, prefer output identifiers for the output priority.
Users can still use `workspace <ws> output <names-or-ids>`, but any
output that is programmatically added to the list will be added under
the output identifier. If the output name exists in the list (from the
user workspace output configs), then that will be retained instead of
switching to the output identifier for that output.
2019-08-13 09:16:45 +09:00
Antonin Décimo 813e120979 Remove redundant checks 2019-08-12 09:42:11 +09:00
Antonin Décimo 3af52d86f7 Fix memory leaks 2019-08-12 09:42:11 +09:00
Antonin Décimo 0570eb19e5 view_update_size: fix surface_width/height mismatch 2019-08-12 09:42:11 +09:00
Antonin Décimo 9be76e6b12 input: check pointer against nullptr 2019-08-12 09:42:11 +09:00
Antonin Décimo 1d6d26cdec ipc-client: remove useless free for failed malloc 2019-08-12 09:42:11 +09:00
Sebastian Krzyszkowiak dac9c9c72b layer_shell: Guard against negative exclusive zone
This can happen with surfaces that set negative margins.
2019-08-12 09:33:30 +09:00
Drew DeVault 6200ecbc1d Remove rootston from build manifests 2019-08-09 09:59:44 +09:00
Rouven Czerwinski 724926ea6a Revert "Add support for wlr_output's atomic API"
This reverts commit 6e0565e9de.

This is required for the revert on swaywm/wlroots#1781
2019-08-07 16:25:37 +09:00
Brian Ashworth dc5d76cf3b sway.5: explain how to enable pango markup in font
This clarifies the syntax to use for the font command to enable pango
markup support.
2019-08-07 14:05:11 +09:00
Brian Ashworth 19d05d3ae0 config/output: rebase cursors after config applied
When applying an output config, an output may transform or be altered
in some way that effects the cursor. In order for the cursor images to
be updated properly, all cursors need to be rebased after applying
output configs.
2019-08-07 13:50:07 +09:00