mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 14:45:58 +01:00
Merge pull request #340 from emersion/switch-vt-no-hw-cursor
Do not set hw cursor if disabled when switching VT
This commit is contained in:
commit
92b41bb51f
3 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,7 @@ static void session_signal(struct wl_listener *listener, void *data) {
|
|||
|
||||
struct wlr_drm_plane *plane = conn->crtc->cursor;
|
||||
drm->iface->crtc_set_cursor(drm, conn->crtc,
|
||||
plane ? plane->cursor_bo : NULL);
|
||||
(plane && plane->cursor_enabled) ? plane->cursor_bo : NULL);
|
||||
}
|
||||
} else {
|
||||
wlr_log(L_INFO, "DRM fd paused");
|
||||
|
|
|
@ -505,8 +505,10 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output,
|
|||
|
||||
if (!buf && update_pixels) {
|
||||
// Hide the cursor
|
||||
plane->cursor_enabled = false;
|
||||
return drm->iface->crtc_set_cursor(drm, crtc, NULL);
|
||||
}
|
||||
plane->cursor_enabled = true;
|
||||
|
||||
// We don't have a real cursor plane, so we make a fake one
|
||||
if (!plane) {
|
||||
|
|
|
@ -33,6 +33,7 @@ struct wlr_drm_plane {
|
|||
float matrix[16];
|
||||
struct wlr_texture *wlr_tex;
|
||||
struct gbm_bo *cursor_bo;
|
||||
bool cursor_enabled;
|
||||
|
||||
union wlr_drm_plane_props props;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue