aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/cursor.c4
-rw-r--r--rootston/desktop.c2
-rw-r--r--rootston/xwayland.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index 226fe412..89f5874e 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -100,7 +100,9 @@ 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);
- wlr_seat_keyboard_enter(input->wl_seat, view->wlr_surface);
+ if (view) {
+ wlr_seat_keyboard_enter(input->wl_seat, view->wlr_surface);
+ }
break;
}
}
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 0224dd19..697c83df 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -23,6 +23,8 @@ void view_get_input_bounds(struct roots_view *view, struct wlr_box *box) {
return;
}
box->x = box->y = 0;
+ box->width = view->wlr_surface->current.width;
+ box->height = view->wlr_surface->current.height;
}
void view_activate(struct roots_view *view, bool activate) {
diff --git a/rootston/xwayland.c b/rootston/xwayland.c
index e68af907..f9ad2a22 100644
--- a/rootston/xwayland.c
+++ b/rootston/xwayland.c
@@ -17,6 +17,10 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
free(roots_surface);
}
+static void x11_activate(struct roots_view *view, bool active) {
+ wlr_x11_window_activate(view->desktop->xwayland, view->x11_window);
+}
+
void handle_xwayland_surface(struct wl_listener *listener, void *data) {
struct roots_desktop *desktop =
wl_container_of(listener, desktop, xwayland_surface);
@@ -38,6 +42,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
view->roots_x11_surface = roots_surface;
view->wlr_surface = surface->surface;
view->desktop = desktop;
+ view->activate = x11_activate;
roots_surface->view = view;
wl_list_insert(&desktop->views, &view->link);
}