summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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-28meson.build: Don't set the dependency type for wayland-scannermarlin_12.92.0marlin/12.92.012.92.0Marius Vlad1-1/+1
meson (0.53) seem to be smart enough to resolve cross-compile dependencies without setting explicitly the dependency type. Setting the dependency as native results in ignoring PKG_CONFIG_PATH and using PATH to choose and alternative pkg-config. Sourcing the yocto/OE toolchain would result in picking the hosts pkg-config due to modified a PATH where SDKTARGETSYSROOT is before any of the hosts paths. Combined that with the fact that PKG_CONFIG_PATH is reset when the dependency is se to native (why that hapens is something to further investigate) results in not finding wayland-scanner. Tested with both yocto/OE toolchains and native (local) builds to make sure we can still build it and seems we're fine. Bug-AGL: SPEC-4169 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I5c4b12eff044aeb0c3ab4c18e943da4e15d6c411
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
2022-01-13client/screenshooter: Compute the width/height for a single outputMarius Vlad1-0/+2
We're missing determining the buffers dimenions, so this basically adds that. Turns out this was introduced w/ commit 'clients/screenshooter: Fix taking screenshot on multiple outputs'. Still clueless on how this worked in CI, unless we're using `-a' to take a screenshot on all outputs. Bug-AGL: SPEC-4217 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I9a849457e9ca40f0b36e7249d9142b32ca3114ab
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-21agl-compositor:Add NULL check after zalloc in screenshooter.cAndyZhou1-0/+2
There's no NULL check in zalloc. xdg_output is alloced by zalloc. Add a NULL check after zalloc and before use xdg_output. Bug-AGL: SPEC-4178 Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com> Change-Id: Idc2e3fd6be823c063a84868ba37b26ffe90db6fc
2021-12-20agl-compositor: Correct several spell issues in the protocol xml filesAndyZhou3-5/+5
There are several spell issues in the protocol xml files. Modify to correct them. Bug-AGL: SPEC-4174 Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com> Change-Id: I052a1cb4b1a0054305899a1d83e4be0fd9d03c2b
2021-12-17agl-compositor: Correct several spell or grammar issues in the README.md file.AndyZhou1-14/+14
There are several issues in the README.md file. Modify to correct them. Bug-AGL: SPEC-4154 Signed-off-by: AndyZhou <zhoumy@cn.fujitsu.com> Change-Id: I3a26692ba5257f99038262fdd1e45d87dd84da08
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-10meson.build: Bump compositor versionMarius Vlad1-4/+3
This bumps the compositor version to accomodate the protocol update well. Bug-AGL: SPEC-4133 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iea01e3e36ef9ebf1f90e3fb07bd9637d8d060ab2
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 Vlad3-6/+77
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: Add a waltham-transmitter pkg-config pc filemarlin_12.90.1marlin/12.90.112.90.1Marius Vlad1-1/+1
It would be of tremendous help to know when the transmitter plugin is really installed, to avoid assuming that the waltham library is enough. Bug-AGL: SPEC-4087 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I8c569fae641472fe9a2454a89fcf6da4f2a33ccc
2021-09-28meson.build: Conditionally build with headless supportMarius Vlad2-0/+19
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-09-28meson.build: Clarify out-of-tree build errorMarius Vlad1-5/+9
And with it remove libweston-X mentioning, as it applies to all libweston versions. Bug-AGL: SPEC-4087 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I47b37822204c3ce1397a6a5efc9e7ee6ce1e8e1b
2021-09-03clients/screenshooter: Fix taking screenshot on multiple outputsMarius Vlad1-18/+14
Turns out we were re-initializing the buffers min/max values each time for each output, thus not computing the entire combined output. This is a trivial fix. Bug-AGL: SPEC-4064 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ie0c7490c902273b42c81e09cd08e480f30a654c0
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-06-24meson.build: Install run-time shared library to a specific pathMarius Vlad1-0/+3
Use prefix_path + libdir to install the run-time shared library and avoid pulling lib with it. This is necessary to avoid installing under PREFIX/ and use PREFIX/agl-compositor instead. This was unfortunately missed when doing the split in a previous commit. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I02b2162f62cbdbf3d00f54edae52aa03c7b4b046
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 Vlad3-1743/+1792
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
2021-04-20main: Copy cmd line args and print themMarius Vlad1-2/+28
This makes it really easy to spot on what arguments have been passed to the compositor. When a test client will run the compositor this will be helpful to verify that we pass the correct arguments. Fixes a small typo along the way. Bug-AGL: SPEC-3880 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ia4198ce6bff465f479cf9a0a87c17998c5548868
2021-04-20main: Teach agl-compositor to load additional modulesMarius Vlad1-0/+52
Passing modules arguments to the compositor instance would be useful when using the testing framework/harness because that way the test itself can start-up. The idea here is that we would need to load-up a testing plug-in (either one from weston) or one written specifically for this. Bug-AGL: SPEC-3888 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ia5e688901fe11b1ab10feb3f5e2631a0f31707be
2021-04-20main: Add support for loading the headless-backendMarius Vlad1-0/+54
For making use of the testing framework/harness we should be able to load up the headless backend. This patch adds support for loading it. Bug-AGL: SPEC-3887 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I569ad3e562cd0a90094c6238ca02ed00e4106b10
2021-04-20meson.build: Do an release update before libweston9 integrationMarius Vlad1-2/+2
We haven't had an release for quite some time now so, do it now before the libweston9 integration. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I8202f88565a94e10cc5dc60fe2ec30cc1e8ee478
2021-04-19layout: Remove weston_output_damage dependecyMarius Vlad2-6/+4
Doing a damage_below for the view should be sufficient to trigger a repaint. This way we don't actually need it. Bug-AGL: SPEC-3641 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I90f4c4c13571f441b35f933f2b93aaff7efd3481
2021-04-08layout: Fix split role sending invalid dimensionsMarius Vlad1-6/+2
As we send from the beginning/start the size for the client, we'll be missing a checking when using split type of surfaces, which will result in invalid width/height passed to clients on configure events. Avoid using it entirely and assume for split roles to use half of the output by default. Bug-AGL: SPEC-3881 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ia9728c9401cdd1ae918229853ddf7393e14f6cb1
2021-03-11desktop: Tell clients to use current geometry area from startMarius Vlad1-0/+52
After the shell UI is started we can tell clients the available geometry area, and with it, they can avoid resizing to the surface size. Bug-AGL: SPEC-3839 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id30617dadc665d1ca202a505d98e70eed592e856
2021-03-11desktop: Send remove event only if output and app_id is setMarius Vlad1-2/+3
This will guard against clients do not have an application id, or they weren't activated at all. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iee58c0f54efdecce82ff07e0916ebef15f7f64d8
2021-02-17Notify about application destructionWalter Lozano2-2/+10
Currently agl-compositor notifies about application ids which can be activated/deactivated, as well as the application state. However, when an application is destroyed this information is not communicated to desktop making it out of sync with the actual list of available applications. To overcome this limitation extend the protocol and the logic to notify about application destruction on surface remove. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Change-Id: Ib766cf3f3fbd10f55b85212480dc4717ab1bec22
2021-02-04Allow unregistered applications in rbaAnusha Gugale3-4/+17
- To allow unregistered applications, set allow_unregistred_app=true in .ini file under core section of /etc/xdg/weston/weston.ini . Bug-AGL: SPEC-3738 Signed-off-by: Anusha Gugale <external.agogale@jp.adit-jv.com> Change-Id: Ic56564ea97900df0091d92a2dd4ed1bc7cb0559f
2021-01-26Use parameterized constructor of RBAArbitratorkoi_10.93.0koi/10.93.010.93.0Anusha Gugale1-2/+1
- To hide unnecessary internal interfaces from user, reconstructed public files of librba. At this time, default constructor has been removed. Bug-AGL: SPEC-3738 Signed-off-by: Anusha Gugale <external.agogale@jp.adit-jv.com> Change-Id: I957796861081c79df9018cac92bd06927952924d
2021-01-13doc/arch_diagram: Update architecture diagram with a small legendMarius Vlad2-83/+186
Trivial change to display which are API calls, which are Wayland ones. Bug-AGL: SPEC-3386 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I265e19baaa7437af4221a71378706661395b4445
2021-01-12Added rba policy implementationkoi_10.92.0koi/10.92.010.92.0Anusha Gugale5-2/+230
- Added rba-policy option in meson file - Created new rba adapter file to call rba interfaces from librba - All the application from Homescreen will be allowed to display through rba policy as its added in RBAModel.json Bug-AGL: SPEC-3738 Signed-off-by: Anusha Gugale <external.agogale@jp.adit-jv.com> Change-Id: Iffd4ac16d9abe768476d025556cbe98a31553288
2021-01-07meson.build: Fix building with cross SDKMarius Vlad1-2/+7
For some time now, yocto/OE no longer builds all weston back-ends, which means the X11 is no longer supported on AGL platform. The agl-compositor can be built, assuming all dependencies have been satisfied, without the need of having an AGL or yocto/OE environment, but so far, I've never tried using SDK directly. This patch should allow building the compositor, by only using the AGL SDK, and instead of using the local pkg-config, only use what is available in the SDK sysroot. This takes care of assuming that X11 back-end is available, when in reality, in the AGL SDK platform that is not the case. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ia2a182b9c3015f14f82043a04e83e917cd99bf6f
2021-01-06main: Add activate_by_default ini optionMarius Vlad3-0/+8
Displaying the application surface as soon as started required activating the surface by default. With this patch, we give the possibility to do it conditionally, as it helps CI with cases where we don't really want other applications change the active surface. With applications that start by default, this interferes with the ability to take a screenshot with just the background. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I6e826a6715b9a348181df80ed53ffaa6b65b7d2b
2020-11-19layout: Do not attempt to activate surfaces that doesn't have a valid app_idkoi_10.91.0koi/10.91.010.91.0Marius Vlad1-0/+6
Observed when trying to activate (a previous one, as a result of deactivation) a surface that didn't had an application id set. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I3c39ae7dfb237e53f4b2bad64e7bc5ef91a76f0c
2020-11-19shell: Throttle the log messageMarius Vlad1-1/+5
As libweston doesn't currently have a rate limiting the log message function, use a static variable to limit the amount of log message we might be seeing if application do not set-up an app_id. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I4fb3a5b7421a154d8da483b2ac577df7a60e09cc
2020-11-19build/: Allow to build the compositor w/o walthamMarius Vlad2-2/+15
Provides empty implementations to avoid sprinking ifdefs everywhere. The transmitter plug-in does not expose a pkgconfig file we instead resort to test again waltham protocol (which is used by the transmitter) and the the remoting plug-in. Fixes a minor deps check in the meson file. Bug-AGL: SPEC-3691 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id25d21d2ef0c6e55575c2e7685cda73e401db015
2020-11-18shell: Perform wl_list_init() after wl_list_remove()Walter Lozano1-0/+1
In order to follow the best practices perform wl_list_init() after wl_list_remove() on shell_ready. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Change-Id: Ia5ea915a5ad55e8251e3bc86c87ddfc140bbe592
2020-11-17desktop: Allow to remove surface from pending listWalter Lozano1-3/+2
In some special corner cases a surface can be removed while it is still in the pending list. An example of this case is when a surface is added and removed before the system is ready. Under this circumstances the surface still has role == ROLE_NONE and is in the pending list. The fact of not removing the surface from the pending_list ends in a segfault when the system is ready. In order to fix the issue, remove the restriction to only remove surfaces with role != ROLE_NONE. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Change-Id: Ia71b6c3ca214849448c935cc09039581d0e209a8
2020-11-17desktop: Do not attempt to advertise the clients if there are noneMarius Vlad1-1/+2
Clients not binding to agl_shell_desktop will cause spurious signal emits when they commit the changes. Make sure we only attempt to advertise if the are clients. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I5c790b105b7c7f7d759e8a8fc2c64713df22d561