Commit graph

5203 commits

Author SHA1 Message Date
Drew DeVault
b90af33570
Merge pull request #3020 from emersion/swaymsg-return-status
swaymsg: fix get_outputs status code
2018-10-29 19:08:41 +01:00
Franklin "Snaipe" Mathieu
f8e83ee20a binding: match single-key bindings if no multi-key binding matched
This makes bindings more snappy when the user is typing faster than
his keycaps are releasing.

Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
2018-10-29 13:04:19 +00:00
emersion
eb675f0dfd
swaymsg: fix get_outputs status code 2018-10-29 11:25:54 +01:00
emersion
1c2a356dcf
Merge pull request #3016 from mwenzkowski/fix-uninitialized-pointer
cursor: fix uninitialized pointer in cursor_rebase
2018-10-28 19:52:08 +01:00
Brian Ashworth
d14a627c10
Merge pull request #3009 from emersion/swayidle-sigusr
swayidle: enter idle state on SIGUSR1
2018-10-28 13:31:02 -04:00
mwenzkowski
66ae58d62a cursor: fix uninitialized pointer in cursor_rebase 2018-10-28 17:33:27 +01:00
Drew DeVault
09f3f7b75f
Merge pull request #3011 from Emantor/fix/2922
output: initialize layers before usage in apply_config
2018-10-28 12:42:27 +01:00
Drew DeVault
aa21d1b867
Merge pull request #3010 from Emantor/fix/cursor_warping_view_map
input-manager: consider cursor warping on input_manager_set_focus
2018-10-28 12:40:26 +01:00
Drew DeVault
5ea81e6f7e
Merge pull request #3008 from CameronNemo/patch-1
Create ISSUE_TEMPLATE.md
2018-10-28 12:36:23 +01:00
Rouven Czerwinski
e4df675840 output: initialize layers and signal before using functions
The previous pull request #2993 tried to fix this by moving the function which
used the layers after the initilization.
Since this initialization is done unconditionally only depending on the struct
definition, move the layer initialization to the beginning of the function.
Also move the signal initialization of the destroy event.

Fixes #2992
2018-10-28 11:06:15 +01:00
Rouven Czerwinski
6f87d0c2cf input-manager: consider cursor warping on input_manager_set_focus
input_manager_set_focus is used to set the focus after mapping the view in
view_map. This needs to consider to warp the cursor as well, since for
WARP_CONTAINER, the cursor should warp to the newly created view.
2018-10-28 10:29:10 +01:00
emersion
5fcb814a73
swayidle: enter idle state on SIGUSR1 2018-10-28 09:16:42 +01:00
Cameron Nemo
93eec3e1b6
Create ISSUE_TEMPLATE.md 2018-10-27 20:19:30 -07:00
Drew DeVault
2ccf511cba
Merge pull request #3006 from Snaipe/remove-class
ipc: make json for view match i3's output more closely
2018-10-28 02:20:10 +02:00
emersion
e3a0e3322b
Merge pull request #3000 from Robinhuett/workspace_address_output_by_name
Use output identifier for workspace config
2018-10-27 21:26:19 +02:00
emersion
f9a276544b
Merge pull request #3003 from Hi-Angel/master
seat: don't traverse the list to check if it's empty
2018-10-27 21:22:03 +02:00
Konstantin Kharlamov
cd3c2f4553 seat: don't traverse the list to check if it's empty
Found by introspection.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2018-10-27 21:10:10 +03:00
Franklin "Snaipe" Mathieu
03ca8596d6 ipc: make class, instance, and title window properties optional
i3 seems to make all window properties, with the exception of
transient_for, optional[1].

[1]: 315ff17563/src/ipc.c (L435-L450)

Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io>
2018-10-27 18:41:26 +01:00
Franklin "Snaipe" Mathieu
259fe1e76f ipc: remove class key from view json
It turns out that i3 does not have a `class` key in the json description
of a view, but provides it through `window_properties.class`. Since
`window_properties` has been added by 8fc9328, we can remove `class`
altogether.

Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io>
2018-10-27 18:39:17 +01:00
Drew DeVault
707f3ad275
Merge pull request #3001 from madblobfish/swaylock-completions-and-manpage
Reworked fish completions and moved stuff in swaylock manpage
2018-10-27 17:10:00 +02:00
madblobfish
31d1ffb88f added fish completions for swaynag 2018-10-27 16:54:32 +02:00
madblobfish
834f23f57a added fish completions for swayidle 2018-10-27 16:54:20 +02:00
Robinhuett
0a4cf4748d Use output identifier for workspace config 2018-10-27 15:56:06 +02:00
madblobfish
fe32a745ee reordered swaylock manpage 2018-10-27 15:25:10 +02:00
madblobfish
cff62bf846 updated fish completions for swaylock 2018-10-27 15:25:03 +02:00
Drew DeVault
5a98dfee02 Revert "Fix #2992"
This reverts commit 94985146ea.
2018-10-27 08:55:45 -04:00
emersion
de250a523f
Merge pull request #2997 from RyanDwyer/fix-cursor-during-operation
Don't reset cursor during mouse operations
2018-10-27 11:23:57 +02:00
Ryan Dwyer
d0dca7f35e Don't reset cursor during mouse operations 2018-10-27 19:12:55 +10:00
Ryan Dwyer
e4053191e6
Merge pull request #2995 from colemickens/uninit-warnings
tree/view.c: fix uninitialized variables warning
2018-10-27 15:58:37 +10:00
Cole Mickens
6414b5d288 tree/view.c: fix uninitialized variables warning 2018-10-26 22:25:11 -07:00
Drew DeVault
25a8f7dcb8
Merge pull request #2994 from RyanDwyer/respect-lone-child-border
Respect border settings when rendering lone tabbed/stacked child
2018-10-27 05:29:47 +02:00
Ryan Dwyer
65328ef60c Respect border settings when rendering lone tabbed/stacked child
In i3, when a child of a tabbed or stacked container has no siblings,
its border settings are respected.

This patch achieves the same effect by rendering a lone tabbed/stacked
child as if it's a linear container. This makes the border settings be
respected.

Over in view_autoconfigure, we compensate for this by only adjusting
`y_offset` if there's multiple children.
2018-10-27 11:23:02 +10:00
Brian Ashworth
b63669a2a0
Merge pull request #2993 from mwenzkowski/fix-2992
Fix #2992
2018-10-26 19:18:00 -04:00
mwenzkowski
94985146ea Fix #2992
Move a function call, such that data it depends on is initialized before.
2018-10-26 23:31:57 +02:00
Drew DeVault
b52e005346
Merge pull request #2989 from RyanDwyer/fix-focus-glitchiness
Fix focus after a non-visible workspace's last container is destroyed
2018-10-26 16:02:11 +02:00
Ryan Dwyer
63d076dc2a Fix focus after a non-visible workspace's last container is destroyed
The code being changed is responsible for updating the focus stack when
a container is destroyed in a different part of the tree to where the
real focus is. It's attempting to set focus_inactive to a sibling (or
parent if no siblings) of the container that is being destroyed, then
put our real focus back on the end of the focus stack.

The problem occurs when the container being destroyed is in a different
workspace. For example:

* Have a focused view on workspace 1
* Have workspace 2 not visible with a single view that is unmapping
* The first call to seat_set_raw_focus sets focus to workspace 2 because
it's the parent
* Prior to this patch, the second call to seat_set_raw_focus would set
focus to the view on workspace 1
* Later, when using output_get_active_workspace, this function would
return workspace 2 because it's the first workspace it finds in the
focus stack.

To fix this, workspace 1 must be placed on the focus stack between
workspace 2 and the focused view. That's what this patch does.

Lastly, it also uses seat_get_focus_inactive to choose the focus. This
fixes a crash when a view unmaps while a non-container is focused (eg.
swaylock), because focus is NULL.
2018-10-26 19:15:12 +10:00
Drew DeVault
b29beb1aa0
Merge pull request #2985 from mihaicmn/fix-retiling
Fix re-tiling for floating containers
2018-10-26 03:20:17 +02:00
emersion
1e8e7e16e7
Merge pull request #2984 from Ferdi265/master
sway-ipc: don't log errno if unneeded and add more descriptive errors
2018-10-25 22:35:38 +02:00
Mihai Coman
5323551a7f Fix re-tiling for floating containers
When a floating container is tiled (e.g.: 'floating toggle' or
'floating disable'), it should be placed after/below the inactive
focused container from the tiling layout.
2018-10-25 23:20:38 +03:00
Ferdinand Bachmann
6409a109f6 sway-ipc: don't log errno if unneeded and add more descriptive errors 2018-10-25 22:17:03 +02:00
Drew DeVault
73b7c5cc05
Merge pull request #2982 from Toromtomtom/master
protect newline
2018-10-25 22:03:30 +02:00
Tom Warnke
1670eafd7b protect newline 2018-10-25 21:48:39 +02:00
Drew DeVault
37eb83940f
Merge pull request #2980 from ppascher/allow_workspace_missing_output
Update workspace.c
2018-10-25 20:10:41 +02:00
ppascher
2123dfa15f
Update workspace.c
re-added missing output check after config load
2018-10-25 19:48:45 +02:00
ppascher
db61d581a3
Update workspace.c
Remove output requirement for workspace command
2018-10-25 19:24:01 +02:00
emersion
6b59533646
Merge pull request #2973 from ianyfan/swaybar
swaybar: fix scrolling behaviour
2018-10-25 18:32:09 +02:00
Drew DeVault
51ad2676d0
Merge pull request #2975 from RyanDwyer/deny-commands-when-no-outputs
Deny several commands when there's no outputs connected
2018-10-25 17:10:36 +02:00
emersion
2507a5e447
Merge pull request #2974 from RyanDwyer/cursor-rebase-after-txn-apply
Rebase the cursor after applying transactions
2018-10-25 16:12:46 +02:00
Ryan Dwyer
885963f11f Deny several commands when there's no outputs connected 2018-10-26 00:03:44 +10:00
Ryan Dwyer
60a1d79de7 Rebase the cursor after applying transactions
This approaches cursor rebasing from a different angle. Rather than
littering the codebase with cursor_rebase calls and using transaction
callbacks, this just runs cursor_rebase after applying every transaction
- but only if there's outputs connected, because otherwise it causes a
crash during shutdown.

There is one known case where we still need to call cursor_rebase
directly, and that's when running `seat seat0 cursor move ...`. This
command doesn't set anything as dirty so no transaction occurs.
2018-10-25 23:37:40 +10:00