Commit Graph

4976 Commits

Author SHA1 Message Date
Ryan Dwyer
b4a0363d17 Implement resizing tiled containers via cursor
* The OP_RESIZE seat operation has been renamed to OP_RESIZE_FLOATING,
and OP_RESIZE_TILING has been introduced.
* Similar to the above, seat_begin_resize and handle_resize_motion have
been renamed and tiling variants introduced.
* resize.c's resize_tiled has to be used, so container_resize_tiled has
been introduced in resize.c to allow external code to call it.
2018-08-12 10:45:54 +10:00
Drew DeVault
146cc0a441
Merge pull request #2452 from janza/position-command-fix-args
Man page: Correct argument format for output position config
2018-08-11 19:08:01 -04:00
Josip Janzic
5aca2b42e6
man: Correct format for output position config 2018-08-11 18:41:31 +02:00
Drew DeVault
b6428f4751
Merge pull request #2451 from RyanDwyer/fix-ancestor-crash
Fix container_has_ancestor crash
2018-08-11 10:28:05 -04:00
Ryan Dwyer
5f3757c927 Fix container_has_ancestor crash
Fixes #2450
2018-08-12 00:14:52 +10:00
Drew DeVault
2aa6d98c5a
Merge pull request #2449 from RyanDwyer/remove-bfs
Remove container_for_each_descendant_bfs
2018-08-11 08:29:34 -04:00
emersion
9545c70928
Merge pull request #2448 from RyanDwyer/remove-container-has-child
Remove container_has_child
2018-08-11 08:44:11 +01:00
Ryan Dwyer
4ad1ccc9dc Remove container_for_each_descendant_bfs
The function was not used.

Also renames container_for_each_descendant_dfs to just
container_for_each_descendant.
2018-08-11 15:57:09 +10:00
Ryan Dwyer
31844bf42b Remove container_has_child
In all cases you can use container_has_ancestor with the arguments
swapped, which is faster than container_has_child.
2018-08-11 15:36:19 +10:00
emersion
e474d87e42
Merge pull request #2447 from ianyfan/swaynag-leak
Fix memory leak in swaynag
2018-08-10 18:53:18 +01:00
Ian Fan
6e7052fc44 swaynag: destroy old cursor theme when updated 2018-08-10 18:34:23 +01:00
Drew DeVault
c7e99ee0d4
Merge pull request #2446 from emersion/xwayland-unmanaged-order
xwayland: fix unmanaged surfaces order
2018-08-10 09:46:08 -04:00
emersion
d1433c637a xwayland: fix unmanaged surfaces order 2018-08-10 12:47:24 +01:00
Brian Ashworth
df1aeed6c2
Merge pull request #2441 from RyanDwyer/finish-resize-commands
Finish resize commands
2018-08-09 20:04:33 -04:00
Ryan Dwyer
af693cba26 Update resize documentation 2018-08-10 08:50:38 +10:00
Ryan Dwyer
6c730a2cb2 Implement resize set <width> <height> for tiled containers
Unlike i3, this implementation allows px measurements.

Also fixes a sane size check.
2018-08-10 08:50:15 +10:00
Ryan Dwyer
9395d3c93c Implement resize grow|shrink <direction> <amount> for tiled containers 2018-08-10 08:50:15 +10:00
Drew DeVault
db0fa066e5 Remove obsolete security sanity check 2018-08-09 08:45:32 -04:00
Drew DeVault
425ee270b4
Merge pull request #2440 from RedSoxFan/bg-swaynag-reading-only
Don't call swaynag_log for bg when not reading
2018-08-08 17:21:22 -04:00
Brian Ashworth
b6f4623551 Don't call swaynag_log for bg when not reading 2018-08-08 17:04:12 -04:00
Drew DeVault
78c0f013dd
Merge pull request #2439 from RedSoxFan/fix-2434
Allow a fallback color to be specified for swaybg
2018-08-08 16:42:33 -04:00
Brian Ashworth
43d1ffc9dd Allow a fallback color to be specified for swaybg
This allows for a color to be set when the wallpaper does not fill the
entire output. If specified, the fallback color is also used when the
image path is inaccessible.
2018-08-08 15:37:06 -04:00
Brian Ashworth
fc039f0759
Merge pull request #2423 from manio/master
[RFC] Fix segv when sway is terminating
2018-08-08 15:36:17 -04:00
Brian Ashworth
3c26536267
Merge branch 'master' into master 2018-08-08 15:26:44 -04:00
Drew DeVault
e28101e6e1 私の日本語が上手じゃないですね 2018-08-08 11:53:11 -04:00
Drew DeVault
1c7a6a49b6 Remove setcap instructions
These are obsolete, we don't require them anymore.
2018-08-08 11:40:33 -04:00
emersion
89e176d3fb
Merge pull request #2436 from RyanDwyer/fix-floating-deco-focus
Fix focus when clicking floating decorations
2018-08-08 13:49:00 +01:00
Ryan Dwyer
f5dc3ac09d Don't call send_pointer_notify_button when doing move or resize 2018-08-08 22:32:59 +10:00
Ryan Dwyer
4c5dc6f135 Focus floating views when beginning move/resize operations 2018-08-08 22:28:13 +10:00
Ryan Dwyer
a0ece6f956 Rename container_at_view to surface_at_view and make it return void 2018-08-08 22:28:13 +10:00
Ryan Dwyer
1e984fec05 Fix focus when clicking floating decorations
It's not right for container_at_view to only return the swayc if a
surface was clicked.
2018-08-08 22:28:13 +10:00
Drew DeVault
c8a8216629
Merge pull request #2420 from RyanDwyer/floating-move-to-workspace
Implement move to workspace on a floating container
2018-08-08 08:13:22 -04:00
Ryan Dwyer
5653fc754b Deny moving a sticky container to workspace if it's the same output
Rationale: Sticky containers are always assigned to the visible
workspace.

The basic idea here is to check the destination's output (move.c:190).
But if the command was `move container to workspace x` then a workspace
might have been created for it. We could destroy the workspace in this
case, but that results in unnecessary IPC events.

To avoid this, the logic for `move container to workspace x` has been
adjusted. It now delays creating the workspace until the end, and uses
`workspace_get_initial_output` to determine and check the output before
creating it.
2018-08-08 12:50:42 +10:00
Ryan Dwyer
a0649190de Fix edge cases when moving floating container to new workspace
* Removes container_floating_move_to_container, instead opting to put
that logic in container_move_to
* In the seat code, focusing a floating view now updates the pending
state only and lets the next transaction carry it over to the current
state. This is required, otherwise it would crash.
* When unfullscreening a floating container, an output check is now done
to see if it should center it.
2018-08-08 08:48:20 +10:00
Ryan Dwyer
36281609ea Implement move to workspace on a floating container
Also adjusts container_floating_translate to not change the current
properties directly.
2018-08-08 08:48:20 +10:00
Drew DeVault
6f0bc469e9
Merge pull request #2432 from RyanDwyer/fix-move-crash
Fix crash when running `move container to workspace back_and_forth`
2018-08-07 10:27:45 -04:00
Drew DeVault
84845adb8e
Merge pull request #2433 from RyanDwyer/fix-sticky-infinite-loop
Fix infinite loop when focusing sticky containers via workspace command
2018-08-07 10:27:25 -04:00
Ryan Dwyer
50f3a7ff5c Fix infinite loop when focusing sticky containers via workspace command
In a multi-output setup, if a sticky container is on one output and
focus is on the other output, and you run (eg) `workspace 1` to focus
the workspace containing the sticky container, an infinite loop would
occur. It would loop infinitely because it would remove the sticky
container from the workspace, add it back to the same workspace, and
then decrement the iterator variable.

The fix just wraps the loop in a workspace comparison.
2018-08-07 23:32:25 +10:00
Ryan Dwyer
5ac6f2f429 Fix crash when running move container to workspace back_and_forth
The back_and_forth condition is intended to be handled in the else-if
block, but this was never reached because it remained in the first
block's conditions.
2018-08-07 23:04:21 +10:00
Drew DeVault
1818c58e40
Merge pull request #2430 from ianyfan/socketpath-leaks
Fix memory leaks in get_socketpath
2018-08-06 14:08:51 -04:00
Ian Fan
baf4604629 ipc-client: fix memory leaks in get_socketpath 2018-08-06 17:30:24 +01:00
Brian Ashworth
17f557298e
Merge pull request #2428 from RyanDwyer/workspace-move-to-output
Move workspace moving code out of container_move_to
2018-08-06 11:55:08 -04:00
Brian Ashworth
639f3368e1
Merge branch 'master' into workspace-move-to-output 2018-08-06 11:47:00 -04:00
Drew DeVault
d8b65193c4
Merge pull request #2268 from emersion/server-decoration-borders
Enable borders on floating SSD xdg-shell views
2018-08-06 11:32:17 -04:00
Drew DeVault
1a8bee68b4
Merge pull request #2392 from ianyfan/commands
Fix commands: criteria, layout, move, workspace
2018-08-06 11:30:14 -04:00
emersion
d2ac48f920 Handle views created after decoration mode is sent for xdg-shell-v6 2018-08-06 15:28:33 +01:00
emersion
9d578e0a0f Handle views created after decoration mode is sent for xdg-shell 2018-08-06 15:20:30 +01:00
emersion
700941dde8 Listen to server-decoration mode changes 2018-08-06 15:20:30 +01:00
Ryan Dwyer
f57a3919cf Move workspace moving code out of container_move_to
container_move_to handled moving containers to new parents, as well as
moving workspaces to new outputs.

This commit removes the workspace-moving code from this function and
introduces workspace_move_to_output. Moving workspaces using
container_move_to only happened from the move command, so it's been
implemented as a static function in that file.

Simplifying container_move_to makes it easier for me to fix some issues
in #2420.
2018-08-07 00:03:01 +10:00
Ian Fan
f7c21451df commands: fix workspace edge cases 2018-08-06 14:17:58 +01:00