aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-05-27 09:06:48 -0400
committerGitHub <noreply@github.com>2018-05-27 09:06:48 -0400
commit2e6e7b7c1d4cdf8febee2d0617d48fd85de2107c (patch)
treea0b87998b0fb51e00924c5ce2f1ff8c734d50932
parent067eb83f11cb25138b112a68e2eeee263cf0128e (diff)
parenta372852c4421d21fa4cdd70014b0174319f3c2db (diff)
Merge pull request #2053 from emersion/xdg-shell-tiled
xdg-shell: make all toplevels tiled
-rw-r--r--sway/desktop/xdg_shell.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 9a0d282b..b2b95fa0 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -3,13 +3,14 @@
#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/types/wlr_xdg_shell.h>
+#include <wlr/util/edges.h>
+#include "log.h"
+#include "sway/input/input-manager.h"
+#include "sway/input/seat.h"
+#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/layout.h"
-#include "sway/server.h"
#include "sway/tree/view.h"
-#include "sway/input/seat.h"
-#include "sway/input/input-manager.h"
-#include "log.h"
static const struct sway_view_child_impl popup_impl;
@@ -248,7 +249,8 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data) {
wlr_log(L_DEBUG, "New xdg_shell toplevel title='%s' app_id='%s'",
xdg_surface->toplevel->title, xdg_surface->toplevel->app_id);
wlr_xdg_surface_ping(xdg_surface);
- wlr_xdg_toplevel_set_maximized(xdg_surface, true);
+ wlr_xdg_toplevel_set_tiled(xdg_surface, WLR_EDGE_LEFT | WLR_EDGE_RIGHT |
+ WLR_EDGE_TOP | WLR_EDGE_BOTTOM);
struct sway_xdg_shell_view *xdg_shell_view =
calloc(1, sizeof(struct sway_xdg_shell_view));