Commit Graph

4878 Commits

Author SHA1 Message Date
emersion
012df55be5 swaybar: use output names instead of output indexes 2018-09-17 16:04:09 +02:00
emersion
5abf832202
Merge pull request #2649 from wmww/fix-move-crash
Fix crash moving out of tab container
2018-09-17 10:52:14 +02:00
William Wold
f48999dd24 Fix crash moving out of tab container 2018-09-17 01:20:45 -07:00
Drew DeVault
456b91600d
Merge pull request #2637 from RyanDwyer/fix-tabbed-workspace-shenanigans
Make seat_get_active_child ignore floating children
2018-09-16 10:22:01 -04:00
Drew DeVault
5192f74be1
Merge pull request #2641 from marienz/inhibit-crash
Fix crash when an idle-inhibiting client exits
2018-09-16 10:19:14 -04:00
Marien Zwart
ffd1308bbc Fix crash when destroying an idle-inhibiting client
When destroying an idle-inhibiting client, idle_inhibit_v1_check_active can get
called from transaction_progress_queue on a view with a null container.
view_is_visible does not handle a view in this state.
2018-09-16 23:20:58 +10:00
Ryan Dwyer
f6e218a643 Rename seat_get_active_child to seat_get_active_tiling_child
Also renames container to con in one function to prevent ugly line
wrapping.
2018-09-16 22:01:54 +10:00
Ryan Dwyer
48bc15e758 Make seat_get_active_child ignore floating children
seat_get_active_child is used to get the active tiling child in a few
places, such as outputs getting their active workspace and
tabbed/stacked containers getting their visible child. When a workspace
uses a tabbed or stacked layout and contains a focused floating view,
calling seat_get_active_child on the workspace would incorrectly return
the floating view. This changes it so it will return the tiling child.

This fixes the following bug:

* Create layout T[view view] then float one of the views
* Attempt to click the tiling view to give it focus - it wouldn't work
because seat_get_active_child would return the floating view
2018-09-16 21:57:19 +10:00
emersion
31c6b5814f
Merge pull request #2638 from RyanDwyer/fix-tab-unmap-crash
Fix crash when unmapping last child of a tabbed workspace
2018-09-16 10:44:39 +02:00
Ryan Dwyer
09733e233f Fix crash when unmapping last child of a tabbed workspace
* Create layout T[view view]
* Move the cursor into the title bar area
* Close both views

Sway would crash because container_at_tabbed would attempt to divide by
zero when there are no children.

The children check isn't needed for the stacked function because it
doesn't divide anything by the number of children.

Fixes #2636.
2018-09-16 14:18:13 +10:00
Drew DeVault
9f985f1f1c
Merge pull request #2634 from ianyfan/ipc
ipc: add focus information to root node
2018-09-15 11:15:09 -04:00
Ian Fan
34dbbb1314 ipc: handle NULL cases for node_get_output 2018-09-15 09:42:49 +01:00
Ian Fan
1c292fd43a ipc: add focus information to root node 2018-09-15 09:42:49 +01:00
Drew DeVault
b47f4f5fd4
Merge pull request #2630 from emersion/wlroots-1243
Update for swaywm/wlroots#1243
2018-09-14 21:12:56 -04:00
Drew DeVault
64d567be9b
Merge branch 'master' into wlroots-1243 2018-09-14 21:03:59 -04:00
Drew DeVault
3b92d5bb6d Additional fix for xdg-output 2018-09-14 21:03:35 -04:00
Drew DeVault
b4d60da856
Merge branch 'master' into wlroots-1243 2018-09-14 20:56:50 -04:00
Drew DeVault
73aab86b6d Postfix xdg-output headers
"Doesn't need an update" my ass...
2018-09-14 20:55:05 -04:00
Drew DeVault
5d104ae537
Merge pull request #2633 from ianyfan/view-recon-fix
Remove redundant container creation in view initialisation
2018-09-14 20:45:56 -04:00
Ian Fan
25ba80057d Remove redundant container creation in view initialization 2018-09-15 01:24:10 +01:00
emersion
b842b4f32e
Merge pull request #2631 from ianyfan/swaybar
bar: remove i3bar_block_free in favour of i3bar_block_unref
2018-09-14 22:19:40 +02:00
Ian Fan
e32e86b65d bar: remove i3bar_block_free in favour of i3bar_block_unref 2018-09-14 21:06:54 +01:00
Drew DeVault
f5ecc89c68
Merge pull request #2629 from RedSoxFan/fix-654
Allow spaces in background file path
2018-09-14 15:57:53 -04:00
emersion
7699c5444c Update for swaywm/wlroots#1243 2018-09-14 19:21:44 +02:00
Brian Ashworth
17fe8924f2 Address ianyfan's comments
wordexp p is now initialized to {0} to prevent a segfault on wordfree
in the failure case.

File paths with single quotes and double quotes are now supported. The
quote can either be wrapped in the other quote or escaped with three
backslashes.

