Skip to content

pointermgr: damage only the surface size#13284

Open
gulafaran wants to merge 1 commit intohyprwm:mainfrom
gulafaran:hwcursor
Open

pointermgr: damage only the surface size#13284
gulafaran wants to merge 1 commit intohyprwm:mainfrom
gulafaran:hwcursor

Conversation

@gulafaran
Copy link
Contributor

CWaylandOutput returns a vector2d with -1, -1 set as a "no limit", passing that down into beginSimple and the renderer it hits pixman bug of invalid sizes and wrong rectangles gets created.

causing bunch of
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed

just set the damage to the size we render the texture down below instead and we not only solve pixman issue but we dont overdamage either.

CWaylandOutput returns a vector2d with -1, -1 set as a "no limit",
passing that down into beginSimple and the renderer it hits pixman bug
of invalid sizes and wrong rectangles gets created.

causing bunch of
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed

just set the damage to the size we render the texture down below instead
and we not only solve pixman issue but we dont overdamage either.
const auto& damageSize = state->monitor->m_output->cursorPlaneSize();
g_pHyprOpenGL->beginSimple(state->monitor.lock(), {0, 0, damageSize.x, damageSize.y}, RBO);
auto damage = Vector2D{m_currentCursorImage.size / m_currentCursorImage.scale * state->monitor->m_scale}.round();
g_pHyprOpenGL->beginSimple(state->monitor.lock(), {0, 0, damage.x, damage.y}, RBO);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well no we still render the entire plane

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs something done when CWaylandOutput then, just assume its a 256x256 then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants