mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-12 13:29:45 -05:00
Remove outdated TODOs, use wlr_surface_has_buffer
This commit is contained in:
parent
6a74a3586f
commit
ae9a46fc9b
4 changed files with 5 additions and 9 deletions
|
|
@ -241,13 +241,15 @@ static void output_cursor_render(struct wlr_output_cursor *cursor) {
|
|||
struct wlr_texture *texture = cursor->texture;
|
||||
struct wlr_renderer *renderer = cursor->renderer;
|
||||
if (cursor->surface != NULL) {
|
||||
// Some clients commit a cursor surface with a NULL buffer to hide it.
|
||||
if (!wlr_surface_has_buffer(cursor->surface)) {
|
||||
return;
|
||||
}
|
||||
texture = cursor->surface->texture;
|
||||
renderer = cursor->surface->renderer;
|
||||
}
|
||||
|
||||
// We check texture->valid because some clients set a cursor surface
|
||||
// with a NULL buffer to hide it
|
||||
if (renderer && texture && texture->valid) {
|
||||
if (texture != NULL && renderer != NULL) {
|
||||
glViewport(0, 0, cursor->output->width, cursor->output->height);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue