aboutsummaryrefslogtreecommitdiff
path: root/rootston/cursor.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-29 11:02:27 -0400
committerGitHub <noreply@github.com>2017-10-29 11:02:27 -0400
commit9a3c94b608663a4465ff528709d732699ac7af80 (patch)
tree8b76fcdbf82ee92ef19504d4a9c0e3abc43f8e1c /rootston/cursor.c
parent50e86a0efa43fa72bd7d8c2dfc2d124052f74823 (diff)
parentc01248cf17b0556145d973449d0b12cad0b96a8c (diff)
Merge pull request #331 from acrisci/feature/xwm-rewrite
xwayland window manager fixes
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r--rootston/cursor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index 27f97724..917e876c 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -204,6 +204,11 @@ void set_view_focus(struct roots_input *input, struct roots_desktop *desktop,
return;
}
+ if (view->type == ROOTS_XWAYLAND_VIEW &&
+ view->xwayland_surface->override_redirect) {
+ return;
+ }
+
size_t index = 0;
for (size_t i = 0; i < desktop->views->length; ++i) {
struct roots_view *_view = desktop->views->items[i];
@@ -217,6 +222,7 @@ void set_view_focus(struct roots_input *input, struct roots_desktop *desktop,
// TODO: list_swap
wlr_list_del(desktop->views, index);
wlr_list_add(desktop->views, view);
+ wlr_seat_keyboard_notify_enter(input->wl_seat, view->wlr_surface);
}
static void handle_cursor_motion(struct wl_listener *listener, void *data) {
@@ -325,9 +331,6 @@ static void do_cursor_button_press(struct roots_input *input,
input->input_events_idx = (i + 1)
% (sizeof(input->input_events) / sizeof(input->input_events[0]));
set_view_focus(input, desktop, view);
- if (view) {
- wlr_seat_keyboard_notify_enter(input->wl_seat, surface);
- }
break;
}
}