Additionally to make passing file paths with double quotes to swaybg
easier, instead of enclosing the path given to swaybg in quotes, all
spaces, single quotes, and double quotes in the resulting path are now
escaped with a single backslash.
2018-09-14 08:51:01 -04:00
Brian Ashworth
1cf737489d Escape spaces in background file path 2018-09-13 22:21:10 -04:00
Brian Ashworth
0b64cce733 Allow spaces in background file paths 2018-09-13 22:21:10 -04:00
emersion
5f9be1e1aa
Merge pull request #2628 from RyanDwyer/remove-rejigger-assertion
Remove bad assertion in workspace_rejigger
2018-09-13 09:38:28 +02:00
Ryan Dwyer
2f6935e00f Remove bad assertion in workspace_rejigger
The assertion can be (rightfully) triggered by creating layout
V[H[view view] view] and moving the top right view to the right.

After removing the assertion I found the container being moved needs its
size reset to prevent it from being sized wrongly after arranging.
2018-09-13 17:02:10 +10:00
Drew DeVault
dbaafdfac9
Merge pull request #2622 from ianyfan/i3bar-block-ref
i3bar: count references to blocks
2018-09-12 12:28:14 -04:00
Ian Fan
2eaef80206 i3bar: count references to blocks
This prevents blocks from being destroyed before their hotspots are destroyed,
in case it is used for a pending click event that fires between the bar
receiving a new status, which destroys the block, and the bar rendering the new
status, which destroys the hotspot; this problem can be easily produced by
scrolling on a block that immediately causes a new status to be sent, with
multiple outputs
2018-09-12 08:28:28 +01:00
emersion
af9e8f94cc
Merge pull request #2620 from ianyfan/commands
commands: when moving a container, restore focus properly
2018-09-12 09:20:47 +02:00
Drew DeVault
7a295e8932
Merge pull request #2624 from RedSoxFan/update-tex-in-cmd-client
Update textures for cmd_client_* commands
2018-09-11 19:55:23 -04:00
Drew DeVault
d8a96c9e4d
Merge pull request #2621 from emersion/fix-unmap-segfault
Don't use handler_context in view_unmap
2018-09-11 19:50:00 -04:00
Brian Ashworth
0b7fe54f9e Update textures for cmd_client_* commands
Since the `client.{focused,focused_inactive,unfocused,urgent}` commands
change colors, the textures need to be updated otherwise the textures
and the rest of the title bar may utilize different colors.
2018-09-11 19:34:57 -04:00
Drew DeVault
4fbec701fc
Merge pull request #2618 from RyanDwyer/tiling-drag
Implement tiling drag
2018-09-11 19:19:17 -04:00
Ryan Dwyer
679c7eb08c Minor fixes to tiling drag implementation
* Make container_add_sibling's `after` argument a boolean.
* Use a constant for drop layout border
* Make thickness an int
* Add button state check
* Move comments in seat_end_move_tiling
2018-09-12 08:46:46 +10:00
emersion
8b263429cf Don't use handler_context in view_unmap 2018-09-11 19:34:58 +02:00
Ian Fan
ae535396b0 commands: when moving container, remove its gaps 2018-09-11 16:46:11 +01:00
Ian Fan
c770949a9f commands: when moving container, restore focus properly 2018-09-11 16:46:07 +01:00
Ryan Dwyer
df95c61044 Fix crash in workspace_wrap_children
When workspace_wrap_children is called on a workspace which has a
fullscreen child and the fullscreen child is a direct child of the
workspace, sway would crash.

The workspace's fullscreen pointer is unset when the fullscreen
container is detached and applied again when added to a parent, but in
this case the parent hadn't yet been added to the workspace which meant
con->workspace was NULL.

The fix makes container_handle_fullscreen_reparent return if there's no
workspace, and the fullscreen pointer is reapplied in
workspace_wrap_children.
2018-09-11 23:38:17 +10:00
Ryan Dwyer
403905c11b Fix line length 2018-09-11 23:24:57 +10:00
Ryan Dwyer
eb74317c2d Fix dropzone box on scaled outputs 2018-09-11 22:26:39 +10:00
Ryan Dwyer
8bb40c24c7 Implement tiling drag
Hold floating_modifier and drag a tiling view to a new location.
2018-09-11 21:34:21 +10:00
Ryan Dwyer
ec9c4de564 Introduce tiling_drag directive 2018-09-11 17:17:19 +10:00
Ryan Dwyer
d4e80cf301 Rename OP_MOVE to OP_MOVE_FLOATING
In preparation for introducing OP_MOVE_TILING.
2018-09-11 16:56:05 +10:00
Drew DeVault
822b45f483
Merge pull request #2617 from wmww/cursor-enter-on-focus-change
Give windows pointer focus immediately
2018-09-10 21:00:39 -04:00
William Wold
097ed03647 Minor fix 2018-09-10 17:52:42 -07:00
William Wold
22c5dd8a02 Minor fix 2018-09-10 10:18:12 -07:00
William Wold
9a08019267 Prevent stacked layout from crashing 2018-09-10 10:18:12 -07:00