Commit Graph

149 Commits

Author SHA1 Message Date
Pascal Pascher 2bf893248a style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: false 2018-07-24 23:37:41 +02:00
Pascal Pascher 24ad1c3983 Added meson option "enable_xwayland" (default: true) to enable/disable xwayland support 2018-07-24 22:16:06 +02:00
Ryan Dwyer 12e90fa600 Store scratchpad list in sway_root instead of server 2018-07-23 08:24:32 +10:00
Ryan Dwyer 81e8f31cc6 Implement scratchpad
Implements the following commands:

* move scratchpad
* scratchpad show
* [criteria] scratchpad show

Also fixes these:

* Fix memory leak when executing command with criteria
(use `list_free(views)` instead of `free(views)`)
* Fix crash when running `move to` with no further arguments
2018-07-23 08:24:32 +10:00
Ryan Dwyer 9fbe13b9be Implement floating_modifier and mouse operations for floating views
This implements the following:

* `floating_modifier` configuration directive
* Drag a floating window by its title bar
* Hold mod + drag a floating window from anywhere
* Resize a floating view by dragging the border
* Resize a floating view by holding mod and right clicking anywhere on
the view
* Resize a floating view and keep aspect ratio by holding shift while
resizing using either method
* Mouse cursor turns into resize when hovering floating border or corner
2018-07-22 23:10:19 +10:00
Ryan Dwyer dad3a8deee Fix crash when moving workspace to output 2018-07-19 16:52:02 +10:00
Ryan Dwyer 5f0a4bb6a4 Update workspace urgent state when views close or move workspaces 2018-07-16 13:15:35 +10:00
Ryan Dwyer 2032f85d94 Simplify transactions by utilising a dirty flag on containers
This PR changes the way we handle transactions to a more simple method.
The new method is to mark containers as dirty from low level code
(eg. arranging, or container_destroy, and eventually seat_set_focus),
then call transaction_commit_dirty which picks up those containers and
runs them through a transaction. The old methods of using transactions
(arrange_and_commit, or creating one manually) are now no longer
possible.

