Commit Graph

6032 Commits

Author SHA1 Message Date
Drew DeVault
be138dab44 Update version to 1.2 2019-08-27 13:46:22 +09:00
Brian Ashworth
a8cb63e3a4 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:46:18 +09:00
Drew DeVault
b6e3045d32 Further refinements to _incr_version script 2019-08-27 13:41:54 +09:00
Drew DeVault
7e9a9f1439 chmod +x contrib/_incr_version 2019-08-27 12:31:42 +09:00
Drew DeVault
06c894cada Add _incr_version to contrib/ 2019-08-27 12:31:14 +09:00
asdfjkluiop
00d846fb91 A layer-shell will only be focused if it is non-null 2019-08-27 10:09:59 +09:00
Michael Aquilina
e2cbbb5413 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-27 09:37:10 +09:00
Dark
8c75c5b46d Update titlebar borders to match i3's current behavior. 2019-08-27 09:37:10 +09:00
Brian Ashworth
c1ad1de155 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-27 09:37:10 +09:00
Laurent Bonnans
26442ad843 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-27 09:37:10 +09:00
lbonn
2c2d6018bb 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-27 09:37:10 +09:00
Brian Ashworth
a08081a405 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-27 09:37:10 +09:00
Brian Ashworth
091b87bfb8 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-27 09:37:10 +09:00
Drew DeVault
d6846ad3af layer-shell: add support for popups 2019-08-20 14:53:22 +09:00
Ilia Bozhinov
54b448aa63 properly check pixman_region32_contains_rectangle return
pixman_region32_contains_rectangle() returns
pixman_region_intersection_t not a bool.
2019-08-20 13:27:52 +09:00
Brian Ashworth
1df185357c 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-20 13:27:52 +09:00
Brian Ashworth
b48e4b47dd 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-20 13:27:52 +09:00
Brian Ashworth
daf766eccd 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-20 13:27:52 +09:00
Brian Ashworth
2e757e13a9 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-20 13:27:52 +09:00
Brian Ashworth
7447eefca9 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-20 13:27:52 +09:00
Brian Ashworth
63651bc5e0 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-20 13:27:52 +09:00
Brian Ashworth
e8204a852d 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-20 13:27:52 +09:00
Antonin Décimo
d9c09c483a Remove redundant checks 2019-08-20 13:27:52 +09:00
Antonin Décimo
64cfe746ab Fix memory leaks 2019-08-20 13:27:52 +09:00
Antonin Décimo
9e5664e997 view_update_size: fix surface_width/height mismatch 2019-08-20 13:27:52 +09:00
Antonin Décimo
ee40501570 input: check pointer against nullptr 2019-08-20 13:27:52 +09:00
Antonin Décimo
3896bdaa68 ipc-client: remove useless free for failed malloc 2019-08-20 13:27:52 +09:00
Sebastian Krzyszkowiak
8bd3b7be8a layer_shell: Guard against negative exclusive zone
This can happen with surfaces that set negative margins.
2019-08-20 13:27:52 +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
Brian Ashworth
f59b665792 cmd_mode: make modes case sensitive
This mirrors a change in i3 4.17 that makes binding modes case
sensitive
2019-08-06 11:32:26 +09:00
Brian Ashworth
a8a239e2f1 swaymsg: return 2 for sway errors
This mirrors a change in i3 4.17 that returns 2 for errors from sway,
including invalid command, command failed, and invalid subscription
requests
2019-08-06 11:31:39 +09:00
Brian Ashworth
56b5ad777c input/cursor: do not hide when buttons are pressed
This just adds a small quality of life improvement to the cursor hiding
functionality. The cursor will no longer be hidden unless all buttons
are released.
2019-08-06 11:31:12 +09:00
Brian Ashworth
a9e31d925f cmd_swap: add floating support
For feature parity with i3 4.17, this just adds floating container
support to the swap command
2019-08-06 11:30:17 +09:00
Jeff Peeler
140ce785fe cmd_opacity: add relative opacity changes
This enhances the opacity command to support relative assignment as well
as the currently implemented absolute assignment. The syntax is copied
from the same format that gaps uses for relative and absolute setting.
An example usage in a sway config looks like:

// relative change (this feature)
bindsym button4 opacity plus .1
bindsym button5 opacity minus .1

// absolute change (this feature)
bindsym button4 opacity set 1
bindsym button5 opacity set .3

// old way, still supported
bindsym button4 opacity 1
bindsym button5 opacity .3
2019-08-05 22:10:36 -04:00
Brian Ashworth
90d8a4df32 input/libinput: typo fixes (get -> get_default)
This just fixes some typos in the reset functions that were using
the get calls instead of get_default
2019-08-03 15:46:05 +02:00
Antonin Décimo
c1a5f61622 Remove unused variable 2019-08-02 20:55:49 +03:00
Antonin Décimo
7e5c2d7afa Allocator sizeof operand mismatch
Result of 'calloc' is converted to a pointer of type 'char *', which
is incompatible with sizeof operand type 'char **'
2019-08-02 20:55:49 +03:00
Simon Ser
6e0565e9de Add support for wlr_output's atomic API
See https://github.com/swaywm/wlroots/pull/1762
2019-08-02 10:01:50 -04:00
Brian Ashworth
8ee054b1b9 bindsym/code: add group support
This adds support for specifying a binding for a specific group. Any
binding without a group listed will be available in all groups. The
priority for matching bindings is as follows: input device, group, and
locked state.

For full compatibility with i3, this also adds Mode_switch as an alias
for Group2. Since i3 only supports this for backwards compatibility
with older versions of i3, it is implemented here, but not documented.
2019-08-01 18:54:58 +03:00
Brian Ashworth
14562fdbee input/keyboard: don't reset layout for same keymap
In sway_keyboard_config, do not change the keymap when the new keymap
is unchanged, unless this is during a config reload. The reasoning for
this is to prevent the effective layout from being reset to index 0 for
input config changes unrelated to the keymap.
2019-08-01 18:27:01 +03:00
Paul Ouellette
f567a40d59 Fix typo in sway(5) manpage 2019-07-31 21:45:52 -04:00
Brian Ashworth
75de31d36e libinput: fix set_send_events
This just fixes the check in set_send_events for whether the mode has
changed. LIBINPUT_CONFIG_SEND_EVENTS_ENABLED is 0 so the bitmask check
cannot be fixed, but Sway doesn't allow multiple modes to be set anyway
(not really sure why you would need to) so a basic equality check works
2019-07-31 22:32:13 +03:00
Brian Ashworth
fc955716d4 input/libinput: fix typo in set_middle_emulation
This fixes a typo in set_middle_emulation where it would set left
handed instead of middle emulation.
2019-07-28 09:19:59 -04:00
Pedro Côrte-Real
cefc608cb9 Fix resize sibling amount calculations
Sibling amounts were being calculated after the original fraction had
been altered. This led to broken resize amounts. Fix that by calculating
things upfront before adjusting values which also makes the code
cleaner.

For sanity checks also calculate the sibling amount with the
ceiling so we never go below the sanity check even by one pixel.

Fixes #4386
2019-07-27 23:36:16 -04:00
Simon Ser
f984f21b6a Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.

This commit si similar to wlroots' ca45f4490ccc ("Remove all wayland-server.h
includes").
2019-07-27 17:16:56 -04:00
Ashkan Kiani
e4bba906b6 Avoid adding duplicate criteria for no_focus and command 2019-07-27 03:53:05 +03:00
Brian Ashworth
17c9a0e84f arrange: remove gaps for workspace location deltas
When arranging the workspace, prev_x and prev_y should be ignoring the
current gaps otherwise the workspace diff_x and diff_y location deltas
will be off. When the deltas are off, each arrangement of the workspace
would incorrectly move floaters an extra -workspace->current_gaps.left
along the x-axis and an extra -workspace->current_gaps.top along the
y-axis.
2019-07-26 18:13:27 +03:00