Commit graph

5144 commits

Author SHA1 Message Date
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 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
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
Drew DeVault ea2497d35c
Merge pull request #2950 from emersion/presentation-time
Implement the presentation-time protocol
2018-10-25 15:31:47 +02:00
Ian Fan 19421373b9 swaybar: when scrolling, check that there are workspaces to scroll on 2018-10-25 14:12:26 +01:00
Ian Fan c5541763c0 swaybar: fix scrolling behaviour
1. wrap_scroll has been fixed
2. release bindings are checked when returning early
2018-10-25 12:57:16 +01:00
Ian Fan c3fdabb725 swaybar: reverse order of workspaces list
This makes it congruent with its visual appearance, making it easier to
reason about.
2018-10-25 12:57:16 +01:00
emersion b1c49038a6
Merge pull request #2971 from RyanDwyer/document-output-identifiers
Document how to identify outputs by make, model and serial
2018-10-25 10:27:08 +02:00
emersion df64cb2827
Merge pull request #2970 from RyanDwyer/fix-scratchpad-size
Fix containers not being resized when entering scratchpad
2018-10-25 10:13:32 +02:00
Ryan Dwyer ea097631af Document how to identify outputs by make, model and serial 2018-10-25 18:08:29 +10:00
Ryan Dwyer f7aed5c7e5 Fix containers not being resized when entering scratchpad
This fixes a regression introduced by
662466e8db. When adding a container to the
scratchpad, setting container->scratchpad = true before
container_set_floating made container_set_floating believe that the
container was already floating. This fixes it by setting the property
afterwards instead.
2018-10-25 17:32:16 +10:00
Drew DeVault 41f744c224
Merge pull request #2925 from ianyfan/swaylock
swaylock: exit early if unable to get input inhibitor
2018-10-24 18:54:22 +02:00