* 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.
* positioner.c (DebugPrint): New macro.
(CalculatePosition, TrySlideX): Add more instrumentation. Add
defaults when no gravity is specified.
(TrySlideY): Add defaults when no gravity is specified.
(TryFlipX): Fix incorrect inversion of AnchorGravityBottomRight.
(ApplyConstraintAdjustment): Add more instrumentation.
* egl.c (UpdateBuffer): Fix coding style.
* subcompositor.c (IsPreviouslyTransformed)
(SetPreviouslyTransformed, ClearPreviouslyTransformed): New
macros.
(ViewSetTransform): Mark damage as untrusted until the next time
the buffer is uploaded.
(ApplyBufferDamage, ApplyUntransformedDamage): Upload entire
buffer upon untrusted damage.
* 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.
* compositor.h: Update prototypes.
* frame_clock.c (struct _FrameClock): New fields for keeping
track of configure events.
(FreezeForValue): If the freeze is outdated, bring the counter
up to date now.
(XLFrameClockHandleFrameEvent): Set the number of configure
events that should have been considered by the frame clock upon
processing.
(XLFrameClockNoteConfigure): New function.
* picture_renderer.c (SwapBackBuffers): Remove outdated comment.
* xdg_surface.c (NoteConfigure, XLXdgRoleReconstrain):
* xdg_toplevel.c (NoteWindowResized): Note frame clock
configure.
* subcompositor.c (ViewAttachBuffer): Correctly determine when
to recompute view bounds.
* subsurface.c (AfterParentCommit): Unskip view first, and
commit pending state second. Explain why.
* xdg_toplevel.c (Unmap, Map): Add new "initial configure" flag.
(Commit): Use it instead of testing current_buffer. Explain
why.
(XLGetXdgToplevel): Set that flag by default.
* 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.
* frame_clock.c (StartFrame): If the end frame timer is being
used to, return True and reset end_frame_called.
* subcompositor.c (SubcompositorLookupView): Fix coordinate
lookup inside subsurfaces.
* xdg_surface.c (NoteFrame): Rearrange frame callback logic.
* compositor.h: Remove some unused prototypes.
* seat.c (DispatchButton): Remove redundant popup code as
owner-events is now handled correctly when a surface is not
found.
* xdg_popup.c (Detach, Dismiss, RecordGrabPending, CanDestroyPopup)
(Destroy, MaybeDismissPopup): Keep track of which grabbed popup
is topmost, and don't allow deleting non-topmost ones.
(HandleOneGenericEvent, XLHandleButtonForXdgPopups): Delete
functions.
* seat.c (InterpolateAxes): New function.
(HandleValuatorMotion): Do not report discreet scroll events for
version 8 clients when the event comes from a finger scrolling
source.
* compositor.h (struct _RoleFuncs)
(struct _XdgRoleImplementationFuncs): New role functions
`outputs_changed'.
* output.c (NoticeOutputsMaybeChanged): Call surface
outputs_changed hook if it exists.
(XLGetMaxOutputBounds): New function.
* xdg_surface.c (OutputsChanged): New function.
(XLGetXdgSurface): Add new role function.
* xdg_toplevel.c (CurrentWindowGeometry): New function.
(SendStates): Factor out geometry calculation to that function.
(SendOutputBounds): New function.
(Commit, OutputsChanged): Send output bounds whenever
appropriate.
(XLGetXdgToplevel): Add new impl func.
* data_device.c (XLClearForeignSelection):
* primary_selection.c (XLClearForeignPrimary): Clear the local
selection as well upon losing selection ownership.
* xdata.c (NoticeClipboardCleared, NoticePrimaryCleared): If a
local selection is in use, don't clear it upon selection clear
events with a timestamp identical to the time at which their
ownership was acquired. Explain why in a comment.
(HandleSelectionNotify): Always use the client time.
* compositor.h: Update prototypes.
* idle_inhibit.c (DetectSurfaceIdleInhibit): Handle subsurfaces;
when an inhibitor attached to a subsurface is displayed, check
if the subsurface's root is focused or not.
(CreateInhibitor): Likewise; handle subsurfaces specially.
* subcompositor.c (ViewisVisible): New function.
* subsurface.c (struct _Subsurface): New field `mapped'.
(Commit, Teardown): Update idle inhibition when the surface is
mapped or unmapped.
(XLSubsurfaceGetRoot): New function.
* 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.