aboutsummaryrefslogtreecommitdiff
path: root/rootston/bindings.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-02-23 10:49:28 -0500
committerGitHub <noreply@github.com>2019-02-23 10:49:28 -0500
commit00b1b40b36f37fe6ff3ac8726026dde8e73f1979 (patch)
treee3600090e73820f021501591fe7df6dc7a346990 /rootston/bindings.c
parent4f66565606c8958684c00f28d0b4996904c041bc (diff)
parent9adcbabea47fbd0502673d410eb718ee3401f3b1 (diff)
Merge pull request #1568 from emersion/rootston-refactor
Refactor rootston views
Diffstat (limited to 'rootston/bindings.c')
-rw-r--r--rootston/bindings.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rootston/bindings.c b/rootston/bindings.c
index 057c17e9..9dc2223e 100644
--- a/rootston/bindings.c
+++ b/rootston/bindings.c
@@ -4,6 +4,7 @@
#include <sys/wait.h>
#include <wlr/util/log.h>
#include "rootston/bindings.h"
+#include "rootston/view.h"
static bool outputs_enabled = true;
@@ -83,8 +84,10 @@ void execute_binding_command(struct roots_seat *seat,
} else if (strcmp(command, "toggle_decoration_mode") == 0) {
struct roots_view *focus = roots_seat_get_focus(seat);
if (focus != NULL && focus->type == ROOTS_XDG_SHELL_VIEW) {
+ struct roots_xdg_surface *xdg_surface =
+ roots_xdg_surface_from_view(focus);
struct roots_xdg_toplevel_decoration *decoration =
- focus->roots_xdg_surface->xdg_toplevel_decoration;
+ xdg_surface->xdg_toplevel_decoration;
if (decoration != NULL) {
enum wlr_xdg_toplevel_decoration_v1_mode mode =
decoration->wlr_decoration->current_mode;