Commit graph

134 commits

Author SHA1 Message Date
Ryan Dwyer 52420cc24d Implement fullscreen. 2018-04-16 20:36:40 +10:00
Drew DeVault 57954a2b24 Implement move [left|right|up|down]
The exact semantics of this command are complicated. I'll describe each
test scenario as s-expressions. Everything assumes L_HORIZ if not
specified, but if you rotate everything 90 degrees the same test cases
hold.

```
(container (view a) (view b focus) (view c))
-> move left
(container (view b focus) (view a) (view c))

(container (view a) (view b focus) (view c))
-> move right
(container (view a) (view c) (view b focus))

(container L_VERT (view a))
(container L_HORIZ
  (view b) (view c focus))
-> move up
(container L_VERT
  (view a) (view c focus))
(container L_HORIZ (view b))

(workspace
  (view a) (view b focus) (view c))
-> move up
(workspace [split direction flipped]
  (view b focus)
  (container (view a) (view c)))

(workspace
  (view a) (view b focus) (view c))
-> move down
(workspace [split direction flipped]
  (container (view a) (view c))
  (view b focus)))

Note: outputs use wlr_output_layout instead of assuming that i+/-1 is
the next output in the move direction.

(root
  (output X11-1
    (workspace 1))
  (output X11-2
    (workspace 1 (view a focus) (view b)))))
-> move left
(root
  (output X11-1
    (workspace 1 (view a focus)))
  (output X11-2
    (workspace 1 (view b)))))

(root
  (output X11-1
    (workspace 1
      (container (view a) (view b)))
  (output X11-2
    (workspace 1 (view c focus)))))
-> move left
(root
  (output X11-1
    (workspace 1
      (container (view a) (view b))
      (view c focus)))
  (output X11-2
    (workspace 1)))
```
2018-04-06 09:43:52 -04:00
emersion c2b1beef15
Remove L_TYPES 2018-04-05 23:22:08 -04:00
emersion 076bedb85e
Add container_damage_whole 2018-04-05 18:31:19 -04:00
Tony Crisci fc9398a42e Implement opacity command 2018-04-04 21:57:05 -04:00
Tony Crisci a001890fb8 move workspace create to workspace.c 2018-04-03 19:52:17 -04:00
Tony Crisci eca4468c2c fix old todos 2018-04-03 17:06:57 -04:00
Tony Crisci 065887bb7b move container_set_layout to layout.h 2018-04-03 13:16:23 -04:00
Tony Crisci fcbcbf34ad make container_finish private 2018-04-03 13:10:51 -04:00
Tony Crisci 09d448ea2d unify container destroy functions 2018-04-03 12:34:01 -04:00
Tony Crisci b4c5f79725 move view and workspace destructors to container.c 2018-04-03 12:25:19 -04:00
Tony Crisci 2992b72d61 change reap container approach 2018-04-02 22:37:21 -04:00
Tony Crisci 2c165e1288 fix more close segfaults 2018-04-02 21:01:33 -04:00
Tony Crisci a89096278b Merge branch 'wlroots' into split-containers 2018-04-02 19:22:10 -04:00
emersion a4a241697a
Merge branch 'wlroots' into view-redesign 2018-04-02 15:30:58 -04:00
emersion 2f64ce86c4
Xwayland unmanaged views aren't views anymore 2018-04-02 14:35:43 -04:00
Tony Crisci 2187684bd0 Merge branch 'wlroots' into split-containers 2018-04-02 14:06:04 -04:00
Drew DeVault b2d871cfe2 Partially implement move command
Works:

- move [container|window] to workspace <name>
    - Note, this should be able to move C_CONTAINER but this is untested
- move [workspace] to output [left|right|up|down|<name>]

Not implemented yet:

- move [left|right|up|down]
- move scratchpad
- move position
2018-04-02 11:12:18 -04:00
Tony Crisci 81556f4b2a add docstrings and todos 2018-03-31 20:52:34 -04:00
emersion b2c2ee693b
Introduce common functions to create, map, unmap, destroy views 2018-03-31 17:49:40 -04:00
Tony Crisci 6f7b33e691 handle container destroy in the seat 2018-03-31 15:38:59 -04:00
Tony Crisci 7706d83160 basic split containers 2018-03-31 15:37:16 -04:00
Drew DeVault 49379dd0fc Fix workspace deletion edge cases 2018-03-30 13:49:34 -04:00
Drew DeVault 01af343912 Destroy empty workspaces when moving away 2018-03-30 10:47:19 -04:00
Tony Crisci 8f490d7d2d Fix oversights from previous pull request 2018-03-29 23:53:38 -04:00
Tony Crisci dc8c9fbeb6 Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
This reverts commit 472e81f35d, reversing
changes made to 6b7841b11f.
2018-03-29 23:41:33 -04:00
Drew DeVault d0c7f66e95
Revert "Refactor tree" 2018-03-29 23:29:29 -04:00
Tony Crisci 92c58b1e63 rename container_for_each_descendent 2018-03-29 23:08:59 -04:00
Tony Crisci 4c394a0e9e address feedback 2018-03-29 21:22:39 -04:00
Tony Crisci 62d1b4cb96 fix container_get_in_direction name 2018-03-29 18:17:31 -04:00
Tony Crisci eca029f218 more renaming things 2018-03-29 17:06:29 -04:00
Tony Crisci b90099b4b7 rename container functions 2018-03-29 16:40:40 -04:00
Tony Crisci 83d09cf594 remove swayc_t typedef 2018-03-29 14:31:10 -04:00
Tony Crisci 874f009866 move tree includes to their own directory 2018-03-29 14:21:42 -04:00
Renamed from include/sway/container.h (Browse further)