The highest-level code (execute_command and view implementation
handlers) will call transaction_commit_dirty, so most other code just
needs to set containers as dirty. This is done by arranging, but can
also be done by calling container_set_dirty.
2018-07-14 23:14:55 +10:00
emersion 63b4bf5000
Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
vilhalmer 4e7ef1dd39
No need to walk to workspace, recursive will 2018-07-09 08:26:39 -04:00
vilhalmer 47c20f8ea4
Regroup signal 2018-07-09 08:25:32 -04:00
vilhalmer ce626a0708
Replace empty workspace with moved workspace 2018-07-08 22:55:50 -04:00
Ryan Dwyer 38398e2d77 Implement atomic layout updates for tree operations
This implements atomic layout updates for when views map, reparent or
unmap.
2018-06-23 16:24:11 +10:00
Ryan Dwyer 9e96cfd310 Merge remote-tracking branch 'upstream/master' into atomic 2018-06-11 11:03:43 +10:00
Drew DeVault 867fb6aedb
Merge pull request #2124 from emersion/drag-icons
Render drag icons
2018-06-09 10:50:34 -07:00
Nate Symer 6a910b9ba5 Implement gaps (PR #2047) 2018-06-09 09:34:56 -04:00
emersion cfd02918c0
Render drag icons 2018-06-09 13:26:03 +01:00
Ryan Dwyer bb66e6d578 Refactor everything that needs to arrange windows
* The arrange_foo functions are now replaced with arrange_and_commit, or
with manually created transactions and arrange_windows x2.
* The arrange functions are now only called from the highest level
functions rather than from both high level and low level functions.
* Due to the previous point, view_set_fullscreen_raw and
view_set_fullscreen are both merged into one function again.
* Floating and fullscreen are now working with transactions.
2018-06-09 10:11:25 +10:00
Ryan Dwyer f9e6d703d2 Make main properties be the pending state 2018-06-09 10:08:43 +10:00
Ryan Dwyer 59c9488701 WIP: Atomic layout updates ground work 2018-06-09 10:08:43 +10:00
Brian Ashworth e2b2fb0a0e Switch restore workspaces to a nested for-loop 2018-06-08 13:08:00 -04:00
Brian Ashworth 5c9a917df9 Restore workspaces to outputs based on priority 2018-06-08 13:08:00 -04:00
Brian Ashworth e072fbc6d9 Switch output storing from list_t to wl_list 2018-06-06 20:11:24 -04:00
Brian Ashworth a1b5b93d29 Store sway_outputs so that they can be reenabled 2018-06-06 20:11:24 -04:00
Brian Ashworth 82b3b587dd Remove tab/stack check for focusing after a split 2018-06-06 19:38:38 -04:00
Brian Ashworth e7261e2917 Fix focusing after splitting tabs/stacks 2018-06-06 16:41:19 -04:00
Brian Ashworth 9aaac8b8c8 Fix movement crashes/issues 2018-06-05 01:13:27 -04:00
Ryan Dwyer 40af5d81a1 Fix getting adjacent output 2018-06-01 23:14:58 +10:00
Ryan Dwyer aaba7642b3 Replace is_floating boolean with function 2018-06-01 23:14:58 +10:00
Ryan Dwyer 1f2e399ade Implement floating 2018-06-01 23:14:58 +10:00
Drew DeVault f3ab895916 Implement `floating enable` 2018-06-01 23:14:58 +10:00
emersion c47d6cb1c4
Merge pull request #2081 from RedSoxFan/fix-2077
Send reparent events in container_split
2018-06-01 10:36:47 +01:00
Brian Ashworth 8237d944d4 Fix move perpendicular segfault 2018-06-01 01:12:10 -04:00
Brian Ashworth cca587b21f Send reparent events in container_split 2018-05-31 23:47:21 -04:00
Brian Ashworth e13c94f2dd Fix typo 2018-05-31 12:07:54 -04:00
Brian Ashworth 633bee9019 Fix moving out of tab/stack when only child 2018-05-31 11:51:00 -04:00
Brian Ashworth 3b90b55666 Notify of subtree change 2018-05-29 11:27:04 -04:00
Brian Ashworth 103a302fa4 Fix moving out of a tabbed/stacked workspace 2018-05-29 11:21:55 -04:00
Brian Ashworth a66fd74a54 Fix breaking out of tabs/stacks 2018-05-29 11:21:55 -04:00
emersion 1071785f56
Merge pull request #2060 from RedSoxFan/focus-wrapping
Implement focus_wrapping
2018-05-28 10:30:11 +01:00
Brian Ashworth 46da1dc32b Implement focus_wrapping 2018-05-27 23:20:21 -04:00
Ryan Dwyer 7c7d24600b Fix ancestor typos 2018-05-28 12:45:42 +10:00
Brian Ashworth 569f4e0e4c Implement swap command 2018-05-26 11:05:02 -04:00
Drew DeVault daf328d054
Merge pull request #2033 from RyanDwyer/arrange-after-flatten
Arrange views after flattening the parent
2018-05-25 08:43:57 -04:00
Drew DeVault a268a0c2ae
Merge pull request #2034 from RyanDwyer/cleanup-container-titles
Clean up container title functions
2018-05-25 08:41:01 -04:00
Ryan Dwyer e496cc99f8 Fix focus bug when moving between outputs
When moving focus left or right to an adjacent output, only select the
first or last child in the new workspace if the workspace's layout is
horizontalish. If it's a verticalish layout, use the last focused
container.
2018-05-25 21:39:48 +10:00
Ryan Dwyer db38b9bbf3 Clean up container title functions
* Add and use lenient_strcat and lenient_strncat functions
* Rename `concatenate_child_titles` function as that's no longer what it
does
* Rename `container_notify_child_title_changed` because we only need to
notify that the tree structure has changed, not titles
* Don't notify parents when a child changes its title
* Update ancestor titles when changing a container's layout
	* Eg. create nested tabs and change the inner container to stacking
* No need to store tree presentation in both container->name and
formatted_title
2018-05-25 21:07:59 +10:00
Ryan Dwyer 320703fdca Arrange views after flattening the parent
Fixes #2029.
2018-05-25 16:42:55 +10:00
Ryan Dwyer c9630975da Fix crash in move workspace to output command
Fixes #2026.
2018-05-24 23:01:17 +10:00
Ryan Dwyer c08f9bf257 Implement tabbed layout 2018-05-21 20:16:56 +10:00