* 12to11.man: Document new protocol.
* compositor.h (enum _RenderMode): Add RenderModeVsyncAsync.
* picture_renderer.c (SwapBackBuffers, PresentToWindow)
(NotifyMsc): Handle new render mode.
* sync_source.c (GetWantedSynchronizationType): Use presentation
if the mode is VsyncAsync.
(NoteFrame): Set the vsync presentation mode to
RenderModeVsyncAsync.
This is in preparation for a migration to the Present extension
on systems that do not support frame synchronization.
* 12to11.man: Remove option that is no longer useful.
* Imakefile (SRCS, OBJS): Add `sync_source.c.'.
* compositor.h (enum _RenderMode): New enum.
(struct _RenderFuncs): Add some new functions.
(enum _FrameMode): Remove ModeNotifyDisablePresent.
* frame_clock.c (struct _FrameClockCallback): Add draw time to
frame callback.
(struct _FrameClock): Rearrange for alignment and remove many
unused members.
(BumpFrame): New function.
(FreezeForValue): Remove code that is no longer useful, as
clock->frozen no longer exists.
(StartFrame, EndFrame): Remove clock "freezing" logic. Only
`need_configure' remains.
(RunFrameCallbacks, NoteFakeFrame): Add frame drawn time.
(XLFrameClockAfterFrame): Adjust for new type of callback.
(XLFrameClockFreeze): Remove function.
(XLFrameClockFrameInProgress): Remove test for
`frozen_until_end_frame'.
(XLFrameClockHandleFrameEvent): Improve code in accordance with
above changes.
(XLFrameClockUnfreeze, XLFrameClockNeedConfigure): Remove
functions.
(XLFrameClockIsFrozen): Remove function.
(XLFrameClockSetFreezeCallback): Accept new callback
`fast_forward_callback'.
(XLFrameClockGetFrameTime): Remove unused function.
* icon_surface.c (struct _IconSurface, ReleaseBacking)
(ReleaseBuffer, RunFrameCallbacks, AfterFrame, Commit)
(SubsurfaceUpdate, XLGetIconSurface)
(XLHandleOneXEventForIconSurfaces): Switch the icon surface to
the sync helper abstraction, and allow asynch buffer release
from inside.
* picture_renderer.c (struct _PictureTarget): New field
`next_msc' and `render_mode'.
(SwapBackBuffers): Respect the render mode.
(InitSynchronizedPresentation): Delete function.
(InitAdditionalModifiers): Remove incorrect comment.
(InitRenderFuncs): Stop initializing obsolete option.
(SetRenderMode): New function.
(PresentToWindow): Respect the render mode.
(NotifyMsc): New function.
(picture_render_funcs): Add notify_msc.
(HandlePresentCompleteNotify): Call completion callback with the
fraame counter.
* renderer.c (RenderSetRenderMode):
(RenderNotifyMsc): New functions.
* subcompositor.c (struct _Subcompositor)
(SubcompositorSetNoteFrameCallback): Add msc and ust to note
frame callback.
(PresentCompletedCallback, RenderCompletedCallback): Call with
msc and ust.
(BeginFrame): When presentation is being synchronized and there
is no existing presentation callback, ask for an event to be
sent on the next frame.
(EndFrame): Do not clear the presentation callbacks, as the
update might not touch anything.
* test.c (NoteFrame): Update prototype.
* xdg_popup.c (InternalReposition): Stop "freezing" the frame
clock.
* xdg_surface.c (struct _XdgRole): Replace the frame clock with
the sync helper abstraction.
(RunFrameCallbacks): Run with the frame time.
(RunFrameCallbacksConditionally): Save the pending frame time.
(UpdateFrameRefreshPrediction): Delete function.
(XLHandleXEventForXdgSurfaces): Give events to the sync helper
instead.
(Unfreeze, IsRoleMapped, CheckFrame): Remove functions.
(Commit, SubsurfaceUpdate): Update using the sync helper
instead, only if not pending ack commit.
(MaybeRunLateFrame, AfterFrame): Delete functions.
(NoteConfigure, NoteBounds): Update for the sync helper.
(WriteRedirectProperty): Always require redirection for now.
Disabling redirection requires sorting out some Present problems
on the X server side.
(WasFrameQueued, NoteFrame): Delete functions.
(HandleFreeze): Delete function.
(HandleResize, CheckFastForward, HandleFrameCallback): New
functions.
(XLGetXdgSurface): Use the sync helper for most things.
(XLXdgRoleSendConfigure, XLXdgRoleReconstrain)
(XLXdgRoleGetFrameClock): Delete function.
(XLXdgRoleNoteRejectedConfigure): Clean up for using the sync
clock instead.
* 12to11.man:
* README: Update documentation.
* output.c (struct _Output): Rearrange structure for alignment.
(HandleBind): Send output name if necessary.
(CompareOutputs): Handle name changes separately.
(MakeGlobal): Support version 4 or later.
(SendUpdates): Handle name changes separately.
* 12to11-test.xml (test_manager) <set_buffer_label>: New
request.
* 12to11.man:
* README: Add missing documentation.
* buffer.c (ExtBufferDestroy): Free buffer label.
* compositor.h (struct _ExtBuffer): New field `label'
* linux-dmabuf-unstable-v1.xml: Update from wayland-protocols.
* subcompositor.c (IsSkipped, SetSkipped, ClearSkipped): Delete
macros.
(SubcompositorUpdateBounds, SubcompositorUpdateBoundsForInsert)
(SkipSlug): Adjust accordingly.
(DamageIncludingInferiors): Fix function.
(SubcompositorInsert, SubcompositorInsertBefore)
(SubcompositorInsertAfter, ViewIsVisible, ViewRecomputeChildren)
(ViewInsert, ViewInsertAfter, ViewInsertBefore): Call
DamageIncludingInferiors on child, not view.
(ViewSetSubcompositor, ViewAfterSizeUpdate, ViewMove): Get rid
of "skipped" state.
(ViewUnskip, ViewSkip): delete functions.
(ViewFree, DoCull, SubcompositorLookupView): Get rid of
"skipped" state.
* subsurface.c (struct _Subsurface): New field `pending'.
(AfterParentCommit): Attach views whenever pending.
(Setup): Stop attaching views upon setup.
(Teardown): Only detach views when not pending.
(GetSubsurface): Add comment.
(XLSubsurfaceParentDestroyed): Set subcompositor to NULL when
parent is destroyed.
(XLSubsurfaceHandleParentCommit): New function.
* surface.c (RunCommitCallbacks): Run commit callbacks in the
order in which they were created.
(NotifySubsurfaceDestroyed): Assert that a role is present.
(HandleSurfaceDestroy): Clear subsurfaces before releasing role.
Set subsurfaces to NULL.
* test.c (SetBufferLabel): New function.
(test_manager_impl): Implement.
* tests/subsurface_test.c (enum test_kind): New
SUBSURFACE_REPARENT_KIND.
(test_names): Add names
(LAST_TEST): Set to SUBSURFACE_REPARENT_KIND.
(test_single_step): Implement new test.
* tests/test_harness.c (load_png_image): Set buffer debug label.
* 12to11-test.xml (test_surface): <description>: Document when
frame callbacks are run.
* 12to11.c (HandleCmdline): Accept new arg `printsocket'.
(XLMain): Pass socket to HandleCmdline.
* 12to11.man: Document new `printsocket' option.
* mime0.awk:
* mime1.awk:
* mime2.awk:
* mime3.awk:
* mime4.awk: Fix typos in copyright blurb.
* test.c (NoteBounds): Sync with X server after XResizeWindow.
(Commit): Run frame callbacks after unmap as well.
(GetTestSurface): Make windows override redirect.
* tests/Imakefile (SRCS2, OBJS2): New program.
(PROGRAMS): Add damage_test.
(damage_test): New program. Depend on SRCS2.
* tests/README: Improve documentation on how to run tests.
* tests/simple_test.c (test_names): New list.
(LAST_TEST): New define.
(verify_single_step): Complete test upon last test being run.
(test_single_step): Submit correct surface damage.
(test_next_step): New function. Does nothing here.
(handle_wl_callback_done): Run the next test.
(submit_surface_damage): New function.
* tests/svnignore.txt: Add damage_test and Makefile.bak.
* tests/test_harness.c (test_complete): New function.
* tests/test_harness.h: New prototypes.
* xdg_surface.c (struct _XdgRole): Use a buffer release helper.
(struct _ReleaseLaterRecord, DeleteRecord, FreeRecords)
(AddRecordAfter): Delete unused structs and functions.
(RunFrameCallbacksConditionally, BufferIdleCallback)
(ReleaseBacking, ReleaseBuffer, XLGetXdgSurface): Use and free
buffer release helper; run frame callbacks from its callback.
* 12to11.c (XLMain): Initialize pointer gestures.
* 12to11.man (supported): Document that pointer gestures are now
supported.
* Imakefile (SRCS): Add pointer_gestures.c.
(OBJS): Add pointer_gestures.o.
(pointer-gestures-unstable-v1): New scanner target.
* README (supported): Documentation changes.
* compositor.h: Update prototypes. Export xi2_major and
xi2_minor from seat.c.
* seat.c (struct _SwipeGesture, struct _PinchGesture): New
structures.
(struct _SeatClientInfo, CreateSeatClientInfo): Initialize those
structures in the seat client info.
(EnteredSurface): Clear any gestures if the surface changed.
(SendGesturePinchBegin, SendGesturePinchUpdate)
(SendGesturePinchEnd, DispatchGesturePinch, SendGestureSwipeBegin)
(SendGestureSwipeUpdate, SendGestureSwipeEnd,
DispatchGestureEnd): New functions.
(XLGetGEWindowForSeats, XLSelectStandardEvents)
(XLDispatchGEForSeats): Handle and select for various kinds of
XI events.
(XLInitSeats): Ask for XI 2.4.
(XLSeatGetSwipeGesture, XLSeatGetPinchGesture)
(XLSeatDestroySwipeGesture, XLSeatDestroyPinchGesture): New
functions.
* 12to11.conf (DRMFOURCCH): New variable.
* 12to11.man: Document new resource.
* Imakefile (GENHEADERS): Add
drm_modifiers.h.:(drm_modifiers.h): New target.
(cleandir): Clean up.
* compositor.h: Update prototypes.
* fns.c (TransformBox): Move to transform.c.
* frame_clock.c (PostEndFrame): Use 200 us, since 100 us is not
always enough.
* picture_renderer.c (struct _DrmModifierName): New structure.
(known_modifiers): New array.
(AddAdditionalModifier, ParseAdditionalModifiers)
(InitAdditionalModifiers): New functions.
(InitRenderFuncs): Call them.
(ApplyInverseTransform): Accept buffer width and height instead
of PictureBuffer. Move to transform.c.
(MaybeApplyTransform): Adjust calls.
(FindSupportedModifiers, InitDrmFormats): Stop adding the linear
format by default, and let the user specify it instead.
* subcompositor.c (InvertTransform): Move to transform.c.
* svnignore.txt: Add new generated header.
* transform.c (ApplyInverseTransform, TransformBox)
(InvertTransform): Move some functions here as they will be used
in the EGL backend.
* 12to11.c (XLMain): Initialize idle inhibition.
* 12to11.man: Document new resources.
* Imakefile (SRCS): Add idle_inhibit.c and process.c.
(OBJS): Add idle_inhibit.o and process.o.
(idle-inhibit-unstable-v1): New scanner target.
* README: Explain what is now supported.
* compositor.h (enum _ClientDataType): Add IdleInhibitData.
(struct _Surface): Keep track of the number of focused seats.
* fns.c (UnblockSigbus): Fix unblocking of SIGBUS.
(XLAddFdFlag): New function.
* picture_renderer.c (GetRenderDevice):
* seat.c (WriteKeymap):
* drm_lease.c (AddProvider): Make various file descriptors
close-on-exec.
* run.c (RunStep): Change poll function to one that applies the
result of SIGCHLD.
* surface.c (XLSurfaceNoteFocus): Keep track of the number of
focused seats and call idle inhibit hooks when that changes.
Some window managers look up client PIDs via the resource
extension, which means killing stuck clients will actually kill
the protocol translator. Provide a mechanism to turn
_NET_WM_PING off.
* 12to11.man: Document new resource WmProtocols.wmProtocols.
* xdg_toplevel.c (Attach): Don't enable _NET_WM_PING if it is
turned off.
(ReadWmProtocolsString, ParseWmProtocols): New functions.
(XLInitXdgToplevels): Call them.
* 12to11.man: Update documentation.
* compositor.h (enum _FocusMode): New enum.
(struct _RoleFuncs, struct _XdgRoleImplementationFuncs): Add
`note_focus'.
* seat.c (CancelResizeOperation, InterceptButtonEventForResize):
Re-enter surface underneath pointer upon completion.
(InterceptResizeEvent): Accept subcompositor argument.
(NoticeDeviceDisabled): Unfocus surface upon the seat becoming
inert.
(SetFocusSurface): Call surface note_focus function.
(DispatchMotion, DispatchButton): Adjust calls to
InterceptResizeEvent.
(HandleResizeUnmapped): Adjust calls to CancelResizeOperation.
(DispatchBarrierHit): Use correct surface.
(FakePointerEdge): Leave any entered surface, as button events
will no longer be reported.
* surface.c (XLSurfaceNoteFocus): New function.
* xdg_surface.c (NoteFocus): New function.
(XLGetXdgSurface): Attach new function.
* xdg_toplevel.c (struct _XdgToplevel): New field
focus_seat_count.
(SendStates): Don't compute width and height when just sending
state.
(NoteFocus): Increment focus seat count.
(XLGetXdgToplevel): Attach new function if the window manager
does not support _NET_WM_STATE_FOCUSED.
* 12to11.c (XLMain): Initialize timestamp tracking.
* 12to11.man: Document *.useDirectPresentation resource.
* atoms.c (names): Add _NET_WM_PID and _NET_WM_PING.
(XLInitAtoms): Likewise.
* compositor.h (struct _RenderFuncs): Update doc of
cancel_presentation.
(enum _FrameMode): Add ModeNotifyDisablePresent.
(struct _XdgRoleList, struct _XdgWmBase): New structs.
* frame_clock.c (StartFrame): Return if the clock was really
started.
(XLFrameClockStartFrame): Likewise.
(XLInitFrameClock): Move Sync extension initialization to
InitTime.
* picture_renderer.c (struct _PresentCompletionCallback)
(struct _PictureTarget, InitSynchronizedPresentation)
(InitRenderFuncs, TargetFromDrawable, DestroyRenderTarget)
(PresentToWindow, CancelPresentationCallback, AddRenderFlag)
(HandlePresentCompleteNotify): Link structure on target. When
synchronized presentation is enabled, use the approriate msc to
present, and record the last known msc.
* run.c (HandleOneXEvent): Handle timestamp events.
* subcompositor.c (SubcompositorUpdate): Note frame with
ModeNotifyDisablePresent.
(FindSystemCounter, ValueToScalar, ScalarToValue, StartAlarms)
(HandleAlarmNotify, HandleOneXEventForTime, InitTime): New
functions.
* xdg_surface.c (struct _XdgRole): New fields `link' and
`wm_base'.
(struct _PingEvent): New structure.
(ReleaseBacking): Release all ping events.
(NoteFrame, WriteRedirectProperty): Allow unredirection under
some circumstances.
(XLGetXdgSurface): Attach wm base.
(XLXdgRoleHandlePing, ReplyPingEvent, XLXdgRoleReplyPing): New
function.
* xdg_toplevel.c (GetClientMachine): New function.
(WriteCredentialProperties): New function.
(Attach): Write credential properties.
(ReplyToPing): New function.
(XLHandleXEventForXdgToplevels): Handle ping events.
* xdg_wm.c (Pong): Reply to ping events once pong is received
from the client.
(HandleResourceDestroy): Detach all surfaces and run their ping
events.
(HandleBind): Allocate memory for XdgWmBase.
(XLXdgWmBaseSendPing): New function.
EGL support is still incomplete; stuff like scaling is missing.
* 12to11.c (PickVisual, XLMain): Remove function. Initialize
renderers, and rely on that to initialize the visuals.
* 12to11.man: Document new environment variables.
* Imakefile (SRCS, OBJS): Add picture_renderer.c and renderer.c
and their associated objects.
(GENHEADERS): New variable for generated headers.
(EGL_SRCS, EGL_OBJS): New variables.
(LOCAL_LIBRARIES, SRCS, OBJS, DEFINES): [HaveEglSupport]: Add
EGL defines, libraries, and objects.:(shaders.h): New rule.
(depend, cleandir): Depend on generated headers and SRCs.
$($(OBJS)): Depend on $(GENHEADERS).
* README: Write how to build with EGL support and update content
descriptions.
* buffer.c (XLPictureFromBuffer): Delete function.
(XLRenderBufferFromBuffer): New function.
(XLPixmapFromBuffer): Delete function.
* compositor.h (enum _Operation, struct _SharedMemoryAttributes)
(struct _DmaBufAttributes, union _RenderTarget)
(union _RenderBuffer, struct _RenderFuncs, struct _DrmFormat)
(struct _ShmFormat, struct _BufferFuncs, struct
_ExtBufferFuncs): New structures.
(Fallthrough): New define. Define to __attribute__
((fallthrough)) wherever supported. Replace uses of Picture
with RenderBuffer.
* dmabuf.c (struct _DrmFormatInfo): Remove structures.
(struct _BufferParams): Remove link.
(struct _Buffer): Replace pixmap and picture with render buffer
object.
(dri3_opcode, all_formats, pending_success, next_roundtrip_id)
(round_trip_window): Delete.
(ReleaseBufferParams, HandleParamsResourceDestroy, ForceRoundTrip)
(DepthForFormat, XLHandleErrorForDmabuf, PictFormatForFormat)
(DestroyBacking, GetPictureFunc, GetPixmapFunc, GetBufferFunc)
(CreateBufferFor, ModifierHigh, FinishBufferCreation)
(XLHandleOneXEventForDmabuf, CreateHeader, Create, CreateImmed)
(FindFormatMatching, FindSupportedModifiers, FindSupportedFormats)
(SendSupportedFormats, HandleBind, InitDrmDevice, WriteFormatTable)
(ReallyInitDmabuf, ReadSupportedFormats, XLInitDmabuf): Remove
various functions and reimplement as a wrapper around the
renderer abstraction, instead of DRI3.
* fns.c (struct _Busfault): New structure.
(busfault_tree, bus_handler_installed): New variables.
(GetHeight, FixHeights, RotateLeft, RotateRight, RebalanceBusfault)
(RecordBusfault, DetectBusfault, DeleteMin, RemoveBusfault)
(HandleBusfault, MaybeInstallBusHandler, BlockSigbus)
(UnblockSigbus, XLRecordBusfault, XLRemoveBusfaults): New
functions to store non-overlapping regions of mapped memory in
an AVL tree, and to ignore SIGBUS events that trap within.
* icon_surface.c (struct _IconSurface): Replace picture with
rendering target.
(ReleaseBacking, XLGetIconSurface): Use rendering targets
instead of pictures.
* libraries.def: Add defines for EGL.
* run.c (HandleOneXEvent): Replace old dmabuf code with renderer
code.
* seat.c (CursorFromRole, PictureForCursor, ApplyCursor)
(UpdateCursorFromSubcompositor, Subframe, EndSubframe): Rewrite
cursor code to use rendering targets and not pictures.
* shm.c (Buffer, DereferencePool): Remove SIGBUS protection.
(DereferenceBuffer): Reimplement in terms of renderer functions.
(GetPictureFunc): Delete function.
(GetBufferFunc): New function.
(GetPixmapFunc): Delete function.
(PrintBuffer): Remove now-broken implementation.
(DepthForFormat, PictFormatForFormat): Delete functions, as they
are now part of the rendering backend.
(IsFormatSupported): New function.
(CreateBuffer): Reimplement in terms of renderer functions.
(ResizePool): Change SIGBUS protection for resize.
(CreatePool): Protect buffer data from SIGBUS should a client
truncate the file.
(PostFormats): Reimplement in terms of RenderGetShmFormats.
(XLInitShm): Stop initializing MIT-SHM.
* subcompositor.c (IsTargetAttached): New flag and associated
macros.
(struct _View): Remove useless field.
(struct _Subcompositor): Change target to RenderTarget. Add
fields for prior damage.
(MakeSubcompositor): Initialize new fields.
(SubcompositorSetTarget): Accept RenderTarget, not picture, and
set target attached flag.
(ViewGetTransform): Delete function.
(ViewApplyTransform): New function.
(FillBoxesWithTransparency): Reimplement in terms of renderer
functions.
(StorePreviousDamage): New function.
(SubcompositorUpdate): Reimplement in terms of renderer
functions. Also, learn to deal with situations where the buffer
reflects the state 1 to 2 swaps ago.
(SubcompositorExpose): Reimplement in terms of renderer
functions.
(SubcompositorFree): Free new fields.
(SubcompositorInit): Remove no longer required initialization of
identity matrix.
* xdata.c (ReceiveBody): Fix coding style.
* xdg_surface.c (struct _XdgRole, ReleaseBacking,
XLGetXdgSurface): Switch from pictures to RenderTargets.
* xerror.c (ErrorHandler): Handle errors for picture renderer
instead of dmabuf.c.
* 12to11.man: Document new environment variables.
* Imakefile ($(OBJS)): Also depend on protocol headers.
* README: Update implementation status.
* compositor.h: Update prototypes.
* data_device.c (DataOfferSetActions): Fix error sent when the
offer is invalid.
* dnd.c: Remove out of date comment.
* primary_selection.c (struct _PDataSource): Move declaration to
compositor.h. New field `atom_types'.
(Offer): Record atom types as well.
(HandleSourceResourceDestroy): Maybe disown the primary
selection, and free offered MIME types.
(XLResourceFromPDataSource, XLPDataSourceHasAtomTarget)
(XLPDataSourceHasTarget, XLPDataSourceTargetCount)
(XLPDataSourceGetTargets): New functions.
(UpdateForSingleReference): Handle foreign selections correctly.
(SetSelection): Try to own the X selection.
(XLSetForeignPrimary, XLClearForeignPrimary): New functions.
* seat.c (XLSeatResizeInProgress): New function.
* xdata.c (struct _ReadTargetsData): New field `selection'.
(struct _DataConversion): Pass send function and source resource
to conversion function.
(last_primary_time): New timestamp variable.
(x_primary_targets, num_x_primary_targets, primary_data_source):
New variables.
(HasSelectionTarget, FindTranslationForMimeType): Accept arg
`is_primary', meaning that the primary selection data should be
used instead.
(ReceiveBody): Extract generic code from Receive.
(Receive): Replace with above macro.
(Finish, SetActions): Correctly post errors on DND-specific
actions.
(ReceivePrimary): New function.
(primary_offer_impl): New interface implementation.
(CreatePrimaryOffer): New function.
(SendOffers1): Extract generic code from SendOffers.
(SendOffers, SendPrimaryOffers): Reimplement in terms of
SendOffers1.
(HandleNewSelection): Handle PRIMARY selection changes.
(TargetsFinishCallback): Pass selection to HandleNewSelection.
(NoticeClipboardChanged): Set TargetsReadData selection.
(NoticePrimaryChanged): New function.
(NoticeClipboardCleared): Free unused data.
(NoticePrimaryCleared): New function.
(HandleSelectionNotify): Handle notifications for both CLIPBOARD
and PRIMARY.
(MimeTypeFromTarget, TypeFromTarget): Accept argument `primary',
meaning to use the primary selection when determining whether or
not to call a conversion callback.
(GetClipboardCallback): Pass resource and functions to the
clipboard callback.
(GetConversionCallback): Update to use provided functions and
resource.
(GetDragCallback, XLNoteSourceDestroyed): Fix typos in debug
string.
(XLNotePrimaryDestroyed): New function.
(NoteLocalSelectionBody, NoteLocalSelectionFooter): Extract
selection-generic code from XLNoteLocalSelection.
(XLNoteLocalSelection): Reimplement in terms of the above two
macros.
(XLNoteLocalPrimary, GetPrimaryCallback): New functions.
(XLInitXData): Select for selection input from XA_PRIMARY as
well.
* xdg_surface.c (AckConfigure): Improve debug code.
(Commit): Clear that flag.
(NoteBounds): If that flag is set, return.
(HandleFreeze): Assume a configure event will arrive after a
sync request; set flags accordingly.
(XLGetXdgSurface): Add HandleFreeze.
(XLXdgRoleSendConfigure): Clear some flags and add new state
flag `StateWaitingForAckCommit'. Set it. It means that no
commit has yet happened after ack_configure.
(XLXdgRoleNoteRejectedConfigure): New function. Clear flags if
the configure event following _NET_WM_SYNC_REQUEST was rejected.
* xdg_toplevel.c (struct _XdgToplevel): New state flags
StatePendingResize, StateConfigureSize,
StatePendingConfigureStates. New field `configuration_timer'.
(batch_state_changes): New flag.
(DestroyBacking): Clear configuration timer.
(NoteConfigureTime): New function; apply queued state changes.
(HandleWmStateChange, HandleConfigureEvent): By default, queue
state changes and configure events so they can be applied in one
go.
(Unmap): Clear delayed configuration timer.
(Commit, CommitInsideFrame, PostResize): Improve movement delta
adjustment for min_width and min_height, and queue pending
motion for after ack_configure.
(XLInitXdgToplevels): Set `batch_state_changes' depending on the
DIRECT_STATE_CHANGES' environment variable.