mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Merge remote-tracking branch 'upstream/master' into output-damage
This commit is contained in:
commit
1ee61dbd0f
11 changed files with 87 additions and 26 deletions
|
|
@ -628,6 +628,24 @@ struct roots_desktop *desktop_create(struct roots_server *server,
|
|||
desktop->server = server;
|
||||
desktop->config = config;
|
||||
|
||||
desktop->layout = wlr_output_layout_create();
|
||||
desktop->layout_change.notify = handle_layout_change;
|
||||
wl_signal_add(&desktop->layout->events.change, &desktop->layout_change);
|
||||
|
||||
desktop->compositor = wlr_compositor_create(server->wl_display,
|
||||
server->renderer);
|
||||
|
||||
desktop->xdg_shell_v6 = wlr_xdg_shell_v6_create(server->wl_display);
|
||||
wl_signal_add(&desktop->xdg_shell_v6->events.new_surface,
|
||||
&desktop->xdg_shell_v6_surface);
|
||||
desktop->xdg_shell_v6_surface.notify = handle_xdg_shell_v6_surface;
|
||||
|
||||
desktop->wl_shell = wlr_wl_shell_create(server->wl_display);
|
||||
wl_signal_add(&desktop->wl_shell->events.new_surface,
|
||||
&desktop->wl_shell_surface);
|
||||
desktop->wl_shell_surface.notify = handle_wl_shell_surface;
|
||||
|
||||
#ifdef WLR_HAS_XWAYLAND
|
||||
const char *cursor_theme = NULL;
|
||||
const char *cursor_default = ROOTS_XCURSOR_DEFAULT;
|
||||
struct roots_cursor_config *cc =
|
||||
|
|
@ -648,24 +666,6 @@ struct roots_desktop *desktop_create(struct roots_server *server,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
desktop->layout = wlr_output_layout_create();
|
||||
desktop->layout_change.notify = handle_layout_change;
|
||||
wl_signal_add(&desktop->layout->events.change, &desktop->layout_change);
|
||||
|
||||
desktop->compositor = wlr_compositor_create(server->wl_display,
|
||||
server->renderer);
|
||||
|
||||
desktop->xdg_shell_v6 = wlr_xdg_shell_v6_create(server->wl_display);
|
||||
wl_signal_add(&desktop->xdg_shell_v6->events.new_surface,
|
||||
&desktop->xdg_shell_v6_surface);
|
||||
desktop->xdg_shell_v6_surface.notify = handle_xdg_shell_v6_surface;
|
||||
|
||||
desktop->wl_shell = wlr_wl_shell_create(server->wl_display);
|
||||
wl_signal_add(&desktop->wl_shell->events.new_surface,
|
||||
&desktop->wl_shell_surface);
|
||||
desktop->wl_shell_surface.notify = handle_wl_shell_surface;
|
||||
|
||||
#ifdef WLR_HAS_XWAYLAND
|
||||
if (config->xwayland) {
|
||||
desktop->xwayland = wlr_xwayland_create(server->wl_display,
|
||||
desktop->compositor);
|
||||
|
|
|
|||
|
|
@ -120,15 +120,18 @@ static void view_for_each_surface(struct roots_view *view,
|
|||
wl_shell_surface_for_each_surface(view->wl_shell_surface, view->x,
|
||||
view->y, view->rotation, false, iterator, user_data);
|
||||
break;
|
||||
#ifdef WLR_HAS_XWAYLAND
|
||||
case ROOTS_XWAYLAND_VIEW:
|
||||
if (view->wlr_surface != NULL) {
|
||||
surface_for_each_surface(view->wlr_surface, view->x, view->y,
|
||||
view->rotation, iterator, user_data);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WLR_HAS_XWAYLAND
|
||||
static void xwayland_children_for_each_surface(
|
||||
struct wlr_xwayland_surface *surface,
|
||||
surface_iterator_func_t iterator, void *user_data) {
|
||||
|
|
@ -141,6 +144,7 @@ static void xwayland_children_for_each_surface(
|
|||
xwayland_children_for_each_surface(child, iterator, user_data);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
struct render_data {
|
||||
|
|
@ -333,8 +337,10 @@ static bool has_standalone_surface(struct roots_view *view) {
|
|||
return wl_list_empty(&view->xdg_surface_v6->popups);
|
||||
case ROOTS_WL_SHELL_VIEW:
|
||||
return wl_list_empty(&view->wl_shell_surface->popups);
|
||||
#ifdef WLR_HAS_XWAYLAND
|
||||
case ROOTS_XWAYLAND_VIEW:
|
||||
return wl_list_empty(&view->xwayland_surface->children);
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -444,10 +450,12 @@ static void render_output(struct roots_output *output) {
|
|||
// During normal rendering the xwayland window tree isn't traversed
|
||||
// because all windows are rendered. Here we only want to render
|
||||
// the fullscreen window's children so we have to traverse the tree.
|
||||
#ifdef WLR_HAS_XWAYLAND
|
||||
if (view->type == ROOTS_XWAYLAND_VIEW) {
|
||||
xwayland_children_for_each_surface(view->xwayland_surface,
|
||||
render_surface, &data);
|
||||
}
|
||||
#endif
|
||||
|
||||
goto renderer_end;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -732,10 +732,12 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) {
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef WLR_HAS_XWAYLAND
|
||||
if (view && view->type == ROOTS_XWAYLAND_VIEW &&
|
||||
view->xwayland_surface->override_redirect) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
struct roots_seat_view *seat_view = NULL;
|
||||
if (view != NULL) {
|
||||
seat_view = roots_seat_view_from_view(seat, view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue