( s protocols.ClientState, object_id protocols.ObjectID[protocols.WlSubsurface], x int32, y int32, )
| 55 | } |
| 56 | |
| 57 | func (ss *WlSubsurface) WlSubsurface_set_position( |
| 58 | s protocols.ClientState, |
| 59 | object_id protocols.ObjectID[protocols.WlSubsurface], |
| 60 | x int32, |
| 61 | y int32, |
| 62 | ) { |
| 63 | surfaceID := GetSurfaceIDFromRole(s, object_id) |
| 64 | if surfaceID == nil { |
| 65 | SendError(s, object_id, protocols.WlSubsurfaceError_enum_bad_surface, "surface not found") |
| 66 | return |
| 67 | } |
| 68 | |
| 69 | parent := GetWlSurfaceObject(s, ss.Parent) |
| 70 | if parent == nil { |
| 71 | SendError(s, object_id, protocols.WlSubsurfaceError_enum_bad_surface, "parent not found") |
| 72 | return |
| 73 | } |
| 74 | if (*parent).PendingUpdate.SetChildPosition == nil { |
| 75 | (*parent).PendingUpdate.SetChildPosition = []ChildPosition{} |
| 76 | } |
| 77 | |
| 78 | (*parent).PendingUpdate.SetChildPosition = append( |
| 79 | (*parent).PendingUpdate.SetChildPosition, |
| 80 | ChildPosition{ |
| 81 | Child: *surfaceID, |
| 82 | X: x, |
| 83 | Y: y, |
| 84 | }, |
| 85 | ) |
| 86 | } |
| 87 | |
| 88 | func (ss *WlSubsurface) WlSubsurface_place_above( |
| 89 | s protocols.ClientState, |
nothing calls this directly
no test coverage detected