summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2023-01-19input: Fix minor issue while reporting disable cursorneedlefishMarius Vlad1-5/+5
We actually reported the cursor being disabled when it fact it was not. Bug-AGL: SPEC-4658 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I81ee23e4ef2621c96344ce526a7b53d235d325e3 (cherry picked from commit 0907e87f1576f8ad70657d00d720b4f6ead8aed8)
2022-11-14layout: Allow background surface roles (to) be activatedScott Murray2-7/+35
While nothing technically prevents the background surface role to be activated, it turns out we don't actually track it so we a) couldn't find it, and b) we attempted to resize it to an incorrect dimension. Another small follow-up commit from 'Add manual activation area configuration option' and with with commit 'agl-shell: Add support for defining an activation area', which introduced the ability to designate a certain area as the activation area. v2: Keep the background surface always mapped We now have more than one active surfaces at the same time, so we can't unmap it as it needs to be always displayed. Bug-AGL: SPEC-4594 Reported-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> [backported to Needlefish branch] Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I8373c04c8f75e19a1efa4961c06ad36d7b6031cb
2022-10-31Add manual activation area configuration optionScott Murray3-9/+57
Add a per-output "activation-area" configuration option that can be used to define the activation area for applications that are not using panels. Notes: - A new surface is not created for the given activation area, so apps that are not opaque will show the background. After some thought, this seems like acceptable behavior, but it is possible that I am missing something. - At present setting the activation area explicitly disables use of any panels, this may not need to be the case and some discussion with the AGL community with respect to requirements is likely needed. - It is likely that this feature should be done via a agl-shell protocol call instead of via configuration, but doing so will require some thought as to the interaction with panels and how configuration errors would be communicated back to a client. Bug-AGL: SPEC-4588 (manual cherry-pick of 924473ef016ba8dcfa863861740be2289421313d) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I13885ce7a4d7a1c76761012fe012a2bfbb4474c8
2022-06-29layout: Add a wrapper for adding the view to the hidden layerMarius Vlad1-24/+41
And with it, use it *as well* when detecting a surface shouldn't be presented if activate-by-default is disabled. The reason for doing that is to allow application the resize and receive frame events right after the client shell has been started. Doing it a later point it time, right when a potential activation could come from a client, wouldn't really be useful as the client won't react to configure events. This particular fix is for cases where the activate by default is disabled and the application itself was added *before* the client shell sent the ready request. Bug-AGL: SPEC-4423 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Reported-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com> Change-Id: I5b08d2ff65fca28126608c2677ec9b558a34caa1
2022-06-20shell: Fix a typo when adding surface to pending listMarius Vlad1-1/+1
As both names are similar this was probably a typo, and instead of using the iterator for the list we should use the item itself. This was pretty hard to track as initially everything was set-up alright. We were still getting empty lists of pending remote surfaces, when I observed that we were using the iterator rather than the new item we just create in that function. Bug-AGL: SPEC-4445 Reported-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I77c4c6721eb4a4e3e8e66faa4fa0584b136d322e
2022-06-13compositor: Allow passing continue-without-inputMarius Vlad1-1/+5
We can specify over cmd line if we don't have any input devices. Found while investigating xdg-shell and keyboard activation. Bug-AGL: SPEC-4415 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I54be16e38922c5216f8075074bd1d47468ec07a3
2022-06-10shell: Make sure that app_id is valid before checking itMarius Vlad1-4/+4
Bug-AGL: SPEC-4412 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I427c2920315b223432f273d08a69a069d66310c9
2022-06-10layout: Keep track of popup state to handle activationMarius Vlad2-1/+7
Upon deactivation explicitly mark the surface as unmapped, and keep track of the state using the enum already added for that. Further more, at remap, we need to perform a transform update, so this adds that as well. Together with these changes, we now can activate/hide the pop-up window correctly. Bug-AGL: SPEC-4412 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I4dda48dbda265d19df9c7fb4a25773afa8245cf3
2022-06-10compositor: Perform activation from keybindingsMarius Vlad1-4/+6
Now that we have common function that peforms surface activation (xdg-shell and input one) use it for touch and keyboard. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I325e33da4c48f2741a7bb8f5ac706f838f9dabc4
2022-06-10compositor: Pass flags when adding keybindgsMarius Vlad1-7/+14
Although we don't really use these flags make it so we deliever them to libweston. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Idbbf2278c5fcaf75a8ef2f89499f7815d4a9e88f
2022-06-10layout: Add a way common way activate viewsMarius Vlad3-0/+65
We install a common function which is being used to de-couple keyboard presence from input and xdg-shell activation. We also also use it at surface removal/destruction. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I2686e5a4aab3e95fbeaa4100faa2dc0051881f24
2022-06-10shell: Extract some common functionsMarius Vlad3-15/+30
For instance this exports retreiving a ivi_seat from weston_seat, and they are useful in other parts as well. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I838823570792761dfb5ac4beea635e843dd5cd22
2022-06-10input: Migrate ivi_seat to ivi_compositor headerMarius Vlad2-13/+13
We might need to retrieve the seat in from different places to make it available. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I76343fe6039ae088356ddc33364e917d67dd414b
2022-06-10input: Remove keyboard listener keyboard focus activationMarius Vlad1-37/+0
This is part of the bigger series to remove the need to have a keyboard present to activate views/surfaces. This clean-ups any keyboard listener we had installed previously. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iacd63a857cfe4d17c665f37dc8338cd790b7d16f
2022-06-03compositor: Properly dispose of fullscreen views at shutdownMarius Vlad2-1/+10
While we can have multiple outputs, each with its own fullscreen view, we have a layer-per-output hence we can't really call layer_fini() in the output destruction as that what would result in an invalid link access. Handle those views destruction and with it, the fullscreen layer fini, in the finalize bit where all others are handled as well. This fixes a crash at shutdown, which could be seen when using multiple outputs, and probably quite problematic when handling a restart. Fixes: 43bdf9a42bac33df174d6ac7ff1ab2e15441c7b5 Bug-AGL: SPEC-4420 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I773890a24ad8ca2556c1d4ddda7f37ebae02c9de
2022-05-04shell: Do not set none role for applications w/o appidMarius Vlad1-5/+0
With commit 'layout: Send dimensions when setting up property as fullscreen' we made so that fullscreen applications will receive the configure event right from the beginning but that changed a bit the way we handled applications that do not set-up an appid before doing the initial wl_surface.commit. Avoid doing that such that applications do not need to go through a resize. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I91a9ab97ff5e30d3a86cda499d394c1a9fcde338
2022-05-04shell: Let the output destroy handler handle layer finiMarius Vlad2-12/+1
This way we don't race with it. Part of 'shell: Added missing layer fini calls'. Bug-AGL: SPEC-4351 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I366364ba128ca1dacd3d3639a1b74b02f3ceef21
2022-05-04desktop: Document the repaint scheduleMarius Vlad1-0/+11
Add some further comment why we could still potential need it. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I510cd60d5feeccf7d8b9b34fb73e0e272fac5c6a
2022-05-04Revert "desktop: No need to schedule a compositor repaint"Marius Vlad1-0/+2
This reverts commit 8f85581e96bc71512cbef015ff12dc6441c07d9c. I incorrectly assumed that we don't need to schedule a repaint, but applications that do not set-up an appid would still need to go through a resize and we need to continue to allow doing that. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I3702fa0a9c29290746250992d8921f777daa9fbf
2022-05-03shell: Added missing layer fini callsMarius Vlad3-1/+77
Newer libweston version introduced additional API to determine if we are missing out proper destruction paths. Bug-AGL: SPEC-4351 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I135ca463992244ae91512854c7da7004de48f72e
2022-05-03compositor: Proper indentationMarius Vlad1-2/+4
Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I010463d02a1dc71539754be24ce8c5d747a31b96
2022-05-03desktop: Remove dead codeMarius Vlad2-20/+0
Some dead code artefacts, no need to keep these in. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Idca7f858592b422a0e028ed03e10f4bb418bcb40
2022-05-03desktop: No need to schedule a compositor repaintMarius Vlad1-2/+0
Part of a larger clean-up. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I8532fb03e1911f9dc5c04fa113d2b3e2eeba4879
2022-05-03layout: Inform client to resize for fullscreen rolesMarius Vlad2-19/+58
In a previous patch we optimized sending the dimensions from the start, but in some situations the client might set up the surface roles *after* that happens, which might lead to issue as we are explicitly terminating the connection if the client wasn't correctly resized by that time. This corrects that such that even if we perform a late set-up for the fullscreen role, we can still tell the client to resize, and later on to display the surface. Bug-AGL: SPEC-4339 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I491c60c9881e99bc3201216a842782417286f0d9
2022-05-03layout: Send dimensions when setting up property as fullscreenMarius Vlad4-28/+65
Instead of doing it at commit time, do it right after getting the xdg toplevel surface such that clients can use it from the beginning. This now includes fullscreen, besides regular desktop roles, and it avoid mapping the fullscreen upon commit if the dimensions do not really match up. Bug-AGL: SPEC-4339 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7185b10770c69d1d6572b0bc025c4a58fe431c67
2022-04-29layout: Do perform a view update transform when unmappedMarius Vlad1-0/+2
We should always perform a view update transformed when the view is not mapped -- or better said when mapping the view. Found while investigating some certain bevahiours related to surfaces not being activated by default. While a dirty+surface damage is sufficient when adding views to layers, on mapping we should also perform an transform update of the view. Bug-AGL: SPEC-4302 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ia8e8ed2c4cc165e7fd371a474d85b5fe38bd87fa
2022-04-29layout: Make the view mapped at activation completionMarius Vlad1-3/+1
Instead of tagging it various places just do it a completion phase. Makes things a bit easier to follow/read. Bug-AGL: SPEC-4302 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I91ad6b29a786c4c78afa8ff07d104008be7bcb84
2022-04-29compositor: Rename activated_by_default to mappedMarius Vlad3-15/+15
This variable is about surface being displayed, rather than being activatred so use mapped to better reflect that. It also makes things easier to keep track per surface about surfaces being activated by default or not. No functional change whatsoever. Bug-AGL: SPEC-4302 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ib0c508dff3eef593d86f259b55ff4e7087313a69
2022-03-29Weston 10.0 compatibility changesScott Murray2-3/+3
Changes: - Bump libweston dependencies in meson.build. - Handle addition of another argument to the wet_main and weston_compositor_create functions. Bug-AGL: SPEC-3819 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2022-03-29Weston 9.0 compatibility changesScott Murray1-18/+16
Changes: - Bump libweston dependencies in meson.build - Match weston_compositor_tear_down -> weston_compositor_destroy API change by following what was done in weston for 9.0 - Update log context code to match API changes, based on what was done in weston for 9.0 - Update transform names to match weston - Initialize a couple of structure fields to avoid failure from -Werror=missing-field-initializers triggered by changes in newer wayland. Bug-AGL: SPEC-3819 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I48fab590eb59a1b83b0cebc3762ba730450b0e3a
2022-03-17Remove the listener in the end of ivi_shell_destroy()duerpei1-0/+1
Bug-AGL: SPEC-4291 Signed-off-by: duerpei <duep.fnst@fujitsu.com> Change-Id: Ieaa78e59365c8749754117cf2587b4c72e1f1f31
2022-03-15Fix potential memory leak in agl-compositorduerpei1-2/+8
wet_main->parse_options-> .... ->strdup ->malloc "config_file" memory is not released "log"memory is not released When agl-compositor startup parameters contain socket and modules, the memory of socket_name and option_modules also needs to be released. So these two pointers are also released. Bug-AGL: SPEC-4270 Signed-off-by: duerpei <duep.fnst@fujitsu.com> Change-Id: I0d74b92187a0779610f32e75b33ab4fca10329a5
2022-03-02layout: Address all other callsites w/ dirty+surface damagemarlin_12.93.0marlin/12.93.012.93.0Marius Vlad1-10/+13
This is just a missing left-over 'layout: Inflict damage on all subsurfaces'. As we have different paths for other types of surface roles, address them as well. Bug-AGL: SPEC-4262 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I2b68bf986ad694b0e31396edc24c54cf1dc4d834
2022-03-02layout: Inflict surface damageMarius Vlad1-2/+1
Commit 'layout: Remove explicit damage call' re-done the way we've handled additions to the layer, removing any damage infliction to either the plane where to view is visible. While marking the view as dirty (and with it any other children to the that view), we still to tell the compositor that the view being added, has suffered changes. Bug-AGL: SPEC-4262 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: If3033df36943fb466302e7907bd38f9a0703d49b
2022-03-02layout: Remove left-over commentMarius Vlad1-2/+0
Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iba0cab61d20d8c92f6e179e25388c66a7d0e41f3
2022-02-23Fix potential memory leakduerpei1-0/+1
Bug-AGL:SPEC-4257 Signed-off-by: duerpei <duep.fnst@fujitsu.com> Change-Id: I0effc97710d9bf93f5044e22400e9ff6699a4309
2022-01-20Fix potential memory leakRongrong Yuan1-0/+5
Bug-AGL: SPEC-4221 Signed-off-by: Rongrong Yuan <yuanrr.fnst@fujitsu.com> Change-Id: I30634977a3b899647a5f2faad2c70db39e97d09e
2021-12-22agl-compositor: Add NULL check after creating surface/viewAndyZhou1-2/+6
Add a check to verify if both the surface/view was created successfully in function create_black_surface_view of src/shell.c file. Bug-AGL: SPEC-4193 Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com> Change-Id: I69c6a6023c8b7a3b6e376f3cba25020a851648ab
2021-12-22agl-compositor:Add NULL check after zalloc in src directorymarlin_12.91.0marlin/12.91.012.91.0AndyZhou3-4/+72
There's no NULL check in zalloc. Add a NULL check after zalloc. And add memory free before return error. Bug-AGL: SPEC-4178 Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com> Change-Id: Ic0e0e2007b2897a451507aed100ad01b65695383
2021-12-16layout: Remove explicit damage callMarius Vlad1-3/+2
As we will be marking all the views dirty, weston_output_repaint() should pick-up correctly any inflicted damage, and perform an implicit redraw without the need for an explict to call to weston_view_below_damage(). Note that we still need to schedule a repaint for that particular view. While at it, also remove an explicit call to weston_view_update_transform() which is going to be handled internally as well, when rebuilding the view list by libweston. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ic701daebe69613b3dcc8eef96cac05c1b803327a
2021-12-16layout: Inflict damage on all subsurfacesMarius Vlad1-0/+1
As it has been seen with the camera-gstreamer application, when switching back and forth between various other application and camera-gstreamer we'll get artefacts/black surface as a result that we're only adding damage to the main parent surface. Bug-AGL: SPEC-4145 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Idf49e6c9100d63f5a5c63c34bfc65e8641eba822
2021-12-10shell: Refactor pending surfaces for existing pending onesMarius Vlad1-18/+128
This patch refactors a bit the way we add pending surface roles, such that it updates to an existing surface, rather than create a new one with the same app_id. Bug-AGL: SPEC-4133 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ifd7477ea0f0840d6fd82bbc21216a7694d0efa8b
2021-12-10src/desktop: Add a compositor destroy listenerMarius Vlad3-1/+20
Tearing down the ivi compositor instance (the shell) requires listening for such an event and handle any potential destruction of surfaces. With it we use to destroying any pending surfaces might have been left. Bug-AGL: SPEC-4133 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I911c590409700374007673da680b7a76f69be1b2
2021-12-08src/shell: Add set_app_property_mode requestMarius Vlad2-5/+56
Bug-AGL: SPEC-4133 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iffc770e079788bb553077665169365dc7b2d901e
2021-11-09layout: Fix-up the positions when placing the pop-up/dialogMarius Vlad1-1/+15
Turns out we weren't accounting for the initial position (of the output) as to derive the correct positioning of thew view/surface. This uses the output x and y value and together with the values supplied by the user to result in correct placement. Bug-AGL: SPEC-4127 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I38f0bb9051d4650283cfa483936b121a6d136ca6
2021-11-05shell: Fix passing maximized state from the startMarius Vlad3-5/+60
We've added an optimization where we where sending to regular (desktop) surfaces from the beginning the maximized state, together with the size whenever the client signaled that it is ready to present. That optimization failed to take into account other potential roles, more importanly, the pop-op role which should not be getting any window state, and implicitly shouldn't be getting any surface dimensions, leaving it to the client to decide that. Patch checks all pending lists to make sure we're not skipping any on purpose. Bug-AGL: SPEC-4119 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I4f8c62af545c5955e7fa41c3fd73f52d6c73b600
2021-09-28meson.build: Conditionally build with headless supportMarius Vlad1-0/+10
This allow to build the compositor without headless support, just in case libweston wasn't built with it. Bug-AGL: SPEC-4087 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ie848d842ace06b21371de6f70ad18600927f8044
2021-08-26compositor: Do not allow vt-switching by defaultMarius Vlad1-1/+1
Users are still able to customize that behaviour by modifying configuration file. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id21b9cf5b486b8f124bfc128c139f8b706c16b45
2021-07-13compositor: Avoid loading systemd-notify plug-inMarius Vlad1-0/+8
This helps being compliant with the weston ini configuration file, and in the same time being able to load other necessary modules. Instead of creating a separate module for loading the systemd-notify do the same thing as xwayland and avoid any attempt of loading it if passed over the command line, or specified in the ini file. Bug-AGL: SPEC-4001 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I46018f2dff5599bb3acc7c7334e77437995d0588
2021-04-20main: Split of main() from wet_main()marlin_12.90.0marlin/12.90.0lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.012.90.011.92.011.91.0sandbox/mvlad/pre-ciMarius Vlad2-1739/+1772
This is follow-up to catch up with weston's way of loading the compositor instance. This is necessary because the test itself is capable of loading a specific compositor instance (and with, specific arguments). No functional changes whatsoever. Bug-AGL: SPEC-3889, SPEC-3880 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iedb979156a73def4567927969ab9190c481ffbce