aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-26 09:22:10 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commit02de2a6f65c189bf563cca5b4d3fbc11826ea7f7 (patch)
tree569a148fde1ff86e9fdb68e374f5661a96ff7c37 /sway
parentPrevent splitting a floating view (diff)
downloadsway-02de2a6f65c189bf563cca5b4d3fbc11826ea7f7.tar.gz
sway-02de2a6f65c189bf563cca5b4d3fbc11826ea7f7.tar.zst
sway-02de2a6f65c189bf563cca5b4d3fbc11826ea7f7.zip
Rename set_maximized functions to set_tiled
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/xdg_shell.c6
-rw-r--r--sway/desktop/xdg_shell_v6.c6
-rw-r--r--sway/desktop/xwayland.c6
-rw-r--r--sway/tree/container.c2
-rw-r--r--sway/tree/view.c8
5 files changed, 14 insertions, 14 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index ebb12211..73d9477f 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -111,12 +111,12 @@ static void set_activated(struct sway_view *view, bool activated) {
111 } 111 }
112} 112}
113 113
114static void set_maximized(struct sway_view *view, bool maximized) { 114static void set_tiled(struct sway_view *view, bool tiled) {
115 if (xdg_shell_view_from_view(view) == NULL) { 115 if (xdg_shell_view_from_view(view) == NULL) {
116 return; 116 return;
117 } 117 }
118 struct wlr_xdg_surface *surface = view->wlr_xdg_surface; 118 struct wlr_xdg_surface *surface = view->wlr_xdg_surface;
119 wlr_xdg_toplevel_set_maximized(surface, maximized); 119 wlr_xdg_toplevel_set_maximized(surface, tiled);
120} 120}
121 121
122static void set_fullscreen(struct sway_view *view, bool fullscreen) { 122static void set_fullscreen(struct sway_view *view, bool fullscreen) {
@@ -168,7 +168,7 @@ static const struct sway_view_impl view_impl = {
168 .get_string_prop = get_string_prop, 168 .get_string_prop = get_string_prop,
169 .configure = configure, 169 .configure = configure,
170 .set_activated = set_activated, 170 .set_activated = set_activated,
171 .set_maximized = set_maximized, 171 .set_tiled = set_tiled,
172 .set_fullscreen = set_fullscreen, 172 .set_fullscreen = set_fullscreen,
173 .wants_floating = wants_floating, 173 .wants_floating = wants_floating,
174 .for_each_surface = for_each_surface, 174 .for_each_surface = for_each_surface,
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index f3df2fe8..6c98744c 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -110,12 +110,12 @@ static void set_activated(struct sway_view *view, bool activated) {
110 } 110 }
111} 111}
112 112
113static void set_maximized(struct sway_view *view, bool maximized) { 113static void set_tiled(struct sway_view *view, bool tiled) {
114 if (xdg_shell_v6_view_from_view(view) == NULL) { 114 if (xdg_shell_v6_view_from_view(view) == NULL) {
115 return; 115 return;
116 } 116 }
117 struct wlr_xdg_surface_v6 *surface = view->wlr_xdg_surface_v6; 117 struct wlr_xdg_surface_v6 *surface = view->wlr_xdg_surface_v6;
118 wlr_xdg_toplevel_v6_set_maximized(surface, maximized); 118 wlr_xdg_toplevel_v6_set_maximized(surface, tiled);
119} 119}
120 120
121static void set_fullscreen(struct sway_view *view, bool fullscreen) { 121static void set_fullscreen(struct sway_view *view, bool fullscreen) {
@@ -167,7 +167,7 @@ static const struct sway_view_impl view_impl = {
167 .get_string_prop = get_string_prop, 167 .get_string_prop = get_string_prop,
168 .configure = configure, 168 .configure = configure,
169 .set_activated = set_activated, 169 .set_activated = set_activated,
170 .set_maximized = set_maximized, 170 .set_tiled = set_tiled,
171 .set_fullscreen = set_fullscreen, 171 .set_fullscreen = set_fullscreen,
172 .wants_floating = wants_floating, 172 .wants_floating = wants_floating,
173 .for_each_surface = for_each_surface, 173 .for_each_surface = for_each_surface,
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 1373d968..783868bc 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -199,12 +199,12 @@ static void set_activated(struct sway_view *view, bool activated) {
199 wlr_xwayland_surface_activate(surface, activated); 199 wlr_xwayland_surface_activate(surface, activated);
200} 200}
201 201
202static void set_maximized(struct sway_view *view, bool maximized) { 202static void set_tiled(struct sway_view *view, bool tiled) {
203 if (xwayland_view_from_view(view) == NULL) { 203 if (xwayland_view_from_view(view) == NULL) {
204 return; 204 return;
205 } 205 }
206 struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface; 206 struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface;
207 wlr_xwayland_surface_set_maximized(surface, maximized); 207 wlr_xwayland_surface_set_maximized(surface, tiled);
208} 208}
209 209
210static void set_fullscreen(struct sway_view *view, bool fullscreen) { 210static void set_fullscreen(struct sway_view *view, bool fullscreen) {
@@ -272,7 +272,7 @@ static const struct sway_view_impl view_impl = {
272 .get_int_prop = get_int_prop, 272 .get_int_prop = get_int_prop,
273 .configure = configure, 273 .configure = configure,
274 .set_activated = set_activated, 274 .set_activated = set_activated,
275 .set_maximized = set_maximized, 275 .set_tiled = set_tiled,
276 .set_fullscreen = set_fullscreen, 276 .set_fullscreen = set_fullscreen,
277 .wants_floating = wants_floating, 277 .wants_floating = wants_floating,
278 .close = _close, 278 .close = _close,
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 532722e8..12f74e37 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -921,7 +921,7 @@ void container_set_floating(struct sway_container *container, bool enable) {
921 container->width = container->parent->width; 921 container->width = container->parent->width;
922 container->height = container->parent->height; 922 container->height = container->parent->height;
923 if (container->type == C_VIEW) { 923 if (container->type == C_VIEW) {
924 view_set_maximized(container->sway_view, true); 924 view_set_tiled(container->sway_view, true);
925 } 925 }
926 container->is_sticky = false; 926 container->is_sticky = false;
927 container_reap_empty_recursive(workspace->sway_workspace->floating); 927 container_reap_empty_recursive(workspace->sway_workspace->floating);
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 65961dd9..3de9879e 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -139,7 +139,7 @@ static void view_autoconfigure_floating(struct sway_view *view) {
139 int ly = output->y + (ws->height - height) / 2; 139 int ly = output->y + (ws->height - height) / 2;
140 140
141 view->border_left = view->border_right = view->border_bottom = true; 141 view->border_left = view->border_right = view->border_bottom = true;
142 view_set_maximized(view, false); 142 view_set_tiled(view, false);
143 view_configure(view, lx, ly, width, height); 143 view_configure(view, lx, ly, width, height);
144} 144}
145 145
@@ -257,9 +257,9 @@ void view_set_activated(struct sway_view *view, bool activated) {
257 } 257 }
258} 258}
259 259
260void view_set_maximized(struct sway_view *view, bool maximized) { 260void view_set_tiled(struct sway_view *view, bool tiled) {
261 if (view->impl->set_maximized) { 261 if (view->impl->set_tiled) {
262 view->impl->set_maximized(view, maximized); 262 view->impl->set_tiled(view, tiled);
263 } 263 }
264} 264}
265 265