diff options
author | 2015-08-17 11:37:19 -0400 | |
---|---|---|
committer | 2015-08-17 11:37:19 -0400 | |
commit | b48e8d1b178f2c713579dc532ff4be6edfccc5bc (patch) | |
tree | f9da3981625cd2235961f8efee7c4f3a94649241 /include/container.h | |
parent | Fix format warnings (diff) | |
parent | Style and other minor fixes (diff) | |
download | sway-b48e8d1b178f2c713579dc532ff4be6edfccc5bc.tar.gz sway-b48e8d1b178f2c713579dc532ff4be6edfccc5bc.tar.zst sway-b48e8d1b178f2c713579dc532ff4be6edfccc5bc.zip |
Merge pull request #54 from Luminarys/master
Added in basic floating support
Diffstat (limited to 'include/container.h')
-rw-r--r-- | include/container.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/container.h b/include/container.h index dd934be6..e395a55b 100644 --- a/include/container.h +++ b/include/container.h | |||
@@ -36,16 +36,24 @@ struct sway_container { | |||
36 | // Not including borders or margins | 36 | // Not including borders or margins |
37 | int width, height; | 37 | int width, height; |
38 | 38 | ||
39 | // Used for setting floating geometry | ||
40 | int desired_width, desired_height; | ||
41 | |||
39 | int x, y; | 42 | int x, y; |
40 | 43 | ||
41 | bool visible; | 44 | bool visible; |
42 | 45 | ||
46 | bool is_floating; | ||
47 | |||
43 | int weight; | 48 | int weight; |
44 | 49 | ||
45 | char *name; | 50 | char *name; |
46 | 51 | ||
47 | list_t *children; | 52 | list_t *children; |
48 | 53 | ||
54 | // Special list for floating windows in workspaces | ||
55 | list_t *floating; | ||
56 | |||
49 | struct sway_container *parent; | 57 | struct sway_container *parent; |
50 | struct sway_container *focused; | 58 | struct sway_container *focused; |
51 | }; | 59 | }; |
@@ -57,6 +65,8 @@ swayc_t *new_workspace(swayc_t * output, const char *name); | |||
57 | swayc_t *new_container(swayc_t *child, enum swayc_layouts layout); | 65 | swayc_t *new_container(swayc_t *child, enum swayc_layouts layout); |
58 | //Creates view as a sibling of current focused container, or as child of a workspace | 66 | //Creates view as a sibling of current focused container, or as child of a workspace |
59 | swayc_t *new_view(swayc_t *sibling, wlc_handle handle); | 67 | swayc_t *new_view(swayc_t *sibling, wlc_handle handle); |
68 | //Creates view as a new floating view which is in the active workspace | ||
69 | swayc_t *new_floating_view(wlc_handle handle); | ||
60 | 70 | ||
61 | 71 | ||
62 | swayc_t *destroy_output(swayc_t *output); | 72 | swayc_t *destroy_output(swayc_t *output); |