* compositor.h (struct _XdgRoleImplementationFuncs): New
function `rescale'.
* subsurface.c (Rescale): If the parent has been detached, don't
call MoveFractional.
* xdg_surface.c (Rescale): Call rescale hook.
* xdg_toplevel.c (SendOutputBounds): Check that some fields are
present. Scale geometry correctly.
(Rescale): New function.
(ShowWindowMenu): Scale coordinates correctly.
(XLGetXdgToplevel): Add Rescale hook.
* subcompositor.c (ViewSetSubcompositor):
* subsurface.c (Teardown, XLSubsurfaceParentDestroyed):
* surface.c (HandleSurfaceDestroy): Restore previous code with
more comments.
* tests/subsurface_test.c (test_single_step): Test that surface
actions work with unconfirmed subsurfaces.
* 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.
* compositor.h: Update prototypes.
* idle_inhibit.c (DestroyIdleInhibitManager): New function.
(idle_inhibit_manager_impl): Add missing op handler.
* seat.c (struct _Seat): Remove pointer unlock surface. Add
last_seen_subcompositor.
(ReleaseSeat): Release the last seen subcompositor callback.
(ClearPointerUnlockSurface, SwapUnlockSurface): Delete
functions.
(HandleSubcompositorDestroy): New function.
(EnteredSurface): Stop calling SwapUnlockSurface.
(DispatchEntryExit): Set the last seen subcompositor.
(DispatchMotion, CancelGrab1, CancelGrab): Use the last seen
subcompositor to decide where to unlock instead.
(LockSurfaceFocus, DispatchButton, DispatchGesturePinch)
(DispatchGestureSwipe): Stop calling SwapUnlockSurface.
(FakePointerEdge, ForceEntry): Stop calling SwapUnlockSurface.
* subcompositor.c (struct _SubcompositorDestroyCallback): New
struct.
(struct _Subcompositor): New field `destroy_callbacks'.
(MakeSubcompositor): Initialize new field.
(SubcompositorFree): Run and free destroy callbacks.
(SubcompositorOnDestroy, SubcompositorRemoveDestroyCallback):
New functions.
* tests/run_tests.sh:
* tests/select_test.c (verify_sample_text_multiple): Fix
ommissions and typos.
* seat.c (MakeSeatForDevicePair): Get keyboard state and select
for events from the master keyboard.
(UpdateModifiersForSeats): Rename to UpdateModifierForSeat.
Accept seat arg.
(SetupKeymap): Stop selecting for state changes here.
(HandleXkbEvent): Associate each XkbStateNotify with an
extension device's keyboard.
* README: Document changes.
* compositor.h (struct _BufferFuncs): Rename `get_render_device'
to `get_render_devices' and make it return a list of providers.
* dmabuf.c (MakeFeedback): Send 1 tranche for each device.
(InitDrmDevice): Rename to InitDrmDevices. Set up for multiple
devices.
(WriteFormatTable): Adjust call accordingly.
* egl.c (GetRenderDevice): Remove function.
(GetRenderDevices): New function.
(egl_buffer_funcs): Change accordingly.
* output.c (XLInitRROutputs): Require RandR 1.4.
* picture_renderer.c (GetRenderDevice): Remove calls to open.
(GetRenderDevices): New function.
(picture_buffer_funcs): Adjust accordingly.
* renderer.c (RenderGetRenderDevice): Delete function.
(RenderGetRenderDevices): New function.
* 12to11-test.xml (test_manager) <error>: Add
invalid_user_time.
<get_serial, serial> New request and event.
(test_seat_controller) <set_last_user_time>: New request.
* compositor.h (struct _TextInputFuncs): Make `filter_input'
return keycode.
* data_device.c (DestroyReference): Check if reference device is
detached before unlinking reference.
* seat.c (LookupKeysym): Delete function.
(DispatchKey): Use keycodes instead.
(XLSeatExplicitlyGrabSurface): Avoid using owner-events keyboard
grab.
* select.c (struct _SelectionOwnerInfo, HandleSelectionRequest):
Allow CurrentTime in selection requests. Compensate for
wraparound as well.
(OwnSelection, DisownSelection): Use Timestamp instead of Time.
* test.c (GetSerial): New function.
(test_manager_impl): Add new function.
* test_seat.c (SetLastUserTime): New function.
(seat_controller_impl): Add new function.
* tests/Imakefile (LOCAL_LIBRARIES): Remove GBM and DRM.
(SRCS10, OBJS10, SRCS11, OBJS11): New variables.
(dmabuf_test): Only link this program with GBM and DRM.
(PROGRAMS): Add select_test, select_helper.
(select_test, select_helper): New programs.
* tests/README: Document that select_test needs to be run under
vfb.
* tests/run_tests.sh: Add TODO note.
* tests/svnignore.txt: Add select_test and select_helper.
* tests/test_harness.c (handle_test_manager_serial): New
function.
(test_manager_listener): Add new function.
(open_test_display): Clear display->seat.
(test_get_serial): New function.
* tests/test_harness.h (struct test_display): New function
`serial'.
* text_input.c (CreateIC): Improve debugging code.
(CalculateKeycodeForEvent): Move earlier.
(FilterInputCallback): Handle keycodes here as well.
(XLTextInputDispatchCoreEvent): Add more debugging code.
* xdata.c (SelectSelectionInput): Obtain server time here.
(XLOwnDragSelection, NoteLocalSelectionFooter): Convert times to
Timestamp.
These tests have already been superseeded by the more
comprehensive tests in subsurface_tests.c (and to a lesser
extent under tests/*.c in general), and do not build anymore.
* subcompositor.c (TEST_STATIC): Remove define.
(IsTargetAttached, ClearPreviouslyTransformed, struct _View)
(struct _Subcompositor, MakeSubcompositor, MakeView)
(SubcompositorInsert, SubcompositorInsertBefore)
(SubcompositorInsertAfter, ViewInsert, ViewInsertAfter)
(ViewInsertBefore, ViewInsertStart, ViewUnparent)
(ViewSetSubcompositor, PrintView, PrintSubcompositor, TestView)
(TestSubcompositor, main): Delete all code under #ifdef TEST.
* text_input.c (struct _KeysymMap): New struct.
(struct _TextInput): New field `keysym_map'.
(ClearKeysymMap, InsertKeysym, RemoveKeysym, GetKeysym): New
function.
(InputDoLeave, HandleResourceDestroy): Clear the keysym map.
(NoticeLeave): Fix coding style.
(LookupString): Always prefer keysyms looked up.
(XLTextInputDispatchCoreEvent): Store keysym into map upon
KeyPress under the keycode, and use that keysym with the
corresponding KeyRelease.
* tests/dmabuf_test.c (enum test_kind): Add XBGR888_KIND.
(test_names): Add that test.
(LAST_TEST): Set to XBGR888_KIND.
(verify_single_step, test_single_step, test_next_step):
Implement that test, but keep it disabled for now.
* tests/seat_test.c (struct test_subsurface): New struct.
(enum test_kind): Add TEST_GRAB_KIND.
(test_names): Add that test kind.
(LAST_TEST): Set to TEST_GRAB_KIND.
(make_test_subsurface): New function.
(run_grab_test): New functions.
(test_single_step): Implement new test.
(expect_enter_event): Accept surface arg.
(expect_surface_enter): Adjust accordingly.
(handle_wl_callback_done, wait_frame_callback): New functions.
* compositor.h (struct _RenderFuncs): Add function `set_client'.
(struct _ClientErrorData): New struct.
* icon_surface.c (XLGetIconSurface): Attach client to render
target.
* picture_renderer.c (struct _BackBuffer): Keep track of how
many pixels were allocated.
(struct _PictureTarget): Keep track of the client data.
(SetClient): New function.
(FreeBackBuffer, FreeBackBuffers, CreateBackBuffer)
(SetStandardEventMask, NoteTargetSize, DestroyRenderTarget)
(picture_render_funcs): Keep track of the number of pixels
allocated on behalf of each client.
* renderer.c (RenderSetClient): New function.
* run.c (RunStep): Disconnect clients pending disconnect.
* shm.c (InitRender): Export the render error base.
* test.c (GetTestSurface):
* xdg_surface.c (XLGetXdgSurface): Attach the client to the
render target.
* xerror.c (enum _ClientMemoryCategory): New enum.
(ReleaseClientData, HandleClientDestroy, ErrorDataForClient)
(CategorizeClients, SavePendingDisconnectClient)
(DisconnectOneClient, ProcessPendingDisconnectClients)
(HandleBadAlloc): New functions.
(ErrorHandler): Handle BadAlloc errors by disconnecting pixmap
hogs.
* subcompositor.c (IsDamageComplicated): Consider 10 rects as
complex damage.
* surface.c (ApplyScale): Don't dereference subsurface list data
as role.
* tests/subsurface_test.c (enum test_kind, test_names): Add
complex damage and scaling tests.
(LAST_TEST): Set to SUBSURFACE_SCALE_KIND.
(test_single_step): Implement new tests.
* tests/seat_test.c (enum test_expect_event_kind): Add leave and
button events.
(struct test_expect_data): Remove structure.
(struct test_recorded_event): New structure.
(struct test_recorded_leave_event)
(struct test_recorded_button_event)
(struct test_recorded_frame_event)
(struct test_recorded_enter_event)
(struct test_recorded_motion_event): New structures. Replace
old event verification mechanism with a mechanism for recording
events sent from the pointer device. and verifying them later.
(enum test_kind, test_names): Add TEST_CLICK_KIND.
(LAST_TEST): Set to TEST_CLICK_KIND.
(num_listener_data, current_listener_data): Remove variables.
(recording_events, record_tail): New variables.
(run_click_test, test_single_step): Implement new kind of test.
(record_events, expect_button_event, expect_frame_event)
(expect_enter_event, expect_motion_event, expect_leave_event)
(expect_button_event, expect_no_events): New functions for
recording and inspecting input events.
(expect_surface_enter, expect_surface_motion): Reimplement in
terms of those functions.
(get_next_expect_data): Delete function.
(handle_pointer_enter, handle_pointer_leave, handle_pointer_motion)
(handle_pointer_button, handle_pointer_frame): Record events
instead of matching them against a list of verified events.
* 12to11-test.xml (test_manager): <error>: Add `invalid_button',
`value_exists', `bad_seat_version' and `invalid_valuator'.
(test_manager): <get_test_seat>: New request.
(test_XIButtonState, test_XIModifierState, test_XIValuatorState)
(test_seat_controller): New interfaces.
* Imakefile: (seat.o): Depend on test_seat.c.
* compositor.h: Update prototypes.
* run.c (XLRunCompositor): Get rid of stdbool constant.
* seat.c (HandleBind1): Move binding logic to this new function.
(HandleBind): Call HandleBind1.
(InitSeatCommon): Add list initialization to this function.
(MakeSeatForDevicePair): Call InitSeatCommon instead.
(HandleRawKey, UpdateModifiersForSeats, DispatchFocusIn)
(DispatchMotion, DispatchBarrierHit, DispatchGesturePinch)
(DispatchGestureSwipe): Do not update user time from send_event
events. Include test_seat.c.
* test.c (GetTestSeat): New function.
(test_manager_impl): Add new proc function.
(XLLookUpTestSurface): New function.
* tests/Imakefile (OBJS8, SRCS8): New program.
(PROGRAMS): Add seat_test.
(seat_test): New function.
* tests/run_tests.sh (standard_tests): Add seat_test.
* tests/svnignore.txt: Add seat_test.
* tests/test_harness.c (report_test_internal_error,
test_init_seat): New functions.
* tests/test_harness.h (struct test_seat): New struct.
(struct test_display): New field `seat'.
* subsurface.c (EarlyCommit): Clear pending_commit after merging
cached state.
* tests/subsurface_test.c (test_single_step): Add test that
found this problem.
* compositor.h (struct _RoleFuncs): Get rid of note_desync_child
and co.
* frame_clock.c (StartFrame): Fix typo.
* subsurface.c (struct _Subsurface): New field
`should_be_desync'.
(NoteDesyncChild, NoteChildSynced): Delete functions.
(IsParentSynchronous): New function.
(SetSync1, NoteSubsurfaceDesynchronous, NoteSubsurfaceTeardown):
New functions.
(SetSync): Make all children synchronous when required.
(SetDesync): Desynchronize all children if possible; otherwise,
keep the surface synchronous but set the `should_be_desync'
flag.
(EarlyCommit): Merge pending state if required.
(Setup): Call SetSync1 to make children synchronous.
(Teardown): Call NoteSubsurfaceTeardown to make children
desynchronous as required.
(GetSubsurface): Stop setting
note_child_synced/note_desync_child.
* surface.c (InternalCommit1): New function.
(InternalCommit): Move state merging logic to InternalCommit1.
(XLSurfaceMergeCachedState): New function.
* xdg_surface.c (struct _XdgRole): Remove `n_desync_children'.
(UpdateFrameRefreshPrediction): Resort to counting the number of
children on each frame instead.
(Setup, NoteFrame, NoteChildSynced, NoteDesyncChild, HandleFreeze)
(XLGetXdgSurface): Stop counting sync/desync children.
* tests/subsurface_test.c (enum test_kind, test_names): Add
SUBSURFACE_DESYNC_KIND.
(LAST_TEST): Set to SUBSURFACE_DESYNC_KIND.
(test_single_step): Implement SUBSURFACE_DESYNC_KIND.