summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-27 23:43:05 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commit97672295ed50d1d6272876c4a3b6b5607cab05c6 (patch)
tree00b7e77be7e7b1323f494a6e6e075490e37605b1
parentFix getting adjacent output (diff)
downloadsway-97672295ed50d1d6272876c4a3b6b5607cab05c6.tar.gz
sway-97672295ed50d1d6272876c4a3b6b5607cab05c6.tar.zst
sway-97672295ed50d1d6272876c4a3b6b5607cab05c6.zip
Don't unmaximize floating views
-rw-r--r--include/sway/tree/view.h3
-rw-r--r--sway/desktop/xdg_shell.c9
-rw-r--r--sway/desktop/xdg_shell_v6.c9
-rw-r--r--sway/desktop/xwayland.c9
-rw-r--r--sway/tree/container.c3
-rw-r--r--sway/tree/view.c7
6 files changed, 0 insertions, 40 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 5c2f759c..7362df5c 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -32,7 +32,6 @@ struct sway_view_impl {
32 void (*configure)(struct sway_view *view, double lx, double ly, int width, 32 void (*configure)(struct sway_view *view, double lx, double ly, int width,
33 int height); 33 int height);
34 void (*set_activated)(struct sway_view *view, bool activated); 34 void (*set_activated)(struct sway_view *view, bool activated);
35 void (*set_tiled)(struct sway_view *view, bool tiled);
36 void (*set_fullscreen)(struct sway_view *view, bool fullscreen); 35 void (*set_fullscreen)(struct sway_view *view, bool fullscreen);
37 bool (*wants_floating)(struct sway_view *view); 36 bool (*wants_floating)(struct sway_view *view);
38 void (*for_each_surface)(struct sway_view *view, 37 void (*for_each_surface)(struct sway_view *view,
@@ -221,8 +220,6 @@ void view_autoconfigure(struct sway_view *view);
221 220
222void view_set_activated(struct sway_view *view, bool activated); 221void view_set_activated(struct sway_view *view, bool activated);
223 222
224void view_set_tiled(struct sway_view *view, bool tiled);
225
226void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen); 223void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen);
227 224
228void view_set_fullscreen(struct sway_view *view, bool fullscreen); 225void view_set_fullscreen(struct sway_view *view, bool fullscreen);
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 30990f67..7a39a84c 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -111,14 +111,6 @@ static void set_activated(struct sway_view *view, bool activated) {
111 } 111 }
112} 112}
113 113
114static void set_tiled(struct sway_view *view, bool tiled) {
115 if (xdg_shell_view_from_view(view) == NULL) {
116 return;
117 }
118 struct wlr_xdg_surface *surface = view->wlr_xdg_surface;
119 wlr_xdg_toplevel_set_maximized(surface, tiled);
120}
121
122static void set_fullscreen(struct sway_view *view, bool fullscreen) { 114static void set_fullscreen(struct sway_view *view, bool fullscreen) {
123 if (xdg_shell_view_from_view(view) == NULL) { 115 if (xdg_shell_view_from_view(view) == NULL) {
124 return; 116 return;
@@ -170,7 +162,6 @@ static const struct sway_view_impl view_impl = {
170 .get_string_prop = get_string_prop, 162 .get_string_prop = get_string_prop,
171 .configure = configure, 163 .configure = configure,
172 .set_activated = set_activated, 164 .set_activated = set_activated,
173 .set_tiled = set_tiled,
174 .set_fullscreen = set_fullscreen, 165 .set_fullscreen = set_fullscreen,
175 .wants_floating = wants_floating, 166 .wants_floating = wants_floating,
176 .for_each_surface = for_each_surface, 167 .for_each_surface = for_each_surface,
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 7cba6e49..b1b8091b 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -110,14 +110,6 @@ static void set_activated(struct sway_view *view, bool activated) {
110 } 110 }
111} 111}
112 112
113static void set_tiled(struct sway_view *view, bool tiled) {
114 if (xdg_shell_v6_view_from_view(view) == NULL) {
115 return;
116 }
117 struct wlr_xdg_surface_v6 *surface = view->wlr_xdg_surface_v6;
118 wlr_xdg_toplevel_v6_set_maximized(surface, tiled);
119}
120
121static void set_fullscreen(struct sway_view *view, bool fullscreen) { 113static void set_fullscreen(struct sway_view *view, bool fullscreen) {
122 if (xdg_shell_v6_view_from_view(view) == NULL) { 114 if (xdg_shell_v6_view_from_view(view) == NULL) {
123 return; 115 return;
@@ -169,7 +161,6 @@ static const struct sway_view_impl view_impl = {
169 .get_string_prop = get_string_prop, 161 .get_string_prop = get_string_prop,
170 .configure = configure, 162 .configure = configure,
171 .set_activated = set_activated, 163 .set_activated = set_activated,
172 .set_tiled = set_tiled,
173 .set_fullscreen = set_fullscreen, 164 .set_fullscreen = set_fullscreen,
174 .wants_floating = wants_floating, 165 .wants_floating = wants_floating,
175 .for_each_surface = for_each_surface, 166 .for_each_surface = for_each_surface,
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 7dc860aa..d0fbcaeb 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -175,14 +175,6 @@ static void set_activated(struct sway_view *view, bool activated) {
175 wlr_xwayland_surface_activate(surface, activated); 175 wlr_xwayland_surface_activate(surface, activated);
176} 176}
177 177
178static void set_tiled(struct sway_view *view, bool tiled) {
179 if (xwayland_view_from_view(view) == NULL) {
180 return;
181 }
182 struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface;
183 wlr_xwayland_surface_set_maximized(surface, tiled);
184}
185
186static void set_fullscreen(struct sway_view *view, bool fullscreen) { 178static void set_fullscreen(struct sway_view *view, bool fullscreen) {
187 if (xwayland_view_from_view(view) == NULL) { 179 if (xwayland_view_from_view(view) == NULL) {
188 return; 180 return;
@@ -232,7 +224,6 @@ static const struct sway_view_impl view_impl = {
232 .get_int_prop = get_int_prop, 224 .get_int_prop = get_int_prop,
233 .configure = configure, 225 .configure = configure,
234 .set_activated = set_activated, 226 .set_activated = set_activated,
235 .set_tiled = set_tiled,
236 .set_fullscreen = set_fullscreen, 227 .set_fullscreen = set_fullscreen,
237 .wants_floating = wants_floating, 228 .wants_floating = wants_floating,
238 .close = _close, 229 .close = _close,
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 4e041508..9e70da09 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -920,9 +920,6 @@ void container_set_floating(struct sway_container *container, bool enable) {
920 container_add_child(workspace, container); 920 container_add_child(workspace, container);
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) {
924 view_set_tiled(container->sway_view, true);
925 }
926 container->is_sticky = false; 923 container->is_sticky = false;
927 container_reap_empty_recursive(workspace->sway_workspace->floating); 924 container_reap_empty_recursive(workspace->sway_workspace->floating);
928 } 925 }
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 30d5c7b4..6e589611 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -138,7 +138,6 @@ static void view_autoconfigure_floating(struct sway_view *view) {
138 int ly = ws->y + (ws->height - height) / 2; 138 int ly = ws->y + (ws->height - height) / 2;
139 139
140 view->border_left = view->border_right = view->border_bottom = true; 140 view->border_left = view->border_right = view->border_bottom = true;
141 view_set_tiled(view, false);
142 view_configure(view, lx, ly, width, height); 141 view_configure(view, lx, ly, width, height);
143} 142}
144 143
@@ -255,12 +254,6 @@ void view_set_activated(struct sway_view *view, bool activated) {
255 } 254 }
256} 255}
257 256
258void view_set_tiled(struct sway_view *view, bool tiled) {
259 if (view->impl->set_tiled) {
260 view->impl->set_tiled(view, tiled);
261 }
262}
263
264// Set fullscreen, but without IPC events or arranging windows. 257// Set fullscreen, but without IPC events or arranging windows.
265void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen) { 258void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen) {
266 if (view->is_fullscreen == fullscreen) { 259 if (view->is_fullscreen == fullscreen) {