aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/drm/drm.c5
-rw-r--r--types/data_device/wlr_drag.c2
-rw-r--r--xwayland/xwm.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 635a78e2..e0eed4c2 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -720,9 +720,8 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
}
struct gbm_bo *bo = plane->cursor_enabled ? plane->surf.back : NULL;
-
- if (drm->parent) {
- bo = copy_drm_surface_mgpu(&plane->mgpu_surf, plane->surf.back);
+ if (bo && drm->parent) {
+ bo = copy_drm_surface_mgpu(&plane->mgpu_surf, bo);
}
if (bo) {
diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c
index 558e9f22..fdfabdcf 100644
--- a/types/data_device/wlr_drag.c
+++ b/types/data_device/wlr_drag.c
@@ -96,8 +96,8 @@ static void drag_icon_set_mapped(struct wlr_drag_icon *icon, bool mapped) {
icon->mapped = true;
wlr_signal_emit_safe(&icon->events.map, icon);
} else if (!mapped && icon->mapped) {
- icon->mapped = false;
wlr_signal_emit_safe(&icon->events.unmap, icon);
+ icon->mapped = false;
}
}
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 9ca2c721..fc99490b 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -793,8 +793,8 @@ static void xwm_map_shell_surface(struct wlr_xwm *xwm,
static void xsurface_unmap(struct wlr_xwayland_surface *surface) {
if (surface->mapped) {
- surface->mapped = false;
wlr_signal_emit_safe(&surface->events.unmap, surface);
+ surface->mapped = false;
xwm_set_net_client_list(surface->xwm);
}