Commit graph

1240 commits

Author SHA1 Message Date
Jarkko Oranen 924ed6464c Prevent "move next" and "move prev" commands from crashing
Fixes #1120

When the parent of a view is C_WORKSPACE and the movement direction
is either MOVE_PREV or MOVE_NEXT, the code would attempt to move the
views to the next output, but swayc_adjacent_output can't accept
non-directional movement commands and causes undefined behaviour and
a segfault.

If the code is simply skipped, we end up in an infinite loop.

Instead, we can allow containers whose parent is a C_WORKSPACE take the
path that handles MOVE_PREV and MOVE_NEXT, which behaves as you would
expect.

I'm not certain that this fix is entirely correct as the desired behaviour
of move_container is not very well defined, but it seems to work.
2017-03-19 16:58:39 +02:00
Jarkko Oranen d7350915d9 The default layout of a workspace should follow the output
Hardcoding it to L_HORIZ does not make sense to me,
as you get the unexpected behaviour that windows will be
arranged horizontally until you switch the layout.
2017-03-19 16:57:05 +02:00
Zandr Martin 2d46fc5602
prevent fullscreen focus thievery
I believe this fixes #1102
2017-03-18 17:55:50 -04:00
Zandr Martin baa17ec696
remove unnecessary todo item
As best I can tell this todo was intended to add workspace movement to
the given output with the `workspace <ws> output <op>` command, but i3
does not behave this way.
2017-03-18 17:26:59 -04:00
Jarkko Oranen f6196b7e9a Fix off-by-one error when checking workspace_layout arguments 2017-03-18 22:24:44 +02:00
Jaanus Torp 8306b886e9 Allow also 444 for security file mode 2017-03-16 15:12:22 +00:00
Zandr Martin b507462d1c
Merge branch 'master' of git://github.com/SirCmpwn/sway into new-command-aliases 2017-03-13 07:35:12 -04:00
John Chen a0711d9c94 Fix trivial typo in sway.5.txt (right_ -> _right_)
as title
2017-03-13 10:32:27 +08:00
Drew DeVault 9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05:00
Drew DeVault 74d4f1bec9 Further indentation corrections 2017-03-10 21:41:14 -05:00
Zandr Martin 18450dd16a
deprecate new_window and new_float commands 2017-03-09 14:56:15 -05:00
Zandr Martin 8684b9ecca
fix workspace output assignment 2017-03-08 14:30:01 -05:00
Calvin Lee d47d3d78de Fix #1099: Allow spaces in worspace names
This commit allows unquoted spaces in worspace names in order to keep
compatability with i3. The names _must not_ contain the string "output"
which is documented in 'sway.5' because how sway detects the `move
<workspace> output <output>` command. Also I documented that "number"
may be used before the worspace name without affecting how the name is
evaluated.
2017-03-01 11:35:47 -07:00
Calvin Lee 032907e9d2 Clarify move documentation for floating containers 2017-03-01 11:00:56 -07:00
Calvin Lee b35782bcad i3 feature support: Moving flotaing containers
This commit lets the 'move' command apply to floating containers as well
as tiled ones. The command may be appended with a number of pixels and
then optionally the string `px` (like '10 px') in order to move the
container more or fewer than the standard ten pixels.
2017-03-01 11:00:16 -07:00
Drew DeVault 407ebe9cd3 Move env logging to earlier than wlc_init 2017-02-23 08:32:11 -05:00
Drew DeVault 126ce571da Read configs from /etc/sway/security.d/* 2017-02-20 07:51:31 -05:00
Drew DeVault eabfb6c559 Add * policies and fix bug 2017-02-20 06:48:33 -05:00
Drew DeVault 1980a08358 Enforce new IPC policies 2017-02-20 06:33:04 -05:00
Drew DeVault b10721b89e Add initial support code for new IPC security 2017-02-20 06:11:56 -05:00
Drew DeVault 7dbecdde95 Revise IPC security configuration 2017-02-19 02:56:59 -05:00
Zandr Martin c6f971d108
use absolute view geometry to calculate position 2017-02-14 14:03:56 -05:00
Mykyta Holubakha 4eae9b33e8
xdg-positioner: log window placement 2017-02-06 02:59:23 +02:00
Mykyta Holubakha 006bd0bc3f
Handle xdg-positioner stuff 2017-02-06 02:59:23 +02:00
Drew DeVault b3c0aa3a9e Merge pull request #1055 from Hummer12007/positioner
Properly place windows with xdg-positioner
2017-01-19 06:19:08 -05:00
Mykyta Holubakha 7520607b8d Properly place windows with xdg-positioner 2017-01-19 12:31:43 +02:00
Drew DeVault 7cc6f288d9 Merge pull request #1053 from Hummer12007/__focused__
Support __focused__ as a valid criterion
2017-01-18 22:54:19 -05:00
Mykyta Holubakha 28278864b4 Support __focused__ as a valid criterion
This reflects i3 behavior (see i3/i3#1770)

Scrapping focused support will probably break some existing configs
2017-01-19 03:58:31 +02:00
Mykyta Holubakha d443bce6fe Display instance (if present) in nested layouts 2017-01-19 03:45:23 +02:00
Mykyta Holubakha e714fbcbec Add window instance support 2017-01-19 03:14:59 +02:00
Frantisek Fladung 33a709cae9 add hide_edge_borders smart to sway.5 manual 2017-01-17 11:46:58 +01:00
Mykyta Holubakha 138bcd0cfa Unset LD_LIBRARY_PATH, unless specified 2017-01-16 01:05:05 +02:00
wil a90dddea40 [fix] handle auto layout of empty container 2017-01-14 19:48:41 +01:00
wil 71b386964a replaced "bot" with "bottom" in auto layout commands 2017-01-14 19:41:00 +01:00
wil b74870f516 Improved behavior of insert/remove child in auto layouts
Previous implementation would not preserve dimension of groups
along the major axis. This should avoid weird behavior when
using container motion commands.
2017-01-14 19:41:00 +01:00
willakat 4c06a10004 Merge branch 'master' into master 2017-01-14 19:40:02 +01:00
Daniel Kessler eda4bad725 Add output wrapping
This fixes issue #733. Now if the user focuses output right but is at
the rightmost monitor, the focus will wrap the the leftmost monitor.
This commit adds a new function, swayc_opposite_output, which selects
the opposite output given a position and a direction. Now, when calling
output_by_name, we first check if there is an adjacent output to switch
to. If that fails, we call swayc_opposite_output to handle wrapping.
2017-01-13 16:06:10 -08:00
Drew DeVault c1e6cc3257 Merge pull request #1044 from ametisf/master
Implement hide_edge_borders smart (like in i3 4.13)
2017-01-12 11:39:31 -05:00
Frantisek Fladung c04819e8c0 Implement hide_edge_borders smart (like in i3 4.13) 2017-01-12 12:40:28 +01:00
Mykyta Holubakha d9ba61d7e9 Log capability dropping 2017-01-12 04:35:09 +02:00
Mykyta Holubakha ea1313d80d Keep CAP_SYS_PTRACE with suid binary 2017-01-12 04:25:27 +02:00
Drew DeVault 527c259d06 Fix #1008 2017-01-11 21:13:44 -05:00
willakat dc361fd9df Merge branch 'master' into master 2017-01-08 18:15:37 +01:00
wil 52f3a8df51 fixed up space-after-cast style issues 2017-01-08 18:08:10 +01:00
wil 07474a4fa7 reworked "layout auto*" star commands
- "layout auto_left|auto_xxx" are now "layout auto xxx"
- "layout incmaster <n>" is now "layout auto master [set|inc] <n>"
- "layout incncol <n>" is now "layout auto ncol [set|inc] <n>"
2017-01-08 17:57:38 +01:00
Drew DeVault 7c636da8a3 Fix format error 2017-01-08 11:07:45 -05:00
wil 063c79874a Indent cleanups 2017-01-08 14:49:47 +01:00
wil d822150d83 [fix] Keep Clang happy 2017-01-08 14:16:40 +01:00
wil 2040c62da9 Merge branch 'master' of https://github.com/SirCmpwn/sway 2017-01-07 21:35:30 +01:00
wil f24ebd75fa Added mouse resize for auto layouts 2017-01-07 21:24:43 +01:00