mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-05 03:01:38 -04:00
chase: wlr_xwayland_set_cursor arg change in wlroots0.20
This commit is contained in:
parent
0e5e86b3f8
commit
3be7c15fdf
3 changed files with 14 additions and 10 deletions
|
|
@ -38,7 +38,7 @@ xkbcommon_dep = dependency('xkbcommon')
|
||||||
libinput_dep = dependency('libinput',version: '>=1.27.1')
|
libinput_dep = dependency('libinput',version: '>=1.27.1')
|
||||||
libwayland_client_dep = dependency('wayland-client')
|
libwayland_client_dep = dependency('wayland-client')
|
||||||
pcre2_dep = dependency('libpcre2-8')
|
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')
|
||||||
|
|
||||||
|
|
||||||
# 获取版本信息
|
# 获取版本信息
|
||||||
|
|
|
||||||
|
|
@ -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 set_client_corner_location(Client *c) {
|
||||||
struct fx_corner_radii current_corner_location =
|
struct fx_corner_radii current_corner_location =
|
||||||
corner_radii_all(config.border_radius);
|
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) {
|
if (target_geom.x + config.border_radius <= c->mon->m.x) {
|
||||||
current_corner_location.top_left = 0; // 清除左标志位
|
current_corner_location.top_left = 0; // 清除左标志位
|
||||||
current_corner_location.bottom_left = 0; // 清除左标志位
|
current_corner_location.bottom_left = 0; // 清除左标志位
|
||||||
|
|
|
||||||
19
src/mango.c
19
src/mango.c
|
|
@ -2417,8 +2417,9 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) {
|
||||||
if (layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM &&
|
if (layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM &&
|
||||||
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND) {
|
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND) {
|
||||||
if (layer_surface->current.exclusive_zone == 0) {
|
if (layer_surface->current.exclusive_zone == 0) {
|
||||||
l->shadow = wlr_scene_shadow_create(l->scene, 0, 0, config.border_radius,
|
l->shadow = wlr_scene_shadow_create(
|
||||||
config.shadows_blur, config.shadowscolor);
|
l->scene, 0, 0, config.border_radius, config.shadows_blur,
|
||||||
|
config.shadowscolor);
|
||||||
wlr_scene_node_lower_to_bottom(&l->shadow->node);
|
wlr_scene_node_lower_to_bottom(&l->shadow->node);
|
||||||
wlr_scene_node_set_enabled(&l->shadow->node, true);
|
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);
|
c->scene, 0, 0, c->isurgent ? config.urgentcolor : config.bordercolor);
|
||||||
wlr_scene_node_lower_to_bottom(&c->border->node);
|
wlr_scene_node_lower_to_bottom(&c->border->node);
|
||||||
wlr_scene_node_set_position(&c->border->node, 0, 0);
|
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);
|
wlr_scene_node_set_enabled(&c->border->node, true);
|
||||||
|
|
||||||
c->shadow =
|
c->shadow =
|
||||||
|
|
@ -6590,11 +6592,12 @@ void xwaylandready(struct wl_listener *listener, void *data) {
|
||||||
wlr_xwayland_set_seat(xwayland, seat);
|
wlr_xwayland_set_seat(xwayland, seat);
|
||||||
|
|
||||||
/* Set the default XWayland cursor to match the rest of dwl. */
|
/* Set the default XWayland cursor to match the rest of dwl. */
|
||||||
if ((xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "default", 1)))
|
if ((xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "default", 1))) {
|
||||||
wlr_xwayland_set_cursor(
|
struct wlr_xcursor_image *image = xcursor->images[0];
|
||||||
xwayland, xcursor->images[0]->buffer, xcursor->images[0]->width * 4,
|
struct wlr_buffer *buffer = wlr_xcursor_image_get_buffer(image);
|
||||||
xcursor->images[0]->width, xcursor->images[0]->height,
|
wlr_xwayland_set_cursor(xwayland, buffer, xcursor->images[0]->hotspot_x,
|
||||||
xcursor->images[0]->hotspot_x, xcursor->images[0]->hotspot_y);
|
xcursor->images[0]->hotspot_y);
|
||||||
|
}
|
||||||
/* xwayland can't auto sync the keymap, so we do it manually
|
/* xwayland can't auto sync the keymap, so we do it manually
|
||||||
and we need to wait the xwayland completely inited
|
and we need to wait the xwayland completely inited
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue