Skip to content

Commit

Permalink
surface: Clear role on null attach
Browse files Browse the repository at this point in the history
  • Loading branch information
kennylevinsen committed Oct 11, 2022
1 parent 2068f45 commit 6ba773a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wl_surface.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ func (r *WlSurfaceImpl) Request(packet *WaylandPacket) error {
obj.Next.BufferX = x
obj.Next.BufferY = y

if bid == 0 {
obj.Next.Role = nil
return nil
}

buffer_obj := r.client.ObjectMap[bid]
if buffer_obj == nil {
return errors.New("no such buffer object")
Expand Down

0 comments on commit 6ba773a

Please sign in to comment.