Module wl_subsurface

Module wl_subsurface 

Source
Expand description

sub-surface interface to a wl_surface

An additional interface to a wl_surface object, which has been made a sub-surface. A sub-surface has one parent surface. A sub-surface’s size and position are not limited to that of the parent. Particularly, a sub-surface is not automatically clipped to its parent’s area.

A sub-surface becomes mapped, when a non-NULL wl_buffer is applied and the parent surface is mapped. The order of which one happens first is irrelevant. A sub-surface is hidden if the parent becomes hidden, or if a NULL wl_buffer is applied. These rules apply recursively through the tree of surfaces.

A sub-surface can be in one of two modes. The possible modes are synchronized and desynchronized, see methods wl_subsurface.set_sync and wl_subsurface.set_desync.

The main surface can be thought to be always in desynchronized mode, since it does not have a parent in the sub-surfaces sense.

Even if a sub-surface is in desynchronized mode, it will behave as in synchronized mode, if its parent surface behaves as in synchronized mode. This rule is applied recursively throughout the tree of surfaces. This means, that one can set a sub-surface into synchronized mode, and then assume that all its child and grand-child sub-surfaces are synchronized, too, without explicitly setting them.

If a surface behaves as in synchronized mode, it is effectively synchronized, otherwise it is effectively desynchronized.

A sub-surface is initially in the synchronized mode.

The wl_subsurface interface has requests which modify double-buffered state of the parent surface (wl_subsurface.set_position, .place_above and .place_below).

Destroying a sub-surface takes effect immediately. If you need to synchronize the removal of a sub-surface to the parent surface update, unmap the sub-surface first by attaching a NULL wl_buffer, update parent, and then destroy the sub-surface.

If the parent wl_surface object is destroyed, the sub-surface is unmapped.

A sub-surface never has the keyboard focus of any seat.

The wl_surface.offset request is ignored: clients must use set_position instead to move the sub-surface.

Structs§

WlSubsurface
sub-surface interface to a wl_surface

Enums§

Error
Event
Request

Constants§

REQ_DESTROY_OPCODE
The wire opcode for this request
REQ_DESTROY_SINCE
The minimal object version supporting this request
REQ_PLACE_ABOVE_OPCODE
The wire opcode for this request
REQ_PLACE_ABOVE_SINCE
The minimal object version supporting this request
REQ_PLACE_BELOW_OPCODE
The wire opcode for this request
REQ_PLACE_BELOW_SINCE
The minimal object version supporting this request
REQ_SET_DESYNC_OPCODE
The wire opcode for this request
REQ_SET_DESYNC_SINCE
The minimal object version supporting this request
REQ_SET_POSITION_OPCODE
The wire opcode for this request
REQ_SET_POSITION_SINCE
The minimal object version supporting this request
REQ_SET_SYNC_OPCODE
The wire opcode for this request
REQ_SET_SYNC_SINCE
The minimal object version supporting this request