chase: wlr_xwayland_set_cursor arg change in wlroots0.20

This commit is contained in:
DreamMaoMao 2026-01-14 09:28:58 +08:00
parent 0e5e86b3f8
commit 3be7c15fdf
3 changed files with 14 additions and 10 deletions

View file

@ -38,7 +38,7 @@ xkbcommon_dep = dependency('xkbcommon')
libinput_dep = dependency('libinput',version: '>=1.27.1')
libwayland_client_dep = dependency('wayland-client')
pcre2_dep = dependency('libpcre2-8')
libscenefx_dep = dependency('scenefx-0.4',version: '>=0.4.1')
libscenefx_dep = dependency('scenefx-0.5',version: '>=0.5.0')
# 获取版本信息

View file

@ -11,7 +11,8 @@ void set_rect_size(struct wlr_scene_rect *rect, int32_t width, int32_t height) {
struct fx_corner_radii set_client_corner_location(Client *c) {
struct fx_corner_radii current_corner_location =
corner_radii_all(config.border_radius);
struct wlr_box target_geom = config.animations ? c->animation.current : c->geom;
struct wlr_box target_geom =
config.animations ? c->animation.current : c->geom;
if (target_geom.x + config.border_radius <= c->mon->m.x) {
current_corner_location.top_left = 0; // 清除左标志位
current_corner_location.bottom_left = 0; // 清除左标志位

View file

@ -2417,8 +2417,9 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) {
if (layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM &&
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND) {
if (layer_surface->current.exclusive_zone == 0) {
l->shadow = wlr_scene_shadow_create(l->scene, 0, 0, config.border_radius,
config.shadows_blur, config.shadowscolor);
l->shadow = wlr_scene_shadow_create(
l->scene, 0, 0, config.border_radius, config.shadows_blur,
config.shadowscolor);
wlr_scene_node_lower_to_bottom(&l->shadow->node);
wlr_scene_node_set_enabled(&l->shadow->node, true);
}
@ -4132,7 +4133,8 @@ mapnotify(struct wl_listener *listener, void *data) {
c->scene, 0, 0, c->isurgent ? config.urgentcolor : config.bordercolor);
wlr_scene_node_lower_to_bottom(&c->border->node);
wlr_scene_node_set_position(&c->border->node, 0, 0);
wlr_scene_rect_set_corner_radii(c->border, corner_radii_all(config.border_radius));
wlr_scene_rect_set_corner_radii(c->border,
corner_radii_all(config.border_radius));
wlr_scene_node_set_enabled(&c->border->node, true);
c->shadow =
@ -6590,11 +6592,12 @@ void xwaylandready(struct wl_listener *listener, void *data) {
wlr_xwayland_set_seat(xwayland, seat);
/* Set the default XWayland cursor to match the rest of dwl. */
if ((xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "default", 1)))
wlr_xwayland_set_cursor(
xwayland, xcursor->images[0]->buffer, xcursor->images[0]->width * 4,
xcursor->images[0]->width, xcursor->images[0]->height,
xcursor->images[0]->hotspot_x, xcursor->images[0]->hotspot_y);
if ((xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "default", 1))) {
struct wlr_xcursor_image *image = xcursor->images[0];
struct wlr_buffer *buffer = wlr_xcursor_image_get_buffer(image);
wlr_xwayland_set_cursor(xwayland, buffer, xcursor->images[0]->hotspot_x,
xcursor->images[0]->hotspot_y);
}
/* xwayland can't auto sync the keymap, so we do it manually
and we need to wait the xwayland completely inited
*/