aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.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/seat.c
parent4f66565606c8958684c00f28d0b4996904c041bc (diff)
parent9adcbabea47fbd0502673d410eb718ee3401f3b1 (diff)
Merge pull request #1568 from emersion/rootston-refactor
Refactor rootston views
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index cd95472d..385cf401 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -1293,9 +1293,12 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) {
bool unfullscreen = true;
#if WLR_HAS_XWAYLAND
- if (view && view->type == ROOTS_XWAYLAND_VIEW &&
- view->xwayland_surface->override_redirect) {
- unfullscreen = false;
+ if (view && view->type == ROOTS_XWAYLAND_VIEW) {
+ struct roots_xwayland_surface *xwayland_surface =
+ roots_xwayland_surface_from_view(view);
+ if (xwayland_surface->xwayland_surface->override_redirect) {
+ unfullscreen = false;
+ }
}
#endif
@@ -1322,10 +1325,13 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) {
}
#if WLR_HAS_XWAYLAND
- if (view && view->type == ROOTS_XWAYLAND_VIEW &&
- !wlr_xwayland_or_surface_wants_focus(
- view->xwayland_surface)) {
- return;
+ if (view && view->type == ROOTS_XWAYLAND_VIEW) {
+ struct roots_xwayland_surface *xwayland_surface =
+ roots_xwayland_surface_from_view(view);
+ if (!wlr_xwayland_or_surface_wants_focus(
+ xwayland_surface->xwayland_surface)) {
+ return;
+ }
}
#endif
struct roots_seat_view *seat_view = NULL;