Commit graph

17 commits

Author SHA1 Message Date
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
emersion 29224e7aec
Fix segfault when running the resize command without arguments 2018-05-03 14:04:39 +01:00
Ryan Dwyer 167c2e1aa9 Refactor arrange_windows()
Replaces arrange_windows() with arrange_root(), arrange_output(),
arrange_workspace() and arrange_children_of().

Also makes fullscreen views save and restore their dimensions, which
allows it to preserve any custom resize and is also a requirement for
floating views once they are implemented.
2018-04-28 11:26:14 +10:00
Drew DeVault 640232eb22
Revert "Break everything^W^WUse wlr_box for sway_container" 2018-04-06 16:13:26 -04:00
Drew DeVault 764489e737 Break everything^W^WUse wlr_box for sway_container 2018-04-06 15:38:37 -04:00
Drew DeVault f77986338f Implement resize command 2018-04-05 00:03:20 -04:00
Drew DeVault 733993a651 Move everything to sway/old/ 2017-11-18 11:22:02 -05:00
Calvin Lee 069d37f987 Improve criteria handling
This commit changes how commands decide what container to act on.
Commands get the current container though `current_container`, a global
defined in sway/commands.c. If a criteria is given before a command,
then the following command will be run once for every container the
criteria matches with a reference to the matching container in
'current_container'. Commands should use this instead of
`get_focused_container()` from now on.

This commit also fixes a few (minor) mistakes made in implementing marks
such as non-escaped arrows in sway(5) and calling the "mark" command
"floating" by accident. It also cleans up `criteria.c` in a few places.
2017-04-05 22:07:23 -06:00
Drew DeVault 9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05:00
wil 3c84250be8 [fix] resize should now preserve surrounding container's dimensions
- prior to this modification, the requested pixels were added/removed
  to both edges of the modified container. To preserve sizes,
  only half the pixels should be added/removed to each edge.
2017-01-07 18:20:13 +01:00
wil bd415029ba Moved auto_* layout functions from resize.c to layout.c 2017-01-07 17:41:15 +01:00
wil 97f70987d7 [fix] cleanups suggested by Sway community 2017-01-01 21:52:49 +01:00
wil bc3dc97026 [fix] Handle auto layout resize with multiple slave groups 2016-12-29 20:31:30 +01:00
wil 5425d0489f Handle resize in auto layouts 2016-12-29 20:31:30 +01:00
Zandr Martin 511eed90cd
squash commits, move enum into resize.c 2016-09-07 06:48:41 -05:00
Zandr Martin 65ace5dec5
merge in latest commits 2016-09-02 14:11:48 -05:00
Zandr Martin b374c35758
refactor commands.c 2016-09-01 21:39:08 -05:00