Re: [PATCH weston 1/4] ivi-shell: change layer visibility to bool
Hi Emil, On 13 February 2018 at 16:37, Emil Velikov wrote: > The following two questions come to mind: > - app bugs - using threads? ivi-shell-user-interface.c mentions > pthread, but haven't looked closely Hm, I couldn't find any threading-related bugs at all: everything I found was clear just looking at the inter-process flows. Did you have anything in particular in mind? > - missing dependencies Again, did you have anything in particular in mind? Looking at the logs, it loads the exact same set of plugins/helpers/configs in both cases (working/broken). Dumping out /proc/self/smaps didn't show any discrepancies either. Everything was fresh and up-to-date: it's seems like it's only the test execution environment which influences this. > Having a look reveals: > - extremely convoluted test runner Sure. We had a few requirements which led to the runner being the way it was, mainly based on it being relatively easy to write tests, and assertion failures / segfaults not destroying the whole testsuite. Personally I like igt, and I guess others like gtest or maybe Piglit, but none of them are anything like simple. Do you have a good replacement in mind? (Whilst we're mentioning test runners and threads, I really wouldn't mind one which ran everything in threads rather than forking children.) > - dummy BACKEND variable - always headless-backend.so It's not a dummy: you can run 'make check BACKEND=foo-backend.so' as a developer, if you'd like to test a particular backend. Most of them are totally unsuitable for general-purpose use (e.g. wayland-backend or x11-backend will pop up a billion windows as it goes about its work, and that rapid de/focus can in fact break some tests), so we default to headless-backend for mere mortals. But it is there as an option for people who know what they're doing, or want to try tests in a different context. > - the --backend, --config, --shell and/or --modules file is not part > of the respective dependency chain The checks here are only run as part of the 'check' target; check depends on check-am, which in turn depends on the all-am target, which in turn depends on all libraries/programs/built-sources, which covers all of the items you've mentioned. Is there some subtlety I'm missing here? Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/4] ivi-shell: change layer visibility to bool
On 13 February 2018 at 15:11, Daniel Stone wrote: > Hi, > > On 13 February 2018 at 15:00, Pekka Paalanen wrote: >> On Thu, 8 Feb 2018 13:53:54 + >> "Ucan, Emre (ADITG/ESB)" wrote: >>> Yes I saw a similar problem when I tested previous ivi patches. >>> I run make clean & make & make check. Then it worked. >>> >>> Maybe it is releated to weston-tests-env changes from this commit: >>> https://cgit.freedesktop.org/wayland/weston/commit/?id=0707b0e5d48fa6f1ac41ea60c2adc2e6430c7425 >>> ? >> >> Daniel helped to pinpoint the cause of this failure. After the >> ivi-shell patches, we now get hmi-controller.so loaded when before it >> was not. Hmi-controller creates layers and surfaces, so it breaks tests >> that expect to be in complete control over the scene. >> >> When the controller plugins were changed to be loaded as normal weston >> plugins, the directive to load the test controller no longer overrode >> the weston-ivi.ini by default loading hmi-controller. Now they get >> loaded both, and hmi-controller init races to break the tests. >> >> Could you figure out a fix for this, please? >> >> I suppose adding a delay in the test client would make the test fail >> always, perhaps. > > I actually see the hmi-controller module being loaded in both good > (make -j8 check) and bad (make -j8 distcheck) setups. It looks like > the only difference is timing, both in terms of load and also > ordering. > > On a good run, surface_properties_changed_notification() and > surface_on_many_layer() come very early on, before > weston-ivi-shell-user-interface is ready (this appears to take > 700ms?). On a bad run, these are sequenced later. > ivi-shell-user-interface signalling ready will create a > surface-creation notification listener inside hmi-controller, which > will add surfaces to the application layer. This causes > surface_properties_changed_notification() to fail, as the layer > addition has dirtied the surface and caused > ivi_layout_commit_changes() to generate a notification for this. It > also causes surface_on_many_layer() to fail, as it is on the three > test layers as well as the ivi-shell-user-interface application layer. > The following two questions come to mind: - app bugs - using threads? ivi-shell-user-interface.c mentions pthread, but haven't looked closely - missing dependencies Having a look reveals: - extremely convoluted test runner - dummy BACKEND variable - always headless-backend.so - the --backend, --config, --shell and/or --modules file is not part of the respective dependency chain Please take the above with a pinch of salt. HTH Emil ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH libinput] evdev: fail before open_restricted if the devnode doesn't exist
> + if (!devnode) { > + log_info(libinput, "%s: no device node associated\n", > sysname); > + return NULL; > + } > + > if (udev_device_should_be_ignored(udev_device)) { > log_debug(libinput, "%s: device is ignored\n", sysname); > return NULL; As long as you are intentionally wanting this reported even if the device "should be ignored", then it LGTM. > + if (devnode == NULL) > + return -ENODEV; > + Checking (!devnode) would be better as it matches the other change, and in evdev.c implicit NULL comparison is much more common than explicit NULL comparison. AFAICT, the return value from evdev_device_resume is never checked, so it seems that this may be a good place for a log message too. Would it be noisy? If so, maybe a log_debug would be enough. -- Jeff ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/4] ivi-shell: change layer visibility to bool
On Tue, 13 Feb 2018 15:11:19 + Daniel Stone wrote: > Hi, > > On 13 February 2018 at 15:00, Pekka Paalanen wrote: > > On Thu, 8 Feb 2018 13:53:54 + > > "Ucan, Emre (ADITG/ESB)" wrote: > >> Yes I saw a similar problem when I tested previous ivi patches. > >> I run make clean & make & make check. Then it worked. > >> > >> Maybe it is releated to weston-tests-env changes from this commit: > >> https://cgit.freedesktop.org/wayland/weston/commit/?id=0707b0e5d48fa6f1ac41ea60c2adc2e6430c7425 > >> ? > > > > Daniel helped to pinpoint the cause of this failure. After the > > ivi-shell patches, we now get hmi-controller.so loaded when before it > > was not. Hmi-controller creates layers and surfaces, so it breaks tests > > that expect to be in complete control over the scene. > > > > When the controller plugins were changed to be loaded as normal weston > > plugins, the directive to load the test controller no longer overrode > > the weston-ivi.ini by default loading hmi-controller. Now they get > > loaded both, and hmi-controller init races to break the tests. > > > > Could you figure out a fix for this, please? > > > > I suppose adding a delay in the test client would make the test fail > > always, perhaps. > > I actually see the hmi-controller module being loaded in both good > (make -j8 check) and bad (make -j8 distcheck) setups. It looks like > the only difference is timing, both in terms of load and also > ordering. Yup, it is also a race: for hmi-controller to set up layers and stuff, it needs its helper client. The race is the helper client vs. everything else. :-) > On a good run, surface_properties_changed_notification() and > surface_on_many_layer() come very early on, before > weston-ivi-shell-user-interface is ready (this appears to take > 700ms?). On a bad run, these are sequenced later. That agrees with what I had expected. > ivi-shell-user-interface signalling ready will create a > surface-creation notification listener inside hmi-controller, which > will add surfaces to the application layer. This causes > surface_properties_changed_notification() to fail, as the layer > addition has dirtied the surface and caused > ivi_layout_commit_changes() to generate a notification for this. It > also causes surface_on_many_layer() to fail, as it is on the three > test layers as well as the ivi-shell-user-interface application layer. Much appreciated for digging into it. Thanks, pq pgp2xde7ExllQ.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable
Hi Pekka, On 13 February 2018 at 14:21, Pekka Paalanen wrote: > /home/pq/git/weston/desktop-shell/shell.c: In function > ‘shell_output_destroy_move_layer’: > /home/pq/git/weston/desktop-shell/shell.c:4718:24: warning: unused variable > ‘output’ [-Wunused-variable] > struct weston_output *output = data; > > Since the data pointer is not used for anything, decided to also set it > to NULL in the caller. This caused another variable to become unused. I just noticed that earlier whilst having fun with distcheck. Thanks for that. Reviewed-by: Daniel Stone Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
RE: [PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable
Thanks for spotting this. Reviewed-by: Marius-Vlad -Original Message- From: wayland-devel [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka Paalanen Sent: Tuesday, February 13, 2018 4:22 PM To: wayland-devel@lists.freedesktop.org Cc: Pekka Paalanen Subject: [PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable From: Pekka Paalanen /home/pq/git/weston/desktop-shell/shell.c: In function ‘shell_output_destroy_move_layer’: /home/pq/git/weston/desktop-shell/shell.c:4718:24: warning: unused variable ‘output’ [-Wunused-variable] struct weston_output *output = data; Since the data pointer is not used for anything, decided to also set it to NULL in the caller. This caused another variable to become unused. Signed-off-by: Pekka Paalanen --- desktop-shell/shell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 1c35d18a..ceb45c74 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4715,7 +4715,6 @@ shell_output_destroy_move_layer(struct desktop_shell *shell, struct weston_layer *layer, void *data) { - struct weston_output *output = data; struct weston_view *view; wl_list_for_each(view, &layer->view_list.link, layer_link.link) @@ -4727,10 +4726,9 @@ handle_output_destroy(struct wl_listener *listener, void *data) { struct shell_output *output_listener = container_of(listener, struct shell_output, destroy_listener); - struct weston_output *output = output_listener->output; struct desktop_shell *shell = output_listener->shell; - shell_for_each_layer(shell, shell_output_destroy_move_layer, output); + shell_for_each_layer(shell, shell_output_destroy_move_layer, NULL); if (output_listener->panel_surface) wl_list_remove(&output_listener->panel_surface_listener.link); -- 2.13.6 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fwayland-devel&data=02%7C01%7Cmarius-cristian.vlad%40nxp.com%7Cd904556c45e9356a08d572ed2530%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636541285220933551&sdata=d3nvfNMxsx48ty4mqVkoahmkc9WlSelxbcWa1EkTT3M%3D&reserved=0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] libweston-desktop/xdg-shell-v5: Drop xdg-shell v5 support
On 2018-02-13 08:20 AM, Alexandros Frantzis wrote: Drop support for the obsolete xdg-shell v5 protocol. This clears the path to properly support xdg-shell stable, since xdg-shell stable and xdg-shell v5 can't currently co-exist in the same compositor, as both define structures with the same name (such as struct xdg_surface_interface). Signed-off-by: Alexandros Frantzis Looks right to me, Reviewed-by: Derek Foreman Daniel gave an ack on irc... Do we want to land this immediately? Thanks, Derek --- Makefile.am | 6 +- libweston-desktop/internal.h | 3 - libweston-desktop/libweston-desktop.c | 10 - libweston-desktop/xdg-shell-v5.c | 911 -- 4 files changed, 1 insertion(+), 929 deletions(-) delete mode 100644 libweston-desktop/xdg-shell-v5.c diff --git a/Makefile.am b/Makefile.am index 32c9a0f2..189e7d8a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -132,19 +132,15 @@ libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \ libweston-desktop/surface.c \ libweston-desktop/wl-shell.c\ libweston-desktop/xdg-shell-v6.c\ - libweston-desktop/xdg-shell-v5.c\ libweston-desktop/xwayland.c nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \ protocol/xdg-shell-unstable-v6-protocol.c \ - protocol/xdg-shell-unstable-v6-server-protocol.h\ - protocol/xdg-shell-unstable-v5-protocol.c \ - protocol/xdg-shell-unstable-v5-server-protocol.h + protocol/xdg-shell-unstable-v6-server-protocol.h BUILT_SOURCES += $(nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES) libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v6.lo: protocol/xdg-shell-unstable-v6-server-protocol.h -libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v5.lo: protocol/xdg-shell-unstable-v5-server-protocol.h if SYSTEMD_NOTIFY_SUPPORT module_LTLIBRARIES += systemd-notify.la diff --git a/libweston-desktop/internal.h b/libweston-desktop/internal.h index 763355bf..564f7b3c 100644 --- a/libweston-desktop/internal.h +++ b/libweston-desktop/internal.h @@ -230,9 +230,6 @@ struct wl_global * weston_desktop_xdg_shell_v6_create(struct weston_desktop *desktop, struct wl_display *display); struct wl_global * -weston_desktop_xdg_shell_v5_create(struct weston_desktop *desktop, - struct wl_display *display); -struct wl_global * weston_desktop_wl_shell_create(struct weston_desktop *desktop, struct wl_display *display); void diff --git a/libweston-desktop/libweston-desktop.c b/libweston-desktop/libweston-desktop.c index 48e90009..c840a8a9 100644 --- a/libweston-desktop/libweston-desktop.c +++ b/libweston-desktop/libweston-desktop.c @@ -41,7 +41,6 @@ struct weston_desktop { struct weston_desktop_api api; void *user_data; struct wl_global *xdg_shell_v6; - struct wl_global *xdg_shell_v5; struct wl_global *wl_shell; }; @@ -77,13 +76,6 @@ weston_desktop_create(struct weston_compositor *compositor, return NULL; } - desktop->xdg_shell_v5 = - weston_desktop_xdg_shell_v5_create(desktop, display); - if (desktop->xdg_shell_v5 == NULL) { - weston_desktop_destroy(desktop); - return NULL; - } - desktop->wl_shell = weston_desktop_wl_shell_create(desktop, display); if (desktop->wl_shell == NULL) { @@ -104,8 +96,6 @@ weston_desktop_destroy(struct weston_desktop *desktop) if (desktop->wl_shell != NULL) wl_global_destroy(desktop->wl_shell); - if (desktop->xdg_shell_v5 != NULL) - wl_global_destroy(desktop->xdg_shell_v5); if (desktop->xdg_shell_v6 != NULL) wl_global_destroy(desktop->xdg_shell_v6); diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c deleted file mode 100644 index ebe7940e.. --- a/libweston-desktop/xdg-shell-v5.c +++ /dev/null @@ -1,911 +0,0 @@ -/* - * Copyright © 2010-2012 Intel Corporation - * Copyright © 2011-2012 Collabora, Ltd. - * Copyright © 2013 Raspberry Pi Foundation - * Copyright © 2016 Quentin "Sardem FF7" Glidic - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice an
RE: [PATCH weston 1/4] ivi-shell: change layer visibility to bool
Hi Pekka, I will check. Best regards Emre Ucan Engineering Software Base (ADITG/ESB) Tel. +49 5121 49 6937 > -Original Message- > From: Pekka Paalanen [mailto:ppaala...@gmail.com] > Sent: Dienstag, 13. Februar 2018 16:01 > To: Ucan, Emre (ADITG/ESB) > Cc: wayland-devel@lists.freedesktop.org; Daniel Stone > Subject: Re: [PATCH weston 1/4] ivi-shell: change layer visibility to bool > > On Thu, 8 Feb 2018 13:53:54 + > "Ucan, Emre (ADITG/ESB)" wrote: > > > Hi Pekka, > > > > Yes I saw a similar problem when I tested previous ivi patches. > > I run make clean & make & make check. Then it worked. > > > > Maybe it is releated to weston-tests-env changes from this commit: > > > https://cgit.freedesktop.org/wayland/weston/commit/?id=0707b0e5d48fa6f > 1ac41ea60c2adc2e6430c7425 ? > > Hi Emre, > > Daniel helped to pinpoint the cause of this failure. After the > ivi-shell patches, we now get hmi-controller.so loaded when before it > was not. Hmi-controller creates layers and surfaces, so it breaks tests > that expect to be in complete control over the scene. > > When the controller plugins were changed to be loaded as normal weston > plugins, the directive to load the test controller no longer overrode > the weston-ivi.ini by default loading hmi-controller. Now they get > loaded both, and hmi-controller init races to break the tests. > > Could you figure out a fix for this, please? > > I suppose adding a delay in the test client would make the test fail > always, perhaps. > > > Thanks, > pq ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/4] ivi-shell: change layer visibility to bool
Hi, On 13 February 2018 at 15:00, Pekka Paalanen wrote: > On Thu, 8 Feb 2018 13:53:54 + > "Ucan, Emre (ADITG/ESB)" wrote: >> Yes I saw a similar problem when I tested previous ivi patches. >> I run make clean & make & make check. Then it worked. >> >> Maybe it is releated to weston-tests-env changes from this commit: >> https://cgit.freedesktop.org/wayland/weston/commit/?id=0707b0e5d48fa6f1ac41ea60c2adc2e6430c7425 >> ? > > Daniel helped to pinpoint the cause of this failure. After the > ivi-shell patches, we now get hmi-controller.so loaded when before it > was not. Hmi-controller creates layers and surfaces, so it breaks tests > that expect to be in complete control over the scene. > > When the controller plugins were changed to be loaded as normal weston > plugins, the directive to load the test controller no longer overrode > the weston-ivi.ini by default loading hmi-controller. Now they get > loaded both, and hmi-controller init races to break the tests. > > Could you figure out a fix for this, please? > > I suppose adding a delay in the test client would make the test fail > always, perhaps. I actually see the hmi-controller module being loaded in both good (make -j8 check) and bad (make -j8 distcheck) setups. It looks like the only difference is timing, both in terms of load and also ordering. On a good run, surface_properties_changed_notification() and surface_on_many_layer() come very early on, before weston-ivi-shell-user-interface is ready (this appears to take 700ms?). On a bad run, these are sequenced later. ivi-shell-user-interface signalling ready will create a surface-creation notification listener inside hmi-controller, which will add surfaces to the application layer. This causes surface_properties_changed_notification() to fail, as the layer addition has dirtied the surface and caused ivi_layout_commit_changes() to generate a notification for this. It also causes surface_on_many_layer() to fail, as it is on the three test layers as well as the ivi-shell-user-interface application layer. Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/4] ivi-shell: change layer visibility to bool
On Thu, 8 Feb 2018 13:53:54 + "Ucan, Emre (ADITG/ESB)" wrote: > Hi Pekka, > > Yes I saw a similar problem when I tested previous ivi patches. > I run make clean & make & make check. Then it worked. > > Maybe it is releated to weston-tests-env changes from this commit: > https://cgit.freedesktop.org/wayland/weston/commit/?id=0707b0e5d48fa6f1ac41ea60c2adc2e6430c7425 > ? Hi Emre, Daniel helped to pinpoint the cause of this failure. After the ivi-shell patches, we now get hmi-controller.so loaded when before it was not. Hmi-controller creates layers and surfaces, so it breaks tests that expect to be in complete control over the scene. When the controller plugins were changed to be loaded as normal weston plugins, the directive to load the test controller no longer overrode the weston-ivi.ini by default loading hmi-controller. Now they get loaded both, and hmi-controller init races to break the tests. Could you figure out a fix for this, please? I suppose adding a delay in the test client would make the test fail always, perhaps. Thanks, pq pgp2ksmK1_D7b.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable
From: Pekka Paalanen /home/pq/git/weston/desktop-shell/shell.c: In function ‘shell_output_destroy_move_layer’: /home/pq/git/weston/desktop-shell/shell.c:4718:24: warning: unused variable ‘output’ [-Wunused-variable] struct weston_output *output = data; Since the data pointer is not used for anything, decided to also set it to NULL in the caller. This caused another variable to become unused. Signed-off-by: Pekka Paalanen --- desktop-shell/shell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 1c35d18a..ceb45c74 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4715,7 +4715,6 @@ shell_output_destroy_move_layer(struct desktop_shell *shell, struct weston_layer *layer, void *data) { - struct weston_output *output = data; struct weston_view *view; wl_list_for_each(view, &layer->view_list.link, layer_link.link) @@ -4727,10 +4726,9 @@ handle_output_destroy(struct wl_listener *listener, void *data) { struct shell_output *output_listener = container_of(listener, struct shell_output, destroy_listener); - struct weston_output *output = output_listener->output; struct desktop_shell *shell = output_listener->shell; - shell_for_each_layer(shell, shell_output_destroy_move_layer, output); + shell_for_each_layer(shell, shell_output_destroy_move_layer, NULL); if (output_listener->panel_surface) wl_list_remove(&output_listener->panel_surface_listener.link); -- 2.13.6 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston] libweston-desktop/xdg-shell-v5: Drop xdg-shell v5 support
Drop support for the obsolete xdg-shell v5 protocol. This clears the path to properly support xdg-shell stable, since xdg-shell stable and xdg-shell v5 can't currently co-exist in the same compositor, as both define structures with the same name (such as struct xdg_surface_interface). Signed-off-by: Alexandros Frantzis --- Makefile.am | 6 +- libweston-desktop/internal.h | 3 - libweston-desktop/libweston-desktop.c | 10 - libweston-desktop/xdg-shell-v5.c | 911 -- 4 files changed, 1 insertion(+), 929 deletions(-) delete mode 100644 libweston-desktop/xdg-shell-v5.c diff --git a/Makefile.am b/Makefile.am index 32c9a0f2..189e7d8a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -132,19 +132,15 @@ libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES = \ libweston-desktop/surface.c \ libweston-desktop/wl-shell.c\ libweston-desktop/xdg-shell-v6.c\ - libweston-desktop/xdg-shell-v5.c\ libweston-desktop/xwayland.c nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES =\ protocol/xdg-shell-unstable-v6-protocol.c \ - protocol/xdg-shell-unstable-v6-server-protocol.h\ - protocol/xdg-shell-unstable-v5-protocol.c \ - protocol/xdg-shell-unstable-v5-server-protocol.h + protocol/xdg-shell-unstable-v6-server-protocol.h BUILT_SOURCES += $(nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES) libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v6.lo: protocol/xdg-shell-unstable-v6-server-protocol.h -libweston-desktop-@LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_@LIBWESTON_MAJOR@_la-xdg-shell-v5.lo: protocol/xdg-shell-unstable-v5-server-protocol.h if SYSTEMD_NOTIFY_SUPPORT module_LTLIBRARIES += systemd-notify.la diff --git a/libweston-desktop/internal.h b/libweston-desktop/internal.h index 763355bf..564f7b3c 100644 --- a/libweston-desktop/internal.h +++ b/libweston-desktop/internal.h @@ -230,9 +230,6 @@ struct wl_global * weston_desktop_xdg_shell_v6_create(struct weston_desktop *desktop, struct wl_display *display); struct wl_global * -weston_desktop_xdg_shell_v5_create(struct weston_desktop *desktop, - struct wl_display *display); -struct wl_global * weston_desktop_wl_shell_create(struct weston_desktop *desktop, struct wl_display *display); void diff --git a/libweston-desktop/libweston-desktop.c b/libweston-desktop/libweston-desktop.c index 48e90009..c840a8a9 100644 --- a/libweston-desktop/libweston-desktop.c +++ b/libweston-desktop/libweston-desktop.c @@ -41,7 +41,6 @@ struct weston_desktop { struct weston_desktop_api api; void *user_data; struct wl_global *xdg_shell_v6; - struct wl_global *xdg_shell_v5; struct wl_global *wl_shell; }; @@ -77,13 +76,6 @@ weston_desktop_create(struct weston_compositor *compositor, return NULL; } - desktop->xdg_shell_v5 = - weston_desktop_xdg_shell_v5_create(desktop, display); - if (desktop->xdg_shell_v5 == NULL) { - weston_desktop_destroy(desktop); - return NULL; - } - desktop->wl_shell = weston_desktop_wl_shell_create(desktop, display); if (desktop->wl_shell == NULL) { @@ -104,8 +96,6 @@ weston_desktop_destroy(struct weston_desktop *desktop) if (desktop->wl_shell != NULL) wl_global_destroy(desktop->wl_shell); - if (desktop->xdg_shell_v5 != NULL) - wl_global_destroy(desktop->xdg_shell_v5); if (desktop->xdg_shell_v6 != NULL) wl_global_destroy(desktop->xdg_shell_v6); diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c deleted file mode 100644 index ebe7940e.. --- a/libweston-desktop/xdg-shell-v5.c +++ /dev/null @@ -1,911 +0,0 @@ -/* - * Copyright © 2010-2012 Intel Corporation - * Copyright © 2011-2012 Collabora, Ltd. - * Copyright © 2013 Raspberry Pi Foundation - * Copyright © 2016 Quentin "Sardem FF7" Glidic - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARR
Re: [PATCH wayland 1/4] scanner: use c99 initializers for the wl_interface * array
Hi Emil, Discussing the scanner symbol visibility patch made me realise that I never replied here. On 15 September 2017 at 15:39, Pekka Paalanen wrote: > On Wed, 30 Aug 2017 16:33:15 +0100 Emil Velikov > wrote: >> Allows us to remove the explicit NULL init, keeping the list shorter and >> easier to read. > > looks like all of these patches change the scanner output in some way, > but none of them fix the corresponding tests. You'll see it if you run > 'make check'. We expect scanner patches to fix the expected test output > data in the same go, so that the tests keep on passing. The reason for > this is that we can see immediately from the patch itself how it > changes the scanner output without having to manually diff to verify. > > It's easy to fix: run 'make check' and copy the actual output over the > expected output and git-add. Ensure 'make check' now succeeds. The > paths are in tests/scanner-test.sh.log. This would definitely need fixing before we could do anything. But that being said, my worry is that we don't actually control the compilation environment for the scanner output. Scanner output currently compiles with '-pedantic -ansi -Wall -Wextra' (at least, when inline is defined). This patch changes that requirement, and I worry that - like previous discussions on changing scanner output - that upgrading Wayland would lead to people hitting compilation failures. Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 3/7] libweston: Make weston_seat release safe
On 2/13/18 11:58 AM, Pekka Paalanen wrote: On Thu, 8 Feb 2018 15:37:54 +0200 Alexandros Frantzis wrote: Ensure the server can safely handle client requests for wl_seat resource that have become inert due to weston_seat object release and subsequent destruction. The clean-up involves, among other things, unsetting the destroyed weston_seat object from the user data of wl_seat resources, and handling this NULL user data case where required. The list of sites extracting and using weston_seat object from wl_seat resources which were audited for this patch are: Legend: N/A = Not Applicable (not implemented by weston) FIXED = Fixed in the commit OK = Already works correctly == keyboard_shortcuts_inhibit_unstable_v1 == [N/A] zwp_keyboard_shortcuts_inhibit_manager_v1.inhibit_shortcuts == tablet_input_unstable_v{1,2} == [N/A] zwp_tablet_manager_v{1,2}.get_tablet_seat == text_input_unstable_v1 == [FIXED] zwp_text_input_v1.activate [FIXED] zwp_text_input_v1.deactivate == wl_data_device == [FIXED] wl_data_device_manager.get_data_device [OK] wl_data_device.start_drag [FIXED] wl_data_device.set_selection [OK] wl_data_device.release == wl_shell == [FIXED] wl_shell_surface.move [FIXED] wl_shell_surface.resize [FIXED] wl_shell_surface.set_popup == xdg_shell and xdg_shell_unstable_v6 == [FIXED] xdg_toplevel.show_window_menu [FIXED] xdg_toplevel.move [FIXED] xdg_toplevel.resize [FIXED] xdg_popup.grab == xdg_shell_unstable_v5 == [FIXED] xdg_shell.get_xdg_popup [FIXED] xdg_surface.show_window_menu [FIXED] xdg_surface.move [FIXED] xdg_surface.resize Signed-off-by: Alexandros Frantzis --- Changes in v2: - Properly create inert resources in seat_get_pointer/touch/keyboard. - Ensure all sites which have a wl_seat input resource can deal with inert resources. compositor/text-backend.c| 8 -- libweston-desktop/wl-shell.c | 12 +++- libweston-desktop/xdg-shell-v5.c | 16 ++- libweston-desktop/xdg-shell-v6.c | 18 +++- libweston/data-device.c | 15 ++ libweston/input.c| 61 6 files changed, 102 insertions(+), 28 deletions(-) Hi Alf, awesome work! The changes look good to me, however I did not review the libweston-desktop bits yet. I'm hoping Quentin would take a look at those. Therefore, apart from libweston-desktop bits, this patch is: Reviewed-by: Pekka Paalanen Thanks, pq diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c index 66553f45..3386d48b 100644 --- a/libweston-desktop/wl-shell.c +++ b/libweston-desktop/wl-shell.c @@ -220,6 +220,9 @@ weston_desktop_wl_shell_surface_protocol_move(struct wl_client *wl_client, struct weston_desktop_wl_shell_surface *surface = weston_desktop_surface_get_implementation_data(dsurface); + if (seat == NULL) + return; + weston_desktop_api_move(surface->desktop, dsurface, seat, serial); } @@ -238,6 +241,9 @@ weston_desktop_wl_shell_surface_protocol_resize(struct wl_client *wl_client, enum weston_desktop_surface_edge surf_edges = (enum weston_desktop_surface_edge) edges; + if (seat == NULL) + return; + weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, surf_edges); } @@ -321,13 +327,17 @@ weston_desktop_wl_shell_surface_protocol_set_popup(struct wl_client *wl_client, struct weston_desktop_surface *dsurface = wl_resource_get_user_data(resource); struct weston_seat *wseat = wl_resource_get_user_data(seat_resource); - struct weston_desktop_seat *seat = weston_desktop_seat_from_seat(wseat); + struct weston_desktop_seat *seat; struct weston_surface *parent = wl_resource_get_user_data(parent_resource); struct weston_desktop_surface *parent_surface; struct weston_desktop_wl_shell_surface *surface = weston_desktop_surface_get_implementation_data(dsurface); + if (wseat == NULL) + return; See comment on v6. + + seat = weston_desktop_seat_from_seat(wseat); if (seat == NULL) { wl_client_post_no_memory(wl_client); return; diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c index ebe7940e..ac3de78a 100644 --- a/libweston-desktop/xdg-shell-v5.c +++ b/libweston-desktop/xdg-shell-v5.c @@ -421,6 +421,9 @@ weston_desktop_xdg_surface_protocol_show_window_menu(struct wl_client *wl_client struct weston_desktop_xdg_surface *surface = weston_desktop_surface_get_implementation_data(dsurface); + if (seat == NULL) + return; + weston_desktop_xdg_surface_ensure_added(surface); weston_desktop_api_show_window_menu(surface->desktop, dsurface, seat, x, y); } @@ -438,6 +441,9 @@ weston_desktop_xdg_surface_protocol_move(struct wl_client *wl_client, struct weston_desktop_xdg_
Re: [PATCH weston v2 0/7] libweston: Make input object destruction safe
Hi Alexandros, On 8 February 2018 at 13:37, Alexandros Frantzis wrote: > When a weston seat or input object is destroyed, any associated client > resources should become inert and put in a state in which they can > safely handle client requests. Currently, client requests to such > resources may lead to crashes and/or memory errors in the server. > > This patchset aims to fix (or at least greatly improve) the situation. Thanks for finally taking care of this! I took a look yesterday evening, and though I also can't speak authoritatively for the desktop-shell changes, I looked enough to give the series: Reviewed-by: Daniel Stone It would be good to get this in before the release, unless Quentin has any objections. Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 7/7] tests: Add test for seat destruction and creation
On Thu, 8 Feb 2018 15:37:58 +0200 Alexandros Frantzis wrote: > Add a test to check that we can destroy and create the test seat. Since > after test seat destruction the test client releases any associated > input resources, this test also checks that libweston properly handles > release requests for inert input resources. > > Signed-off-by: Alexandros Frantzis > --- > Changes in v2: > - Add assertions for client->input state. > > tests/devices-test.c | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/tests/devices-test.c b/tests/devices-test.c > index a6ec6eaf..147a2791 100644 > --- a/tests/devices-test.c > +++ b/tests/devices-test.c > @@ -322,3 +322,25 @@ TEST(seats_have_names) > assert(input->seat_name); > } > } > + > +TEST(seat_destroy_and_recreate) > +{ > + struct client *cl = create_client_and_test_surface(100, 100, 100, 100); > + > + weston_test_device_release(cl->test->weston_test, "seat"); > + /* Roundtrip to receive and handle the seat global removal event */ > + client_roundtrip(cl); > + > + assert(!cl->input); > + > + weston_test_device_add(cl->test->weston_test, "seat"); > + /* First roundtrip to send request and receive new seat global */ > + client_roundtrip(cl); > + /* Second roundtrip to handle seat events and set up input devices */ > + client_roundtrip(cl); > + > + assert(cl->input); > + assert(cl->input->pointer); > + assert(cl->input->keyboard); > + assert(cl->input->touch); > +} Reviewed-by: Pekka Paalanen Thanks, pq pgpKH9Ewv2fok.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 6/7] tests: Run devices tests using the test desktop shell
On Thu, 8 Feb 2018 15:37:57 +0200 Alexandros Frantzis wrote: > Use the weston-test-desktop-shell to run the devices tests, instead of > the currently used desktop-shell. The test desktop shell doesn't > interact with temporary globals (e.g. wl_seat), thus avoiding an > inherent race in the current wayland protocol when removing globals. > This will allow us to safely add tests which add/remove such globals in > upcoming commits. > > Signed-off-by: Alexandros Frantzis > --- > Changes in v2: > - New in v2. > > tests/devices-test.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tests/devices-test.c b/tests/devices-test.c > index ce1cea3b..a6ec6eaf 100644 > --- a/tests/devices-test.c > +++ b/tests/devices-test.c > @@ -40,6 +40,8 @@ > WL_SEAT_CAPABILITY_POINTER |\ > WL_SEAT_CAPABILITY_TOUCH) > > +char *server_parameters = "--shell=weston-test-desktop-shell.so"; > + > /* simply test if weston sends the right capabilities when > * some devices are removed */ > TEST(seat_capabilities_test) Reviewed-by: Pekka Paalanen Thanks, pq pgpA8mRw97Xki.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 5/7] tests: Support setting the test client input dynamically
On Thu, 8 Feb 2018 15:37:56 +0200 Alexandros Frantzis wrote: > The current test client code waits for all wl_seat globals to arrive > before checking them and deciding which one is the test seat global to > use for the input object. Test code that needs to add/remove test seats > would have to call the client_set_input() function for any seat changes > to take effect. Although we could allow this by making > client_set_input() public, we would be exposing unecessary > implementation details. > > This commit applies any seat changes immediately upon arrival of the > seat name, freeing test code from needing to call extra functions like > client_set_input(). To achieve this the call to input_data_devices() is > moved from client_set_input() to the seat name event handler. > > This commit also moves the check that all seats have names to an > explicit test. To support this test, inputs corresponding to non-test > seats are not destroyed (unless their seat global is removed), as > was previously the case. > > Signed-off-by: Alexandros Frantzis > --- > Changes in v2: > - Add explicit test for seat names. > - Don't destroy input objects for non-test seats unconditionally. > - Simplify devices handling in seat name handler. > > tests/devices-test.c | 10 ++ > tests/weston-test-client-helper.c | 33 ++--- > tests/weston-test-client-helper.h | 1 + > 3 files changed, 21 insertions(+), 23 deletions(-) Hi Alf, well done! This is much more clear than the previous version, and easy to review. Reviewed-by: Pekka Paalanen Thanks, pq pgpfCfCu6Mbjo.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 4/7] tests: Handle removal of seat global in test clients
On Thu, 8 Feb 2018 15:37:55 +0200 Alexandros Frantzis wrote: > The current test client code completely ignores removal of globals. > This commit updates the code to properly handle removal of globals in > general, and of seat globals in particular. This ensures that the test > client objects are in sync with the server and any relevant resources > are released accordingly. > > This update will be used by upcoming tests to check that seat removal > and re-addition is working properly. > > Signed-off-by: Alexandros Frantzis > --- > Changes in v2: > - Simplify input_destroy, no need to check for validity of wl_* objects. > > tests/weston-test-client-helper.c | 83 > ++- > tests/weston-test-client-helper.h | 1 + > 2 files changed, 75 insertions(+), 9 deletions(-) Reviewed-by: Pekka Paalanen Thanks, pq pgp3HcZN7K6VA.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 0/3 v2] DRM lease support
Hi all, On 13 February 2018 at 11:02, Marius-cristian Vlad wrote: > The sample client I've posted seems to be using the overlay plane. > Also, Daniel Stone confirmed a while back that they can be used. > > However it seems that page flipping on the overlay plane can not > be used if the connector is used in the same time (and I'm not > treating that case -- I disable that connector before handling out the > lease). Or primary plane -> page flipping, overlay -> wait for vblank? > > Looking briefly over weston code I see that for overlay planes they use > wait for vblank mechanism. Maybe Daniel/Pekka can confirm this, or > maybe this is an issue with legacy API and atomic doesn't suffer from > this problem. I'm not 100% sure. > > I guess it would be interesting to see if we can use it in the same > time. With the atomic API at least, overlay planes cannot be driven separately from other planes on that CRTC. Atomic only allows one commit per CRTC per vblank: either you hand out CRTCs in their entirety, or when you lease an overlay plane to a client, you stop updating anything else on that CRTC. Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 0/3 v2] DRM lease support
Hi, The sample client I've posted seems to be using the overlay plane. Also, Daniel Stone confirmed a while back that they can be used. However it seems that page flipping on the overlay plane can not be used if the connector is used in the same time (and I'm not treating that case -- I disable that connector before handling out the lease). Or primary plane -> page flipping, overlay -> wait for vblank? Looking briefly over weston code I see that for overlay planes they use wait for vblank mechanism. Maybe Daniel/Pekka can confirm this, or maybe this is an issue with legacy API and atomic doesn't suffer from this problem. I'm not 100% sure. I guess it would be interesting to see if we can use it in the same time. On Mon, 2018-02-12 at 15:54 +, Ucan, Emre (ADITG/ESB) wrote: > Hi, > > Is it possible to only lease an overlay plane, so that lessor and > lessee share the same connector ? > > Best regards > > Emre Ucan > Engineering Software Base (ADITG/ESB) > > Tel. +49 5121 49 6937 > > > -Original Message- > > From: wayland-devel [mailto:wayland-devel- > > boun...@lists.freedesktop.org] On Behalf Of Marius Vlad > > Sent: Montag, 12. Februar 2018 15:55 > > To: wayland-devel@lists.freedesktop.org > > Cc: pekka.paala...@collabora.co.uk; kei...@keithp.com; Marius Vlad; > > dani...@collabora.com > > Subject: [PATCH weston 0/3 v2] DRM lease support > > > > Patch series that adds support for DRM leases. > > > > DRM leases is a method developed by Keith Packard to allow other > > application > > manage the output of a display/VR, while a DRM master is already > > owning > > the outputs resources. A more thorough explanation and terminology > > can > > be found at [1]. libdrm [2] and kernel [3] have already gained > > support. > > > > Initially this was a single patch but decided to split into series > > to > > accommodate a demo client and another change as to allow a smoother > > transition > > of the output from weston to a DRM leased client. > > > > Marius Vlad (3): > > compositor-drm: Add support for drm-lease. > > compositor-drm: Do not perform a modeset when the output has been > > leased > > clients/simple-egl-lease: A demo client for DRM leases > > > > [1] https://emea01.safelinks.protection.outlook.com/?url=https%3A%2 > > F%2Fkeithp.com%2Fblogs%2FDRM-lease%2F&data=02%7C01%7Cmarius- > > cristian.vlad%40nxp.com%7Cb40b120d26074b6c3bea08d57230fe4c%7Cbd8a2a > > 2207224ec7b35f1c4f0497e341%7C0%7C1%7C636540477114485732&sdata=twp10 > > TCbXPHqW5Xw8ZFigw1UIY2vuE1hp32tFeBmx3E%3D&reserved=0 > > [2] > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2F > > git.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinu > > x.git%2Fcommit%2F&data=02%7C01%7Cmarius- > > cristian.vlad%40nxp.com%7Cb40b120d26074b6c3bea08d57230fe4c%7Cbd8a2a > > 2207224ec7b35f1c4f0497e341%7C0%7C1%7C636540477114485732&sdata=Q5lra > > qIXACr109zP62gYM3aNsc4vaIOmpcPqr5jz%2F8g%3D&reserved=0? > > h=v4.15-rc9&id=62884cd386b876638720ef88374b31a84ca7ee5f > > [3] > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2F > > cgit.freedesktop.org%2Fmesa%2Fdrm%2Fcommit%2F%3Fid%3Dc4171535389d72 > > e9135c&data=02%7C01%7Cmarius- > > cristian.vlad%40nxp.com%7Cb40b120d26074b6c3bea08d57230fe4c%7Cbd8a2a > > 2207224ec7b35f1c4f0497e341%7C0%7C1%7C636540477114485732&sdata=08pKA > > s4xpNtWPCGMpXGJjtl4heCfb9Blk9MbjJzcuUM%3D&reserved=0 > > 9615cecd07b346fd6d7e > > > > > > Makefile.am| 13 + > > clients/simple-egl-lease.c | 880 > > + > > clients/simple-egl-lease.h | 99 + > > compositor/main.c | 9 + > > configure.ac | 21 ++ > > libweston/compositor-drm.c | 250 - > > libweston/compositor.c | 1 + > > libweston/compositor.h | 2 + > > 8 files changed, 1273 insertions(+), 2 deletions(-) > > create mode 100644 clients/simple-egl-lease.c > > create mode 100644 clients/simple-egl-lease.h > > > > -- > > 2.9.3 > > > > ___ > > wayland-devel mailing list > > wayland-devel@lists.freedesktop.org > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2F > > lists.freedesktop.org%2Fmailman%2Flistinfo%2Fwayland- > > devel&data=02%7C01%7Cmarius- > > cristian.vlad%40nxp.com%7Cb40b120d26074b6c3bea08d57230fe4c%7Cbd8a2a > > 2207224ec7b35f1c4f0497e341%7C0%7C1%7C636540477114485732&sdata=gSvIW > > bGVSXkvq9Z6jf36Evw3EO5kGB4mew4O6NXE8Jc%3D&reserved=0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 3/7] libweston: Make weston_seat release safe
On Thu, 8 Feb 2018 15:37:54 +0200 Alexandros Frantzis wrote: > Ensure the server can safely handle client requests for wl_seat resource > that have become inert due to weston_seat object release and subsequent > destruction. > > The clean-up involves, among other things, unsetting the destroyed > weston_seat object from the user data of wl_seat resources, and handling > this NULL user data case where required. > > The list of sites extracting and using weston_seat object from wl_seat > resources which were audited for this patch are: > > Legend: > N/A = Not Applicable (not implemented by weston) > FIXED = Fixed in the commit > OK = Already works correctly > > == keyboard_shortcuts_inhibit_unstable_v1 == > [N/A] zwp_keyboard_shortcuts_inhibit_manager_v1.inhibit_shortcuts > == tablet_input_unstable_v{1,2} == > [N/A] zwp_tablet_manager_v{1,2}.get_tablet_seat > == text_input_unstable_v1 == > [FIXED] zwp_text_input_v1.activate > [FIXED] zwp_text_input_v1.deactivate > == wl_data_device == > [FIXED] wl_data_device_manager.get_data_device > [OK] wl_data_device.start_drag > [FIXED] wl_data_device.set_selection > [OK] wl_data_device.release > == wl_shell == > [FIXED] wl_shell_surface.move > [FIXED] wl_shell_surface.resize > [FIXED] wl_shell_surface.set_popup > == xdg_shell and xdg_shell_unstable_v6 == > [FIXED] xdg_toplevel.show_window_menu > [FIXED] xdg_toplevel.move > [FIXED] xdg_toplevel.resize > [FIXED] xdg_popup.grab > == xdg_shell_unstable_v5 == > [FIXED] xdg_shell.get_xdg_popup > [FIXED] xdg_surface.show_window_menu > [FIXED] xdg_surface.move > [FIXED] xdg_surface.resize > > Signed-off-by: Alexandros Frantzis > --- > Changes in v2: > - Properly create inert resources in seat_get_pointer/touch/keyboard. > - Ensure all sites which have a wl_seat input resource can deal >with inert resources. > > compositor/text-backend.c| 8 -- > libweston-desktop/wl-shell.c | 12 +++- > libweston-desktop/xdg-shell-v5.c | 16 ++- > libweston-desktop/xdg-shell-v6.c | 18 +++- > libweston/data-device.c | 15 ++ > libweston/input.c| 61 > > 6 files changed, 102 insertions(+), 28 deletions(-) Hi Alf, awesome work! The changes look good to me, however I did not review the libweston-desktop bits yet. I'm hoping Quentin would take a look at those. Therefore, apart from libweston-desktop bits, this patch is: Reviewed-by: Pekka Paalanen Thanks, pq > diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c > index 66553f45..3386d48b 100644 > --- a/libweston-desktop/wl-shell.c > +++ b/libweston-desktop/wl-shell.c > @@ -220,6 +220,9 @@ weston_desktop_wl_shell_surface_protocol_move(struct > wl_client *wl_client, > struct weston_desktop_wl_shell_surface *surface = > weston_desktop_surface_get_implementation_data(dsurface); > > + if (seat == NULL) > + return; > + > weston_desktop_api_move(surface->desktop, dsurface, seat, serial); > } > > @@ -238,6 +241,9 @@ weston_desktop_wl_shell_surface_protocol_resize(struct > wl_client *wl_client, > enum weston_desktop_surface_edge surf_edges = > (enum weston_desktop_surface_edge) edges; > > + if (seat == NULL) > + return; > + > weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, > surf_edges); > } > > @@ -321,13 +327,17 @@ > weston_desktop_wl_shell_surface_protocol_set_popup(struct wl_client > *wl_client, > struct weston_desktop_surface *dsurface = > wl_resource_get_user_data(resource); > struct weston_seat *wseat = wl_resource_get_user_data(seat_resource); > - struct weston_desktop_seat *seat = weston_desktop_seat_from_seat(wseat); > + struct weston_desktop_seat *seat; > struct weston_surface *parent = > wl_resource_get_user_data(parent_resource); > struct weston_desktop_surface *parent_surface; > struct weston_desktop_wl_shell_surface *surface = > weston_desktop_surface_get_implementation_data(dsurface); > > + if (wseat == NULL) > + return; > + > + seat = weston_desktop_seat_from_seat(wseat); > if (seat == NULL) { > wl_client_post_no_memory(wl_client); > return; > diff --git a/libweston-desktop/xdg-shell-v5.c > b/libweston-desktop/xdg-shell-v5.c > index ebe7940e..ac3de78a 100644 > --- a/libweston-desktop/xdg-shell-v5.c > +++ b/libweston-desktop/xdg-shell-v5.c > @@ -421,6 +421,9 @@ > weston_desktop_xdg_surface_protocol_show_window_menu(struct wl_client > *wl_client > struct weston_desktop_xdg_surface *surface = > weston_desktop_surface_get_implementation_data(dsurface); > > + if (seat == NULL) > + return; > + > weston_desktop_xdg_surface_ensure_added(surface); > weston_desktop_api_show_window_menu(surface->desktop, dsurface, seat, > x, y); > } > @@ -43
Re: [PATCH weston v2 2/7] libweston: Make weston_pointer destruction safe
On Thu, 8 Feb 2018 15:37:53 +0200 Alexandros Frantzis wrote: > Properly clean up all sub-objects (e.g., weston_pointer_client objects) > when a weston_pointer object is destroyed. The clean-up ensures that the > server is able to safely handle client requests to any associated > pointer resources, which, as a consenquence of a weston_pointer > destruction, have now become inert. > > The clean-up involves, among other things, unsetting the destroyed > weston_pointer object from the user data of pointer resources, and > handling this NULL user data case where required. Note that in many > sites affected by this change the existing code already properly handles > NULL weston_pointer (e.g. in init_pointer_constraint), so there is no > need for additional updates there. > > Signed-off-by: Alexandros Frantzis > --- > Changes in v2: > - Removed NULL check before calling init_pointer_constraint, since >init_pointer_constraint now handles this case. > - Handle NULL weston_pointer in zoom functions. > > libweston/input.c | 35 ++- > libweston/zoom.c | 5 - > 2 files changed, 34 insertions(+), 6 deletions(-) Reviewed-by: Pekka Paalanen Thanks, pq pgpe4zgynPGKs.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 1/7] libweston: Support NULL weston_pointer in init_pointer_constraint
On Thu, 8 Feb 2018 15:37:52 +0200 Alexandros Frantzis wrote: > Fix init_pointer_constraint so that it creates a valid, but inert, > resource if a NULL weston_pointer value is passed in. In that case no > constraint object is associated with the resource, but this is not an > issue since affected code can already handle NULL constraint objects. > > Signed-off-by: Alexandros Frantzis > --- > Changes in v2: > - New patch > > libweston/input.c | 21 + > 1 file changed, 13 insertions(+), 8 deletions(-) > Reviewed-by: Pekka Paalanen Thanks, pq pgpU6w624PXT5.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel