aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-05-27 13:28:37 +0100
committerLibravatar emersion <contact@emersion.fr>2018-05-27 13:28:37 +0100
commitb350e8ec820bcea6096f733d1d0be4de15bbab09 (patch)
tree0735a504a61b4cf5e6a299efd2b83f5af07c0565 /sway/desktop/xdg_shell.c
parentMerge pull request #2048 from RyanDwyer/title-format-app-id (diff)
downloadsway-b350e8ec820bcea6096f733d1d0be4de15bbab09.tar.gz
sway-b350e8ec820bcea6096f733d1d0be4de15bbab09.tar.zst
sway-b350e8ec820bcea6096f733d1d0be4de15bbab09.zip
xdg-shell: make all toplevels tiled
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-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 @@
3#include <stdlib.h> 3#include <stdlib.h>
4#include <wayland-server.h> 4#include <wayland-server.h>
5#include <wlr/types/wlr_xdg_shell.h> 5#include <wlr/types/wlr_xdg_shell.h>
6#include <wlr/util/edges.h>
7#include "log.h"
8#include "sway/input/input-manager.h"
9#include "sway/input/seat.h"
10#include "sway/server.h"
6#include "sway/tree/container.h" 11#include "sway/tree/container.h"
7#include "sway/tree/layout.h" 12#include "sway/tree/layout.h"
8#include "sway/server.h"
9#include "sway/tree/view.h" 13#include "sway/tree/view.h"
10#include "sway/input/seat.h"
11#include "sway/input/input-manager.h"
12#include "log.h"
13 14
14static const struct sway_view_child_impl popup_impl; 15static const struct sway_view_child_impl popup_impl;
15 16
@@ -248,7 +249,8 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data) {
248 wlr_log(L_DEBUG, "New xdg_shell toplevel title='%s' app_id='%s'", 249 wlr_log(L_DEBUG, "New xdg_shell toplevel title='%s' app_id='%s'",
249 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id); 250 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id);
250 wlr_xdg_surface_ping(xdg_surface); 251 wlr_xdg_surface_ping(xdg_surface);
251 wlr_xdg_toplevel_set_maximized(xdg_surface, true); 252 wlr_xdg_toplevel_set_tiled(xdg_surface, WLR_EDGE_LEFT | WLR_EDGE_RIGHT |
253 WLR_EDGE_TOP | WLR_EDGE_BOTTOM);
252 254
253 struct sway_xdg_shell_view *xdg_shell_view = 255 struct sway_xdg_shell_view *xdg_shell_view =
254 calloc(1, sizeof(struct sway_xdg_shell_view)); 256 calloc(1, sizeof(struct sway_xdg_shell_view));