Re: [ANNOUNCE] wayland 1.16.91
___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: Planning for another Wayland release
On Fri, Jan 12, 2018 at 10:00:57AM +, Daniel Stone wrote: > Hi Bryce, > > On 12 January 2018 at 00:31, Bryce Harrington <br...@osg.samsung.com> wrote: > > Is there interest in another release at this time? It's been about a > > 1/2 year since last release, so feels due. I could do a schedule > > something like: > > > > For Wayland 1.15.0 and Weston 4.0.0: > > > > - Alpha on Tuesday, Jan 16 > > Honestly, I'm not comfortable shipping an alpha four days from now. > > I did a clearout of the review queue last month, but that's not yet > complete, and I'd like someone to have a more structured look at the > queue (or just to look at all ...) to find stuff that should make it > into the next release. Currently, we have at least Derek's zombie > series, my atomic series and Pekka's clone-mode series, which are all > unlikely to land before Tuesday, but are seemingly very close to > having at least their foundations land. > > I think it would be best to announce a date before FOSDEM, but make > sure we have a good handle on the state of the tree before we do and > make sure we don't unnecessarily drop things. That would include > keeping a close eye on how it develops, rather than just running > release.sh on a strict timer. I was pretty unhappy last time when we > put out a release in the middle of discussing a possibly-critical > patchset; reading the list would've pointed to a few hours' or one > day's delay as being helpful, but in the end the release just abruptly > went out and made the whole thing moot. > > Given how much we could potentially be landing, I think we would need > someone more actively involved (patch-herding, review, testing, > list/IRC discussion) to handle the release process; I'm happy to do > that for this release. Fair enough, I'll let you handle release management here on out then. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Planning for another Wayland release
Is there interest in another release at this time? It's been about a 1/2 year since last release, so feels due. I could do a schedule something like: For Wayland 1.15.0 and Weston 4.0.0: - Alpha on Tuesday, Jan 16 - Beta on Tuesday, Jan 30 - RC1 on Tuesday, Feb 07 - Release on Tuesday, Feb 14 Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 3.0.0
This is the official release of Weston 3.0. A range of improvements are included in this release, including an improvement to the integration of drm_fb within the DRM compositor, making libdrm non-optional build-time dependency, and handling multi-head repainting globally rather than per-output, with output routing rearranged a bit to allow slightly faster startup. libweston's output interface has been refactored a fair bit, including unexporting the symbols weston_compositor_add_output and weston_output_update_matrix. ivi-shell also saw code cleanup, including the removal of the layer_set_orientation and surface_set_orientation APIs and the addition of add_screen_remove_layer. The version jump to 3.0.0 is due to minor breakages in the libweston ABI - changes in the size of the weston_output and weston_compositor structures. Full Changelog Since 2.0: Armin Krezović (1): compositor-drm: Construct mode list in create_output_for_connector Arnaud Vrac (1): libweston-desktop/xdg-shell-v5: initialize configure list Bryce Harrington (6): configure.ac: Bump to 2.0.90 for open development desktop-shell: Enable per-output fade animations configure.ac: bump to version 2.99.91 for the alpha release configure.ac: bump to version 2.99.92 for the beta release configure.ac: bump to version 2.99.93 for the RC1 release configure.ac: bump to version 3.0.0 for the official release Daniel Stone (32): compositor-drm: Ignore non-KMS devices compositor-drm: Try to preserve existing output routing compositor-drm: Make scanout view preparation more stringent timespec: Add timespec_add_nsec helper timespec: Add timespec_add_msec helper timespec: Add timespec_to_msec helper timespec: Add timespec subtraction helpers Calculate next-frame target time in absolute space Don't delay initial output paint Change repaint_needed to bool Change boolean repaint_scheduled to quad-state enum Fix 'implicit fallthrough' warning with new GCC launcher: Add sysmacros.h include for major() Switch to global output repaint timer Allow backends to group repaint flushes libinput: Suppress unhandled-case warning weston-launch: Add sysmacros.h include for major() libweston: Add pixel-format helpers compositor-drm: Calculate more cursor state up front compositor-drm: Add explicit type member to drm_fb compositor-drm: Store format in drm_fb compositor-drm: Drop output from release_fb compositor-drm: Refcount drm_fb compositor-drm: Use drm_fb for cursor buffers compositor-drm: Rename current/next FB members compositor-drm: Reshuffle drm_output_render compositor-drm: Return FB directly from render compositor-drm: Introduce fb_last member compositor-drm: Turn vblank_pending from bool to refcount compositor-drm: Clean up page_flip_pending path compositor-drm: Rename drm_sprite to drm_plane Account for very large repaint window misses Derek Foreman (18): simple-dmabuf-v4l: Remove incorrect assert weston-terminal: Add a --maximized command line parameter os: Check for EINTR on posix_fallocate() os: Check for EINTR on ftruncate() weston: Set CLOEXEC on stdin desktop-shell: launch clients in their own process group. weston-terminal: Fix race at startup compositor-drm: Fix disabling cursor plane clients: Allow simple-egl to use wl_surface_damage_buffer libweston: Allow compositor-wayland to use wl_surface_damage_buffer input: Remove --disable-xkbcommon gl-renderer: Fix some missing newlines in log messages linux-dmabuf: Fix crash with no valid modifiers dmabuf: Don't crash clients by sending version inappropriate events configure: Stop printing libxkbcommon in configure results logind: actually close fd in launcher_logind_close input: Stop leaking libinput event source on session deactivation libweston-desktop/xdg-shell: Properly properly handle ack_configure Eero Tamminen (1): clients/simple-egl: add delay option Emil Velikov (3): libweston/launcher: annotate iface(s) as constant data libweston/launcher: use C99 initializers for the iface(s) compositor-drm: correctly set the version of the drmEventContext Emmanuel Gil Peyrot (2): compositor-drm: pageflip timeout implementation desktop-shell: Position maximized surfaces on the correct output. Ilia Bozhinov (1): xwm: update override-redirect surface's position upon configure_notify Lyude Paul (1): weston: Add support for "--foo bar" style options Michael Teyfel (1): ivi-shell: Fixed broken link to wiki page in ivi-layout header file Oliver Smith (1): compositor-fbdev: Instead of less than 1 Hz use default refresh rate Olivier Fourdan (1):
[ANNOUNCE] wayland 1.14.0
This is the official release for Wayland 1.14. This rolls up a handful of fixes and cleanups collected so far this year. I'm going to hold off on penciling a schedule for Wayland 1.15, given the current low rate of change. I may opt for doing a 1.14.1 point release later this year, but it'll depend on what changes land between now and then. Bryce Harrington (5): configure.ac: bump version to 1.13.90 for open development configure.ac: bump to version 1.13.91 for the alpha release configure.ac: bump to version 1.13.92 for the beta release configure.ac: bump to version 1.13.93 for the RC1 release configure.ac: bump to version 1.14.0 for the official release Carlos Garnacho (1): tests: Fix "new ID" type handling in argument_from_va_list test Daniel Stone (2): scanner: Reword fallthrough comment to quiet GCC docs: Reference Contributor Covenant Emil Velikov (1): wayland-util: do not export the wl_map_* API Eric Engestrom (1): connection-test: fix assert Owen W. Taylor (1): Switch graphviz files to use HTML-style labels Sergi Granell (1): wayland-server: Remove unused members from struct wl_client git tag: 1.14.0 https://wayland.freedesktop.org/releases/wayland-1.14.0.tar.xz MD5: 0235f6075c32c3be61cff94fa0b9f108 wayland-1.14.0.tar.xz SHA1: 53a443be3bafe73209bbc49ef2cb134ed16e0141 wayland-1.14.0.tar.xz SHA256: ed80cabc0961a759a42092e2c39aabfc1ec9a13c86c98bbe2b812f008da27ab8 wayland-1.14.0.tar.xz SHA512: bd38b2b8963d4d98d42c270e5d7dbff6323789a173b19b67a18258424fd8adee5021b282c9d7f6dad0bd25aa0160e76aecd8ed803d4eb25d911ef0a81cd713a5 wayland-1.14.0.tar.xz PGP: https://wayland.freedesktop.org/releases/wayland-1.14.0.tar.xz.sig signature.asc Description: PGP signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 2.99.93
This is the first release candidate for the upcoming 3.0.0 release. About half a dozen fixes have been introduced since the beta, involving cleanups of file descriptors and leaks, and refinements of handling resizing of surfaces in desktop shell windows. The other changes already mentioned in the beta release notes includes an improvement to the integration of drm_fb within the DRM compositor, making libdrm non-optional build-time dependency, and handling multi-head repainting globally rather than per-output, with output routing rearranged a bit to allow slightly faster startup. libweston's output interface has been refactored a fair bit, including unexporting the symbols weston_compositor_add_output and weston_output_update_matrix. ivi-shell also saw code cleanup, including the removal of the layer_set_orientation and surface_set_orientation APIs and the addition of add_screen_remove_layer. The version jump to 3.0.0 is due to minor breakages in the libweston ABI - changes in the size of the weston_output and weston_compositor structures. Changes since the beta release: --- Bryce Harrington (1): configure.ac: bump to version 2.99.93 for the RC1 release Derek Foreman (3): logind: actually close fd in launcher_logind_close input: Stop leaking libinput event source on session deactivation libweston-desktop/xdg-shell: Properly properly handle ack_configure Pekka Paalanen (1): compositor-drm: reset KMS state on VT-switch in Philipp Kerling (3): desktop-shell: Track focused shell surface by main surface libweston-desktop/xdg-shell: Check window geometry instead of surface size against configured size desktop-shell: Set surface resizing state during interactive resize git tag: 2.99.93 https://wayland.freedesktop.org/releases/weston-2.99.93.tar.xz MD5: 7da1d11c9d5b57754c38a7d1f39ba693 weston-2.99.93.tar.xz SHA1: 9223b5e1b3000942a9f3a4a2413f98c45f0d12d1 weston-2.99.93.tar.xz SHA256: 5d8299223e253e5122b14b7cbc4a040025ca14e13dc7e2a4d1dfd4712f242ca9 weston-2.99.93.tar.xz SHA512: 72fe29acc7eed3b033e81009a7ba823c25468ca3e15861a42295b079b3ae48f368fcd3c8d89d820903501ebdd9ec2e2f4e0d0044796cd5e375739c2ef1125b0f weston-2.99.93.tar.xz PGP: https://wayland.freedesktop.org/releases/weston-2.99.93.tar.xz.sig signature.asc Description: PGP signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] wayland 1.13.93
Here is the release candidate for the upcoming 1.14 release. The one change since beta is changing the formatting of labels in doxygen markup to fix a failure in diagram generation. Bryce Harrington (1): configure.ac: bump to version 1.13.93 for the RC1 release Owen W. Taylor (1): Switch graphviz files to use HTML-style labels git tag: 1.13.93 https://wayland.freedesktop.org/releases/wayland-1.13.93.tar.xz MD5: f316b9c7ed23198b476af73c994724cc wayland-1.13.93.tar.xz SHA1: ff27413a77a994d7fadab60815eac5871b5a0a0f wayland-1.13.93.tar.xz SHA256: 93f99e82dae814e4a962093e9e8825ed3cac64fcd5ff875ba22a1f7d4568bb90 wayland-1.13.93.tar.xz SHA512: 26957a0bb058b60744a5ee880cab0cf6b9568cd5f5c71e464966f16eccca66c1a3204aa2cf513b5041bb7a715cc7c8356a74809a1c54a3910282556f997c1007 wayland-1.13.93.tar.xz PGP: https://wayland.freedesktop.org/releases/wayland-1.13.93.tar.xz.sig signature.asc Description: PGP signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 2.99.92
This is the beta for the upcoming 3.00 release. Since the alpha there have been several refactors of libweston's output interface uncluding unexporting two symbols, weston_compositor_add_output and weston_output_update_matrix. ivi-shell received some code cleanup and removal of the layer_set_orientation and surface_set_orientation APIs and the addition of add_screen_remove_layer. xdg-shell receives several data validation checks and some light refactoring. The other changes already mentioned in the alpha release notes includes an improvement to the integration of drm_fb within the DRM compositor. libdrm is now a non-optional build-time dependency. Multi-head repainting is now done globally rather than per-output, and output routing is rearranged a bit to allow slightly faster startup. The version jump to 3.0.0 is due to minor breakages in the libweston ABI - changes in the size of the weston_output and weston_compositor structures. Bryce Harrington (1): configure.ac: bump to version 2.99.92 for the beta release Ilia Bozhinov (1): xwm: update override-redirect surface's position upon configure_notify Michael Teyfel (1): ivi-shell: Fixed broken link to wiki page in ivi-layout header file Pekka Paalanen (14): libweston: untangle weston_compositor_remove_output doc libweston: use helper var in weston_compositor_remove_output libweston: let add/remove_output handle the lists libweston: two more weston_output docs libweston: unexport weston_compositor_add_output() libweston: unexport weston_output_update_matrix() libweston: move asserts to add_pending_output() libweston: specify weston_output::enabled libweston: prevent double weston_output_enable() libweston: move output id into add/remove_output() libweston: move globals to weston_compositor_add_output() libweston: extend output->region lifetime libweston: make weston_output::connection_internal a bool libweston: introduce weston_output_from_resource() Quentin Glidic (4): libweston-desktop/xdg-shell: Rename requested_ to pending_ libweston-desktop/xdg-shell: Add pending/next/current structs libweston-desktop/xdg-shell: Check surface size against acknowledged size libweston-desktop/xdg-shell: Properly handle ack_configure Ucan, Emre (ADITG/SW1) (4): ivi-shell: add_screen_remove_layer API ivi-shell: remove surface_set_orientation API ivi-shell: remove layer_set_orientation API ivi-shell: remove orientation calculation git tag: 2.99.92 https://wayland.freedesktop.org/releases/weston-2.99.92.tar.xz MD5: 6d7fcd30e1b1045caea4aa2ff83c9fe5 weston-2.99.92.tar.xz SHA1: b97d0344979d9f6bdd100b344406e063c4489efc weston-2.99.92.tar.xz SHA256: c9ca1a24261b38d7bbd22c1e25b98dabf5c8f6bfdf3b71f7e45c41bd4453db3b weston-2.99.92.tar.xz SHA512: 99f7cf27c305b437c8373cafba7cd714da22d542784ae9732dfaa67f14fff33c922eba6df9bb15845c40c2acfe59cacc5bcbb9d051b5fc2ec61d1c0a8cbd6513 weston-2.99.92.tar.xz PGP: https://wayland.freedesktop.org/releases/weston-2.99.92.tar.xz.sig signature.asc Description: PGP signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] wayland 1.13.92
Here is the beta for the upcoming 1.14 release. There have been no changes since the alpha. Bryce Harrington (1): configure.ac: bump to version 1.13.92 for the beta release git tag: 1.13.92 https://wayland.freedesktop.org/releases/wayland-1.13.92.tar.xz MD5: 2dbbaa14d4572b57939af7c3fcb13e20 wayland-1.13.92.tar.xz SHA1: 2c1063d377f527755751cdb2f17cb9085a75418d wayland-1.13.92.tar.xz SHA256: 1253392261ccb44b312ec0486457c28d24c2f9d8940162181ed5ddc568b8f858 wayland-1.13.92.tar.xz SHA512: ebf21fe83a8f096397df1ce838ac015ce66a35035250a4322db9d0fd85be58022813438e1be83e8e05a85dd33b3ce1d1a3d0e968dfde9cd9aef7ab3789cd387b wayland-1.13.92.tar.xz PGP: https://wayland.freedesktop.org/releases/wayland-1.13.92.tar.xz.sig signature.asc Description: PGP signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 2.99.91
This is the alpha for the Weston 3.0 release. Attention went into improving the integration of drm_fb within the DRM compositor. libdrm is now a non-optional build-time dependency. Multi-head repainting is now done globally rather than per-output, and output routing is rearranged a bit to allow slightly faster startup. The version jump to 3.0.0 is due to minor breakages in the libweston ABI - changes in the size of the weston_output and weston_compositor structures. Changes since the 2.0 release: -- Armin Krezović (1): compositor-drm: Construct mode list in create_output_for_connector Bryce Harrington (3): configure.ac: Bump to 2.0.90 for open development desktop-shell: Enable per-output fade animations configure.ac: bump to version 2.99.91 for the alpha release Daniel Stone (32): compositor-drm: Ignore non-KMS devices compositor-drm: Try to preserve existing output routing compositor-drm: Make scanout view preparation more stringent timespec: Add timespec_add_nsec helper timespec: Add timespec_add_msec helper timespec: Add timespec_to_msec helper timespec: Add timespec subtraction helpers Calculate next-frame target time in absolute space Don't delay initial output paint Change repaint_needed to bool Change boolean repaint_scheduled to quad-state enum Fix 'implicit fallthrough' warning with new GCC launcher: Add sysmacros.h include for major() Switch to global output repaint timer Allow backends to group repaint flushes libinput: Suppress unhandled-case warning weston-launch: Add sysmacros.h include for major() libweston: Add pixel-format helpers compositor-drm: Calculate more cursor state up front compositor-drm: Add explicit type member to drm_fb compositor-drm: Store format in drm_fb compositor-drm: Drop output from release_fb compositor-drm: Refcount drm_fb compositor-drm: Use drm_fb for cursor buffers compositor-drm: Rename current/next FB members compositor-drm: Reshuffle drm_output_render compositor-drm: Return FB directly from render compositor-drm: Introduce fb_last member compositor-drm: Turn vblank_pending from bool to refcount compositor-drm: Clean up page_flip_pending path compositor-drm: Rename drm_sprite to drm_plane Account for very large repaint window misses Derek Foreman (15): simple-dmabuf-v4l: Remove incorrect assert weston-terminal: Add a --maximized command line parameter os: Check for EINTR on posix_fallocate() os: Check for EINTR on ftruncate() weston: Set CLOEXEC on stdin desktop-shell: launch clients in their own process group. weston-terminal: Fix race at startup compositor-drm: Fix disabling cursor plane clients: Allow simple-egl to use wl_surface_damage_buffer libweston: Allow compositor-wayland to use wl_surface_damage_buffer input: Remove --disable-xkbcommon gl-renderer: Fix some missing newlines in log messages linux-dmabuf: Fix crash with no valid modifiers dmabuf: Don't crash clients by sending version inappropriate events configure: Stop printing libxkbcommon in configure results Eero Tamminen (1): clients/simple-egl: add delay option Emil Velikov (3): libweston/launcher: annotate iface(s) as constant data libweston/launcher: use C99 initializers for the iface(s) compositor-drm: correctly set the version of the drmEventContext Emmanuel Gil Peyrot (2): compositor-drm: pageflip timeout implementation desktop-shell: Position maximized surfaces on the correct output. Lyude Paul (1): weston: Add support for "--foo bar" style options Oliver Smith (1): compositor-fbdev: Instead of less than 1 Hz use default refresh rate Olivier Fourdan (1): xwm: Don't change focus on focus events from grabs Pekka Paalanen (10): clients/weston-info: print unknown formats better configure: bump libweston to 3.0.0 man: move pageflip-timeout later configure: replace HAVE_LIBDRM with BUILD_DRM_COMPOSITOR build: do not link libdrm without DRM backend build: make libdrm a hard build-time dependency libweston: improve weston_output_disable() comments xwm: do not draw decor twice on map xwm: use _XWAYLAND_ALLOW_COMMITS libweston-desktop/xwayland: react to geometry changes Philipp Zabel (1): libweston: fix pixel-format helpers compilation on non-X11 EGL platforms Quentin Glidic (2): libweston-desktop/xdg_shell_v6: Send error on wrongly-sized buffer libweston-desktop/xdg-shell: Consolidate configure event sending Raúl Peñacoba (5): desktop-shell: Remove unused variable in panel_create gl-renderer: Change 'data' type to 'uint8_t *', since 'void *'
Re: Proposed schedule for 1.14 release
On Mon, Jul 03, 2017 at 09:59:57AM -0700, Bryce Harrington wrote: > Please let me know if there is interest in having a release at this > time. My proposed schedule would be as follows: > > For Wayland 1.14.0 and Weston 2.1.0: Actually on review it should be Weston 3.0.0. I'd still be open to doing also a Weston 2.0.1 and/or 2.1.0 if someone would want to lend a hand on cherrypicking work. Bryce > - Alpha on July 11th. Major features done by this point. > - Beta on July 25th. > - RC1 around August 1st. > - Release by August 8th at the earliest > > Bryce > > On Wed, Jun 21, 2017 at 10:45:09AM -0700, Bryce Harrington wrote: > > On Fri, May 05, 2017 at 04:06:00PM -0500, Derek Foreman wrote: > > > On 26/04/17 11:47 AM, Daniel Stone wrote: > > > >On 21 February 2017 at 22:59, Bryce Harrington <br...@osg.samsung.com> > > > >wrote: > > > >>Our next major release will be version 1.14, which will be scheduled > > > >>tentatively as follows: > > > >> > > > >> √ Development opens immediately > > > >> > > > >> - 1.14-alpha in early May > > > > > > And here we are. > > > > > > >> - 1.14-beta around mid May > > > >> > > > >> - 1.14-rc1 late May, with rc2 only if necessary > > > >> > > > >> - 1.14.0 around beginning of June > > > > > > > >I'd like to discuss this. As it stands, we're around a week away from > > > >shipping an alpha, and feature freezing. At this point, we have > > > >already committed libweston breakage such that the SOVERSION has hit > > > >3. So far, we have nothing to offer for this breakage, just a bunch of > > > >bugfixes and a pile of cleanups and groundwork that will only become > > > >useful with future features. > > > > > > libwayland doesn't seem to have seen any interesting change either... > > > > > > >So, my question: is it worth releasing now, or is a delay in order? > > > > > > This sounds good to me - based on purely selfish reasons, being that one > > > patch series. :) > > > > > > I think we have a backlog of stuff that hasn't landed because it hasn't > > > been > > > reviewed (and revised...), I see no harm in holding the release > > > and no benefit to rushing it. > > > > > > I am going to be on vacation next couple weeks but once I'm back I'll > > have time to roll a release if you guys would like. > > > > The schedule could be similar to before - an alpha on July 11th followed > > a couple weeks later by beta, then one week for rc and another week for > > final release. > > > > If you feel Weston still is not in a releasable state I could just do > > Wayland (although Wayland doesn't appear to have accumulated much change > > since 1.13.) Another option would be a Weston 2.0.1 with just bug > > fixes, if people are available to help in cherrypicking suitable patches > > to the 2.0 branch. > > > > Bryce > > > > ___ > > wayland-devel mailing list > > wayland-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/wayland-devel > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Proposed schedule for 1.14 release
Please let me know if there is interest in having a release at this time. My proposed schedule would be as follows: For Wayland 1.14.0 and Weston 2.1.0: - Alpha on July 11th. Major features done by this point. - Beta on July 25th. - RC1 around August 1st. - Release by August 8th at the earliest Bryce On Wed, Jun 21, 2017 at 10:45:09AM -0700, Bryce Harrington wrote: > On Fri, May 05, 2017 at 04:06:00PM -0500, Derek Foreman wrote: > > On 26/04/17 11:47 AM, Daniel Stone wrote: > > >On 21 February 2017 at 22:59, Bryce Harrington <br...@osg.samsung.com> > > >wrote: > > >>Our next major release will be version 1.14, which will be scheduled > > >>tentatively as follows: > > >> > > >> √ Development opens immediately > > >> > > >> - 1.14-alpha in early May > > > > And here we are. > > > > >> - 1.14-beta around mid May > > >> > > >> - 1.14-rc1 late May, with rc2 only if necessary > > >> > > >> - 1.14.0 around beginning of June > > > > > >I'd like to discuss this. As it stands, we're around a week away from > > >shipping an alpha, and feature freezing. At this point, we have > > >already committed libweston breakage such that the SOVERSION has hit > > >3. So far, we have nothing to offer for this breakage, just a bunch of > > >bugfixes and a pile of cleanups and groundwork that will only become > > >useful with future features. > > > > libwayland doesn't seem to have seen any interesting change either... > > > > >So, my question: is it worth releasing now, or is a delay in order? > > > > This sounds good to me - based on purely selfish reasons, being that one > > patch series. :) > > > > I think we have a backlog of stuff that hasn't landed because it hasn't been > > reviewed (and revised...), I see no harm in holding the release > > and no benefit to rushing it. > > > I am going to be on vacation next couple weeks but once I'm back I'll > have time to roll a release if you guys would like. > > The schedule could be similar to before - an alpha on July 11th followed > a couple weeks later by beta, then one week for rc and another week for > final release. > > If you feel Weston still is not in a releasable state I could just do > Wayland (although Wayland doesn't appear to have accumulated much change > since 1.13.) Another option would be a Weston 2.0.1 with just bug > fixes, if people are available to help in cherrypicking suitable patches > to the 2.0 branch. > > Bryce > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [ANNOUNCE] wayland 1.13.0
On Fri, May 05, 2017 at 04:06:00PM -0500, Derek Foreman wrote: > On 26/04/17 11:47 AM, Daniel Stone wrote: > >On 21 February 2017 at 22:59, Bryce Harrington <br...@osg.samsung.com> wrote: > >>Our next major release will be version 1.14, which will be scheduled > >>tentatively as follows: > >> > >> √ Development opens immediately > >> > >> - 1.14-alpha in early May > > And here we are. > > >> - 1.14-beta around mid May > >> > >> - 1.14-rc1 late May, with rc2 only if necessary > >> > >> - 1.14.0 around beginning of June > > > >I'd like to discuss this. As it stands, we're around a week away from > >shipping an alpha, and feature freezing. At this point, we have > >already committed libweston breakage such that the SOVERSION has hit > >3. So far, we have nothing to offer for this breakage, just a bunch of > >bugfixes and a pile of cleanups and groundwork that will only become > >useful with future features. > > libwayland doesn't seem to have seen any interesting change either... > > >So, my question: is it worth releasing now, or is a delay in order? > > This sounds good to me - based on purely selfish reasons, being that one > patch series. :) > > I think we have a backlog of stuff that hasn't landed because it hasn't been > reviewed (and revised...), I see no harm in holding the release > and no benefit to rushing it. I am going to be on vacation next couple weeks but once I'm back I'll have time to roll a release if you guys would like. The schedule could be similar to before - an alpha on July 11th followed a couple weeks later by beta, then one week for rc and another week for final release. If you feel Weston still is not in a releasable state I could just do Wayland (although Wayland doesn't appear to have accumulated much change since 1.13.) Another option would be a Weston 2.0.1 with just bug fixes, if people are available to help in cherrypicking suitable patches to the 2.0 branch. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [ANNOUNCE] wayland 1.13.0
On Wed, Apr 26, 2017 at 06:47:57PM +0200, Daniel Stone wrote: > Hi, > > On 21 February 2017 at 22:59, Bryce Harrington <br...@osg.samsung.com> wrote: > > Our next major release will be version 1.14, which will be scheduled > > tentatively as follows: > > > > √ Development opens immediately > > > > - 1.14-alpha in early May > > > > - 1.14-beta around mid May > > > > - 1.14-rc1 late May, with rc2 only if necessary > > > > - 1.14.0 around beginning of June > > I'd like to discuss this. As it stands, we're around a week away from > shipping an alpha, and feature freezing. At this point, we have > already committed libweston breakage such that the SOVERSION has hit > 3. So far, we have nothing to offer for this breakage, just a bunch of > bugfixes and a pile of cleanups and groundwork that will only become > useful with future features. > > Quentin has a queue of work he'd like to get through here: > https://patchwork.freedesktop.org/bundle/sardemff7/next%20release/ > > There are a lot of patches in Patchwork we should really get through > as well, but I don't have time this week (travelling atm). I would > also like to get the atomic precursor work[0] landed if at all > possible. And I'm sure others have their own wishlists: Derek's > no-FD-leak series comes to mind, and I'm sure there are others if we > looked and triaged properly. > > So, my question: is it worth releasing now, or is a delay in order? If > we are to delay, we should set a new deadline, and put reasoning > behind this. For example, as a strawman, I believe about 6 weeks > should be sufficient to get aforementioned atomic work reviewed and > landed Ah, ok, works for me; give me a ping once things are getting close to where you'd like me to do a release. Bryce > and it seems like we could also get Derek's FD leak series > plus the libweston output object changes reviewed in that time as > well. > > Also I think we should start having these discussions for future > releases. To be clear, this is _not_ about feature-based releases, but > looking at the time we have, and trying to concentrate all our efforts > towards things we would like to have for the release. If we had some > clear goals of what we thought we could get into the release, and what > would be valuable, we could put our efforts towards that, and > hopefully have some more focused releases. > > Thoughts? > > Cheers, > Daniel > > [0] Specifically, everything up to and including the 'atomic > modesetting support' patch, which lays the groundwork by adding the > state objects. All the work to actually properly assign planes on top > of that, will need to wait another cycle, given the lack of time for > review. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland 7/9] client: Simplify some logic in queue_event
On Fri, Apr 07, 2017 at 03:27:53PM -0500, Derek Foreman wrote: > Both the blocks in this if/else clause do the same thing, so combine > the comparisons into one. > > No functional change. > > Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> This is a simple refactor that can be landed independently of the rest of the patchset. > --- > src/wayland-client.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/src/wayland-client.c b/src/wayland-client.c > index a77cf71..7243d3d 100644 > --- a/src/wayland-client.c > +++ b/src/wayland-client.c > @@ -1228,10 +1228,7 @@ queue_event(struct wl_display *display, int len) > return 0; > > proxy = wl_map_lookup(>objects, id); > - if (proxy == WL_ZOMBIE_OBJECT) { > - wl_connection_consume(display->connection, size); > - return size; > - } else if (proxy == NULL) { > + if (!proxy || proxy == WL_ZOMBIE_OBJECT) { > wl_connection_consume(display->connection, size); > return size; > } > -- > 2.11.0 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH 1/2] wayland-web: Update documentation for EFL toolkit web page
On Tue, Mar 21, 2017 at 12:56:07PM -0500, Derek Foreman wrote: > On 21/03/17 09:29 AM, Chris Michael wrote: > >This patch updates the documentation for building EFL with wayland > >support on the wayland web site. > > > >Signed-off-by: Chris Michael <cp.mich...@samsung.com> > >--- > > efl.html | 16 +--- > > 1 file changed, 5 insertions(+), 11 deletions(-) > > > >diff --git a/efl.html b/efl.html > >index 024109a..5b179df 100644 > >--- a/efl.html > >+++ b/efl.html > >@@ -32,7 +32,6 @@ > > > > > > $ git clone git://git.enlightenment.org/core/efl.git > >- $ git clone git://git.enlightenment.org/core/elementary.git > > Ok, those build instructions were savagely out of date. Thanks for fixing > this up. > > both are: > Reviewed-by: Derek Foreman <der...@osg.samsung.com> Acked-by: Bryce Harrington <br...@osg.samsung.com> and pushed + deployed: To ssh://git.freedesktop.org/git/wayland/wayland-web 4c26383..a8f3716 master -> master Bryce > I was going to complain about the file size of the screenshot, but it seems > there are a few screenshots already in the repo designed to dazzle us with a > flashy background image. > > I wouldn't mind seeing those compressed more or replaced with shots that get > their point across in a less bandwidth intensive way, but I can't cry foul > on this screenshot if the others are just as bad. :) > > Thanks, > Derek > > > > > > > Compiling EFL > >@@ -51,13 +50,6 @@ > > $ make install > > > > > >- elementary > >- > >- $ ./autogen.sh --prefix=$WLD > >- $ make > >- $ make install > >- > >- > > With all these components it is important to read the > > output > > given by configure to ensure the requested options were enabled. You > > may need to look in config.log to identify missing > >@@ -71,13 +63,15 @@ > > or use EGL. > > > > For applications that use Elementary set the environment variable > >- ELM_ENGINE to wayland_egl or > >- wayland_shm as above. > >+ ELM_DISPLAY to wl. You may also set the > >+ environment variable ELM_ACCEL to none > >+ to use software rendering, or to gl to use hardware > >+ accelerated rendering. > > > > Getting help and reporting issues > > > > Issues in the Wayland port of EFL can be reported in the > > Enlightenment https://phab.enlightenment.org/maniphest/;>bug > >-tracker.There is also the #wayland-efl IRC channel on > >irc.freenode.net > >+tracker.There is also the #edevelop IRC channel on > >irc.freenode.net > > > > > > > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] weston-terminal: Add a --maximized command line parameter
On Wed, Mar 08, 2017 at 11:58:20AM -0600, Derek Foreman wrote: > This is useful for testing compositor response to a client that > requests a maximized initial surface. > > Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > clients/terminal.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/clients/terminal.c b/clients/terminal.c > index 5c25fa8d..c5531790 100644 > --- a/clients/terminal.c > +++ b/clients/terminal.c > @@ -49,6 +49,7 @@ > #include "window.h" > > static int option_fullscreen; > +static int option_maximize; > static char *option_font; > static int option_font_size; > static char *option_term; > @@ -3048,6 +3049,8 @@ terminal_run(struct terminal *terminal, const char > *path) > > if (option_fullscreen) > window_set_fullscreen(terminal->window, 1); > + else if (option_maximize) > + window_set_maximized(terminal->window, 1); > else > terminal_resize(terminal, 80, 24); > > @@ -3056,6 +3059,7 @@ terminal_run(struct terminal *terminal, const char > *path) > > static const struct weston_option terminal_options[] = { > { WESTON_OPTION_BOOLEAN, "fullscreen", 'f', _fullscreen }, > + { WESTON_OPTION_BOOLEAN, "maximized", 'm', _maximize }, > { WESTON_OPTION_STRING, "font", 0, _font }, > { WESTON_OPTION_INTEGER, "font-size", 0, _font_size }, > { WESTON_OPTION_STRING, "shell", 0, _shell }, > @@ -3089,6 +3093,7 @@ int main(int argc, char *argv[]) > ARRAY_LENGTH(terminal_options), , argv) > 1) { > printf("Usage: %s [OPTIONS]\n" > " --fullscreen or -f\n" > +" --maximized or -m\n" > " --font=NAME\n" > " --font-size=SIZE\n" > " --shell=NAME\n", argv[0]); > -- > 2.11.0 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] Update COPYING
On Mon, Feb 27, 2017 at 10:17:21PM +, Daniel Stone wrote: > >> I'd be fine to reduce it to the minimal license text, but that doesn't > >> free us up from needing to check incoming source to make sure it > >> conforms to the same license. We should really also merge data/COPYING > >> into the core COPYING. > > > > Obviously checking licenses on incoming code is always extremely > > important. :-) > > > > I'm not sure what you're suggesting by reducing it to the minimal > > license, the file only includes one license statement so appears to be > > minimal already; I'm not suggesting copyrights *shouldn't* be present, > > or that any of the existing ones should be removed. AIUI it's required > > to have at least one copyright statement, and seems pretty standard to > > list the major copyright holders (esp. any companies/individuals with a > > legal interest.) The main purpose of COPYING, though, is the licensing, > > to document how the codebase can be shared and reused. > > > > You're probably right that merging data/COPYING and COPYING makes > > sense, but I've seen enough other projects that had subdir-specific > > licensing gunk that I'm not really worried about it. I'd be fine > > either way. > > Yeah, I don't think we're big enough that having separate files makes > much sense. What I'm mostly just stuck with is the copyright > statements: at the moment, we list a few but don't go on to list any > others. I'd suggest an incomplete statement is the worst of both > worlds: should we maybe just list the applicable licenses with a > 'Copyright © 2008-2017 multiple authors' and the license text, with a > note to check the individual files to determine who owns copyright > over which part? Yes, that seems like a good approach to me. That should address all the points. I probably would avoid the 'multiple authors' phrasing in the individual .c files as probably too ambiguous legally, however I've seen plenty of projects use that in their code. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 2.0.0
Welcome to the official release of Weston 2.0. There are no changes since RC2. Changes since weston 1.12 include EGL_KHR_swap_buffers_with_damage support, porting backends to new API for output setup, support for DRM_FORMAT_YUV444 buffers in the gl backend, better panel positioning support for desktop-shell, improved XWayland warning messages, and numerous refactoring and bugfixing improvements. Of particular note, libweston is bumped to 2 due to an ABI breakage introduced with the new output API. Changes since RC: - Bryce Harrington (2): releasing: Should only publish publican docs for actual releases configure.ac: bump to version 2.0.0 for the official release git tag: 2.0.0 http://wayland.freedesktop.org/releases/weston-2.0.0.tar.xz MD5: 15f38945942bf2a91fe2687145fb4c7d weston-2.0.0.tar.xz SHA1: 90b3abb1b39f34a052d899ea85cc4e5e0be60bd3 weston-2.0.0.tar.xz SHA256: b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8 weston-2.0.0.tar.xz PGP: http://wayland.freedesktop.org/releases/weston-2.0.0.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland-web] FAQ: do not mention GPL
On Thu, Feb 23, 2017 at 07:57:58AM -0800, Yong Bakos wrote: > Hi Pekka, > > > On Feb 23, 2017, at 7:32 AM, Pekka Paalanenwrote: > > > > From: Pekka Paalanen > > > > I could not find what the "some example code" could be. There is > > certainly nothing GPL in Wayland or Weston repositories. > > > > I hear having GPL mentioned in the FAQ has raised some questions with > > lawyers, too. It's just misleading. > > > > While at it, make it more clear which MIT license we refer to. > > > > Signed-off-by: Pekka Paalanen > > Reviewed-by: Yong Bakos LGTM, landed: To ssh://git.freedesktop.org/git/wayland/wayland-web 28245d7..df85c1d master -> master > yong > > > > --- > > faq.html | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/faq.html b/faq.html > > index 9fd8731..ef76657 100644 > > --- a/faq.html > > +++ b/faq.html > > @@ -28,8 +28,8 @@ > > What is the license? > > > > > > - Wayland is licensed under the MIT license with some example code > > - under the GPL. > > + Wayland is licensed under the > > + https://cgit.freedesktop.org/wayland/wayland/tree/COPYING;>MIT > > Expat license. > > > > > > Why duplicate all this work? > > -- > > 2.10.2 > > > > ___ > > wayland-devel mailing list > > wayland-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/wayland-devel > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 1.99.94
This is another release candidate for weston 2.0. A handful of fixes have come in since the first release candidate so we're putting out a second RC just to be safe. This includes a couple fixes to potential crashes in screen-share, decouples building with EGL from also requiring Cairo, and exposes the weston_config_next_section API to permit external modules to iterate over the configuration file. Changes since weston 1.12 include EGL_KHR_swap_buffers_with_damage support, porting backends to new API for output setup, support for DRM_FORMAT_YUV444 buffers in the gl backend, better panel positioning support for desktop-shell, improved XWayland warning messages, and numerous refactoring and bugfixing improvements. Of particular note, libweston is bumped to 2 due to an ABI breakage introduced with the new output API. A couple more days will be allowed for final testing. So, barring any other last minute changes, final release for weston 2.0 can be expected towards the end of this week. Changes since previous RC: -- Bryce Harrington (1): configure.ac: bump to version 1.99.94 for the RC2 release Daniel Stone (3): screen-share: Avoid NULL dereference screen-share: Use wl_list_for_each_safe on destroy clients: Fix build without Cairo/GLES2 Emmanuel Gil Peyrot (1): config-parser: Export weston_config_next_section git tag: 1.99.94 http://wayland.freedesktop.org/releases/weston-1.99.94.tar.xz MD5: 66abe352e37cbbe151cfc15cc891671f weston-1.99.94.tar.xz SHA1: a979c305dcdcd8afb498ed434269109c50d58733 weston-1.99.94.tar.xz SHA256: 953392ab050acaaecc207fc9425a21b921bdcb0816952fe24bc0ce730d3d9ef6 weston-1.99.94.tar.xz PGP: http://wayland.freedesktop.org/releases/weston-1.99.94.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] wayland 1.13.0
This is the official release of Wayland 1.13. There have been no changes since beta and RC1. In addition to a range of bug fixes, changes since wayland 1.12 have added some API for controlling the visibility of globals and numerous documentation and other improvements. Our next major release will be version 1.14, which will be scheduled tentatively as follows: √ Development opens immediately - 1.14-alpha in early May - 1.14-beta around mid May - 1.14-rc1 late May, with rc2 only if necessary - 1.14.0 around beginning of June Changes since RC: - Bryce Harrington (1): configure.ac: bump to version 1.13.0 for the official release git tag: 1.13.0 http://wayland.freedesktop.org/releases/wayland-1.13.0.tar.xz MD5: cae152ed956da6de53f9727bc1c45039 wayland-1.13.0.tar.xz SHA1: a8575325ed2885948624043c71629310df928312 wayland-1.13.0.tar.xz SHA256: 69b052c031a61e89af7cc8780893d0da1e301492352aa449dee9345043e6fe51 wayland-1.13.0.tar.xz PGP: http://wayland.freedesktop.org/releases/wayland-1.13.0.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] config-parser: Export weston_config_next_section
On Tue, Feb 21, 2017 at 02:35:14PM +0200, Pekka Paalanen wrote: > On Tue, 21 Feb 2017 11:58:20 + > Emmanuel Gil Peyrot <emmanuel.pey...@collabora.com> wrote: > > > This symbol wasn’t exported from the weston binary, most likely due to > > an oversight in 6e2c12496bbef3cc913cfe9d5f0aeb4d8b23b368, and because > > internal modules can link against libshared.la directly it hasn’t been > > found ever since. > > > > This commit makes it possible for external modules to iterate over the > > configuration file. > > > > Signed-off-by: Emmanuel Gil Peyrot <emmanuel.pey...@collabora.com> > > --- > > shared/config-parser.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/shared/config-parser.c b/shared/config-parser.c > > index e2b5fa25..2a595b1f 100644 > > --- a/shared/config-parser.c > > +++ b/shared/config-parser.c > > @@ -490,6 +490,7 @@ weston_config_get_full_path(struct weston_config > > *config) > > return config == NULL ? NULL : config->path; > > } > > > > +WL_EXPORT > > int > > weston_config_next_section(struct weston_config *config, > >struct weston_config_section **section, > > Reviewed-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> > > Bryce, this is a low-risk patch which we cannot land in a stable branch > after the release because it adds ABI to libweston and that AFAIU would > require a minor-version bump, but the stable branch only does > patch-version bumps. OTOH, it is not a release critical bug fix IMHO. > You should decide if this goes in for Weston 2.0 or waits for a whole > cycle before being released. I am fine either way, really, but I am > also in a slightly awkward position to make the call (conflict of > interests). > > I know Emmanuel has a use case for this function in an out-of-tree > weston plugin. I see nothing that concerns me with the patch, and avoiding the annoyance of an ABI bump seems reasonable enough. Since we're already including some other last minute patches and ought to run an RC2 anyway, I see no reason not to toss this one in as well. Acked-by: Bryce Harrington <br...@osg.samsung.com> > The whole libweston thing is a little sad: libshared.la gets built into > libweston. config-parser.c exports functions, presumably because they > were necessary to export from weston the executable for plugins to use. > But because of that, libweston also now exports a bunch of functions it > shouldn't really. I filed: > https://phabricator.freedesktop.org/T7713 Kind of makes me idly wonder if an external dependency for config/option parsing wouldn't be worth considering. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] clients: Fix build without Cairo/GLES2
On Mon, Feb 20, 2017 at 03:46:55PM +, Emil Velikov wrote: > On 16 February 2017 at 21:52, Daniel Stone <dani...@collabora.com> wrote: > > If we're building with EGL support generally, but without Cairo/GLESv2, > > building the clients fail, because window.c defines the EGL native > > types, however platform.h also brings these in. > > > > Signed-off-by: Daniel Stone <dani...@collabora.com> > > Cc: Emil Velikov <emil.veli...@collabora.com> > > Cc: Bryce Harrington <bry...@osg.samsung.com> > > --- > > clients/window.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/clients/window.c b/clients/window.c > > index 59fc07e..95796d4 100644 > > --- a/clients/window.c > > +++ b/clients/window.c > > @@ -55,7 +55,7 @@ > > #include > > > > #include > > -#else /* HAVE_CAIRO_EGL */ > > +#elif !defined(ENABLE_EGL) /* platform.h defines these if EGL is enabled */ > > typedef void *EGLDisplay; > > typedef void *EGLConfig; > > typedef void *EGLContext; > Not a huge expert on the permutations available here, but this seems correct. > Reviewed-by: Emil Velikov <emil.veli...@collabora.com> > > Fwiw typedef redefinition is a C11 feature. Add -pedantic to GCC to flag it > up. > Although yes, the define has also changed, even if it expands to > > #define EGL_NO_DISPLAY ((EGLDisplay)(0)) > > -Emil Acked-by: Bryce Harrington <br...@osg.samsung.com> ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 2/2] screen-share: Use wl_list_for_each_safe on destroy
On Thu, Feb 16, 2017 at 07:59:51PM +, Daniel Stone wrote: > Destroying the shared seat removes the link from so->seat_list. > > Signed-off-by: Daniel Stone <dani...@collabora.com> Acked-by: Bryce Harrington <br...@osg.samsung.com> > --- > compositor/screen-share.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/compositor/screen-share.c b/compositor/screen-share.c > index 069da1d..a6f82b1 100644 > --- a/compositor/screen-share.c > +++ b/compositor/screen-share.c > @@ -884,7 +884,7 @@ shared_output_create(struct weston_output *output, int > parent_fd) > { > struct shared_output *so; > struct wl_event_loop *loop; > - struct ss_seat *seat; > + struct ss_seat *seat, *tmp; > int epoll_fd; > > so = zalloc(sizeof *so); > @@ -972,7 +972,7 @@ shared_output_create(struct weston_output *output, int > parent_fd) > return so; > > err_display: > - wl_list_for_each(seat, >seat_list, link) > + wl_list_for_each_safe(seat, tmp, >seat_list, link) > ss_seat_destroy(seat); > wl_display_disconnect(so->parent.display); > err_alloc: > -- > 2.9.3 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/2] screen-share: Avoid NULL dereference
On Thu, Feb 16, 2017 at 07:59:50PM +, Daniel Stone wrote: > Don't try to dereference the seat if it's NULL. > > Signed-off-by: Daniel Stone <dani...@collabora.com> Yep, obviously correct. Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > compositor/screen-share.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/compositor/screen-share.c b/compositor/screen-share.c > index bcb9def..069da1d 100644 > --- a/compositor/screen-share.c > +++ b/compositor/screen-share.c > @@ -192,7 +192,7 @@ ss_seat_handle_keymap(void *data, struct wl_keyboard > *wl_keyboard, > char *map_str; > > if (!data) > - goto error; > + goto error_no_seat; > > if (format == WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { > map_str = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); > @@ -235,6 +235,7 @@ ss_seat_handle_keymap(void *data, struct wl_keyboard > *wl_keyboard, > > error: > wl_keyboard_release(seat->parent.keyboard); > +error_no_seat: > close(fd); > } > > -- > 2.9.3 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] Update COPYING
On Fri, Feb 17, 2017 at 07:50:45AM -0600, Derek Foreman wrote: > On 17/02/17 07:47 AM, Pekka Paalanen wrote: > >On Mon, 13 Feb 2017 21:45:58 + > >Daniel Stonewrote: > > > >>Include a list of every copyright statement within the COPYING file. > >> > >>Signed-off-by: Daniel Stone > >>--- > >> COPYING | 37 - > >> 1 file changed, 32 insertions(+), 5 deletions(-) > >> > >>diff --git a/COPYING b/COPYING > >>index faefd8f..418b4b4 100644 > >>--- a/COPYING > >>+++ b/COPYING > >>@@ -1,8 +1,35 @@ > >>-Copyright © 2008-2012 Kristian Høgsberg > >>-Copyright © 2010-2012 Intel Corporation > >>-Copyright © 2010-2011 Benjamin Franzke > >>-Copyright © 2011-2012 Collabora, Ltd. > >>-Copyright © 2010 Red Hat > >>+Copyright © 2008 Tungsten Graphics, Inc. > >>+Copyright © 2008-2013 Kristian Høgsberg > >>+Copryight © 2009 Chris Wilson > >>+Copyright © 2011-2012 Benjamin Franzke > >>+Copyright © 2010-2013 Intel Corporation > >>+Copyright © 2010-2015 Red Hat > >>+Copyright © 2011 Tim Wiederhake > >>+Copyright © 2011-2016 Collabora, Ltd. > >>+Copyright © 2012 John Kåre Alsaker > >>+Copyright © 2012 Martin Minarik > >>+Copyright © 2012 Openismus GmbH > >>+Copyright © 2012 Philipp Brüschweiler > >>+Copyright © 2012 Rob Clark > >>+Copyright © 2012 Sam Spilsbury > >>+Copyright © 2012 Scott Moreau > >>+Copyright © 2012-2013 Jonas Ådahl > >>+Copyright © 2012-2013 Raspberry Pi Foundation > >>+Copyright © 2013 David FORT > >>+Copyright © 2013 David Herrmann > >>+Copyright © 2013 Philip Withnall > >>+Copyright © 2013 Rafael Antognolli > >>+Copyright © 2013 Richard Hughes > >>+Copyright © 2013 Vasily Khoruzhick > >>+Copyright © 2013-2015 Jasper St. Pierre > >>+Copyright © 2013-1014 Jason Ekstrand > >>+Copyright © 2013-2016 DENSO CORPORATION > >>+Copyright © 2014 Pekka Paalanen > >>+Copyright © 2015 General Electric Company > >>+Copyright © 2015-2016 Samsung Electrics Co., Ltd > >>+Copryight © 2016 Armin Krezović > >>+Copyright © 2016 Benoit Gschwind > >>+Copyright © 2016 NVIDIA Corporation > >> > >> Permission is hereby granted, free of charge, to any person obtaining a > >> copy of this software and associated documentation files (the "Software"), > > > >Hi, > > > >I have been verifying this with: > > > >$ while read LINE; do if [ -z "$LINE" ]; then break; fi; echo "---"; grep > >-nR "$(echo "$LINE" | cut -d' ' -f4-)" *; done < COPYING > > > >and I saw some discrepancies: > >- Kristian should be 2008-2012, not 2013 > >- Intel should be 2009-2013 > >- Spilsbury should be 2013 > >- David FORT is not found, but I recall he's the RDP backend author, so > > definitely has copyright, the line in compositor-rdp.c is just > > something else. > >- Rafael Antognolli is not found? > >- Jasper St. Pierre should be 2015 only > >- Samsung Electrics Co., Ltd should be Samsung Electronics Co., Ltd > > > >We talked in IRC, and noticed that you included generated files whose > >source (XML files) are not in Weston repository and we do not > >distribute the generated files at all. > > > >We agreed to see about a v2. > > How about we just remove all the copyrights from COPYING and let > anyone that needs to collate this list do it themselves... > > That way we don't need to remember to update it in 2 weeks when > someone adds a copyright to a file and doesn't realize we duplicate > the info in COPYING? :) +1 It seems atypical amongst open source projects to have an exhaustive (and duplicative as pointed out) listing of copyright statements. Has there been an issue raised from outside the project that this listing would solve? Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 1.99.93
This is the release candidate for weston 2.0. A few cleanups have landed since the beta including several refinements for the drm compositor backend. Changes since weston 1.12 include EGL_KHR_swap_buffers_with_damage support, porting backends to new API for output setup, support for DRM_FORMAT_YUV444 buffers in the gl backend, better panel positioning support for desktop-shell, and numerous refactoring and bugfixing improvements. Of particular note, libweston is bumped to 2 due to an ABI breakage introduced with the new output API. Changes since Beta: --- Armin Krezović (2): compositor: Improve xwayland warning message compositor-drm: Mark eDP connection as internal Bryce Harrington (1): configure.ac: bump to version 1.99.93 for the RC1 release Daniel Stone (3): compositor-drm: Remove crtc_allocator compositor-drm: Avoid connector_allocator for hotplugs compositor-drm: Remove connector_allocator Yong Bakos (1): (multiple): Use standard permission notice git tag: 1.99.93 http://wayland.freedesktop.org/releases/weston-1.99.93.tar.xz MD5: 086436e5fddb1cdfee1b519611d33628 weston-1.99.93.tar.xz SHA1: d1e428d32a4d25169b3639ebd4da12eca0dee970 weston-1.99.93.tar.xz SHA256: f6e95e5e882446259405fa47623504cd99e13b242d180eacf1032196e025d61f weston-1.99.93.tar.xz PGP: http://wayland.freedesktop.org/releases/weston-1.99.93.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] wayland 1.12.93
This is the release candidate for wayland 1.13. There have been no changes since the beta. In addition to a range of bug fixes, changes since wayland 1.12 have added some API for controlling the visibility of globals and numerous documentation and other improvements. We're still on schedule for the official release some time on or around Feb 21st. Changes since Beta: --- Bryce Harrington (1): configure.ac: bump to version 1.12.93 for the RC1 release git tag: 1.12.93 http://wayland.freedesktop.org/releases/wayland-1.12.93.tar.xz MD5: 3c1cf2c6624a7c528fa2e80140e4c992 wayland-1.12.93.tar.xz SHA1: bb560f3f0941831f56cea1ac7552846769fdbcbe wayland-1.12.93.tar.xz SHA256: 8460aded2cc4f32756eb4c75315fe52c8b94566c52d6943c6f691035a573be28 wayland-1.12.93.tar.xz PGP: http://wayland.freedesktop.org/releases/wayland-1.12.93.tar.xz.sig ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 1.99.92
Here is the beta for the upcoming weston 2.0 release. Changes since weston 1.12 include EGL_KHR_swap_buffers_with_damage support, porting backends to new API for output setup, support for DRM_FORMAT_YUV444 buffers in the gl backend, better panel positioning support for desktop-shell, and numerous refactoring and bugfixing improvements. Of particular note, libweston is bumped to 2 due to an ABI breakage introduced with the new output API. See the alpha release announcement for previous changes. Changes since Alpha: Armin Krezović (1): compositor-drm: Restore use-current-mode functionality Bryce Harrington (4): releasing: Drop extraneous word in docs libweston: grammar fix to recent comment releasing: Copyedits configure.ac: bump to version 1.99.92 for the beta release Daniel Stone (5): compositor-rdp: Fix build with freerdp2, take 2 Add comments and whitespace to repaint machinery Move weston-egl-ext.h to shared tests: Remove buffer-count Revert "clients: teach simple-dmabuf-v4l to deal with flipped input" Emilio Pozuelo Monfort (1): compositor: damage pending subsurfaces when committing them Giulio Camuffo (1): launcher: don't try to switch to weston's vt Micah Fedke (2): compositor-drm: don't put y-inverted / interlaced / bottom-first dmabufs on overlays clients: teach simple-dmabuf-v4l to deal with flipped input Pekka Paalanen (6): tests/shell: get rid of static variables tests/shell: change background color tests: implement get_test_name() tests: put screenshots to ./logs by default tests: add subsurface-shot test tests: doc iterating in the runner Quentin Glidic (1): tests: add test-desktop-shell Ucan, Emre (ADITG/SW1) (11): ivi-shell: fix typo in layer_destroy API ivi-shell: don't check view is rendered before adding surface ivi-shell: don't check layer is already on the screen ivi-shell: add layer_add_surfaces test ivi-shell: add screen_add_layers test systemd: fix Wincompatible-pointer-type ivi-shell: pass only ivi_view to update_prop ivi-shell: simplify commit_changes function compositor-drm: update connectors with connector config compositor-drm: don't pass option_connector to create_outputs ivi-shell: Damage view below after unmapping git tag: 1.99.92 http://wayland.freedesktop.org/releases/weston-1.99.92.tar.xz MD5: 4375fa88965b40be4ce8fc0ff73ad142 weston-1.99.92.tar.xz SHA1: 148a2038c8bc04bfd1f54e390f7743041cbf4834 weston-1.99.92.tar.xz SHA256: dd20dc0e449ec333289f77d3ee879f0a2c6fcd149aeabfe92c98339c900f3d5b weston-1.99.92.tar.xz PGP: http://wayland.freedesktop.org/releases/weston-1.99.92.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH v2] clients: teach simple-dmabuf-v4l to deal with flipped input
On Wed, Feb 08, 2017 at 11:33:29AM -0500, Micah Fedke wrote: > Bryce, > > Here is a branch that uses the legacy VIDIOC_QUERYCTRL to query the > controls, instead of VIDIOC_QUERY_EXT_CTRL. I believe this will make > it more compatible with older kernels. Can you test it? > > https://git.collabora.com/cgit/user/fedke.m/weston.git/log/?h=yflip_queryctl_legacy_01 > For some reason I can't check out the branch. ("warning: remote HEAD refers to nonexistent ref, unable to checkout.") But if I dl and apply the top patch to current weston trunk it does build and distcheck properly. Can't comment on the technicals as I don't know V4L2, but noticed: + printf ("\"%s\" control is set, but dmabuf output" +"cannot be flipped horizontally\n", hflip_ctrl); S/b space between 'output' / 'cannot' (or 'cannot'/'be' in original patch). Also if this is a warning, should fprintf to stderr like other warnings in this file. Thanks, Bryce > Thanks, > > -mf > > On 02/07/2017 08:17 PM, Bryce Harrington wrote: > >On Tue, Feb 07, 2017 at 11:48:47AM +0200, Pekka Paalanen wrote: > >>On Mon, 6 Feb 2017 12:57:41 -0500 > >>Micah Fedke <micah.fe...@collabora.co.uk> wrote: > >> > >>>The v4l2 API can be queried to detect if the input video image is > >>>horizontally or vertically flipped. If the image is y-flipped, we can > >>>set the ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT flag to notify the > >>>compositor. If the image is h-flipped, we can only print a warning > >>>since linux_buffer_params_v1 does not support horizontal flipping. > >>> > >>>Signed-off-by: Micah Fedke <micah.fe...@collabora.co.uk> > >>>--- > >>>This version addresses Pekka's comments by renaming check_v4l2_control to > >>>check_v4l2_control_bool, removing the len parameter, separating out the > >>>logic > >>>tests in check_v4l2_control_bool and fixing spacing issues. > >>> > >>> clients/simple-dmabuf-v4l.c | 62 > >>> +++-- > >>> 1 file changed, 54 insertions(+), 8 deletions(-) > >> > >>Hi, > >> > >>looks fine, pushed with my R-b: > >> 9a200d7..0fee977 master -> master > > > >Breaks the build on older linux kernels. > > > > CC clients/weston_simple_dmabuf_v4l-simple-dmabuf-v4l.o > >clients/simple-dmabuf-v4l.c:358:25: warning: ‘struct v4l2_query_ext_ctrl’ > >declared inside parameter list [enabled by default] > > const int expected_value) > > ^ > >clients/simple-dmabuf-v4l.c:358:25: warning: its scope is only this > >definition or declaration, which is probably not what you want [enabled by > >default] > >clients/simple-dmabuf-v4l.c: In function ‘check_v4l2_control_bool’: > >clients/simple-dmabuf-v4l.c:363:18: error: dereferencing pointer to > >incomplete type > > ctrl.id = qectrl->id; > > ^ > >et al. > > > >Builds ok with the patch reverted, or with > >--disable-simple-dmabuf-v4l-client set. > > > > > >Bryce > > > >___ > >wayland-devel mailing list > >wayland-devel@lists.freedesktop.org > >https://lists.freedesktop.org/mailman/listinfo/wayland-devel > > > > -- > > Micah Fedke > Collabora Ltd. > +44 1223 362967 > https://www.collabora.com/ > https://twitter.com/collaboraltd ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] wayland 1.12.92
Here is the beta for the upcoming 1.13 release. In addition to a range of bug fixes, this adds some API for controlling the visibility of globals and numerous documentation additions and improvements. As per the previously announced schedule the first release candidate will be in a week's time. Development focus between now and then should be on bug fixing only. See the alpha release announcement for previous changes. Changes since Alpha: Bryce Harrington (1): configure.ac: bump to version 1.12.92 for the beta release Derek Foreman (3): server: Refactor array send functions server: Disallow sending events to clients after posting an error wayland-server: log an error for events with wrong client objects Giulio Camuffo (3): server: add a safer signal type and port wl_display to it server: use the new wl_priv_signal in wl_client server: use the new wl_priv_signal for wl_resource Olivier Fourdan (1): tests: Add a test for global filter Pekka Paalanen (1): wayland-server: hide wl_priv_signal from doxygen Yong Bakos (2): dtddata: Use standard permission notice tests: Test wl_argument_from_va_list git tag: 1.12.92 http://wayland.freedesktop.org/releases/wayland-1.12.92.tar.xz MD5: 86907ae5a856780ea70699232a15495b wayland-1.12.92.tar.xz SHA1: bb3b6c61abda57b900dc5d4ffa0b49d71097e49c wayland-1.12.92.tar.xz SHA256: ab5846f8319549d48e0b4ed94864da0acbd568f908d84c457192e0a7ecd135a7 wayland-1.12.92.tar.xz PGP: http://wayland.freedesktop.org/releases/wayland-1.12.92.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH v2] clients: teach simple-dmabuf-v4l to deal with flipped input
On Tue, Feb 07, 2017 at 11:48:47AM +0200, Pekka Paalanen wrote: > On Mon, 6 Feb 2017 12:57:41 -0500 > Micah Fedkewrote: > > > The v4l2 API can be queried to detect if the input video image is > > horizontally or vertically flipped. If the image is y-flipped, we can > > set the ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT flag to notify the > > compositor. If the image is h-flipped, we can only print a warning > > since linux_buffer_params_v1 does not support horizontal flipping. > > > > Signed-off-by: Micah Fedke > > --- > > This version addresses Pekka's comments by renaming check_v4l2_control to > > check_v4l2_control_bool, removing the len parameter, separating out the > > logic > > tests in check_v4l2_control_bool and fixing spacing issues. > > > > clients/simple-dmabuf-v4l.c | 62 > > +++-- > > 1 file changed, 54 insertions(+), 8 deletions(-) > > Hi, > > looks fine, pushed with my R-b: >9a200d7..0fee977 master -> master Breaks the build on older linux kernels. CC clients/weston_simple_dmabuf_v4l-simple-dmabuf-v4l.o clients/simple-dmabuf-v4l.c:358:25: warning: ‘struct v4l2_query_ext_ctrl’ declared inside parameter list [enabled by default] const int expected_value) ^ clients/simple-dmabuf-v4l.c:358:25: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] clients/simple-dmabuf-v4l.c: In function ‘check_v4l2_control_bool’: clients/simple-dmabuf-v4l.c:363:18: error: dereferencing pointer to incomplete type ctrl.id = qectrl->id; ^ et al. Builds ok with the patch reverted, or with --disable-simple-dmabuf-v4l-client set. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 1.99.91
Here's the alpha for the upcoming 2.0.0 release. Below are the full list of changes so far for this release. Changes: Abdur Rehman (16): clients: fix a couple of trivial typos configure.ac: correct text desktop-shell: fix a typo ivi-shell: fix minor typos compositor-drm: fix a couple of typos compositor: fix a minor typo man: fix grammar notes: fix a typo protocol: fix grammar releasing: fix a typo shared/helpers.h: fix a typo in a comment shared: fix a typo in a comment zunitc: fix a couple of typos zunitc: fix a typo in a comment wcap: fix a typo in README xwayland: fix three minor typos Armin Krezović (28): libweston-desktop: Fix some clang warnings clients/stacking: Silence a compiler warning libweston: Add more functionality for handling weston_output objects libweston: Add initial output API for windowed outputs configuration compositor: Implement output configuration using windowed_output_api weston: Port DRM backend to new output handling API weston: Port fbdev backend to new output handling API weston: Port headless backend to new output handling API weston: Port RDP backend to new output handling API weston: Port Wayland backend to new output handling API weston: Port X11 backend to new output handling API libweston: Merge weston_output_init() into weston_output_enable() weston: Rename weston_output_init_pending() to weston_output_init() libweston: Remove weston_backend_output_config structure libweston: Drop requirement of setting mm_width/mm_height in backends compositor-rdp: Properly destroy the renderer and pixman image compositor-wayland: Convert use-pixman flag to boolean compositor-wayland: Convert sprawl flag to boolean compositor-wayland: Convert draw_initial_frame to boolean compositor-wayland: Convert fullscreen flag to bool gl-renderer: Use EGL_KHR_no_config_context compositor-wayland: Move vfunc setting from set_size to enable compositor-wayland: Simplify fullscreen output surface handling compositor-wayland: Properly clean up on backend destroy compositor-wayland: Destroy shm buffers on output disable compositor-x11: Move vfunc setting from set_size to enable compositor-wayland: Port to xdg-shell-v6 compositor-wayland: Support building without EGL Arnaud Vrac (1): compositor: allow using nested parent as a subsurface sibling Ben (1): Remove dbus-launch from weston.desktop Bryce Harrington (11): configure.ac: bump version to 1.12.90 for open development configure: Also update libweston version to match weston clients: Add XKB compose key support window: Fix 'devlivery' misspelling simple-im: Use returns from main() consistently simple-im: Use the appropriate enum names to xkb calls simple-im: Rename source file to be consistent with other client tools gl: Don't declare variables in for loop editor: Use parse_options() from shared for command line options editor: Load a file if specified on command line configure.ac: bump to version 1.99.91 for the alpha release Carlos Garnacho (1): xwayland: Create the drag-and-drop window in weston_wm_dnd_init Daniel Díaz (1): Add configuration option for no input device. Daniel Stone (25): clients: Make XKB compose support conditional xwayland: Move includes to avoid deprecation warnings text-input: Clear out context->input pointer xwayland: Fix X11 lock file size confusion tests: Extend subsurface place_{above,below} hierarchy Don't include version.h from compositor.h compositor-wayland: Set frame callback for Pixman Don't prepend protocol/ to include paths compositor-wayland: Destroy cursor images earlier libweston: Make module loading safe against long paths tests: Skip Xwayland test if binary isn't available compositor-drm: Comment struct members compositor-drm: Simplify drm_sprite_crtc_supported compositor-drm: Extract EGL destroy to helper compositor-drm: Use fb->fd consistently compositor-drm: Use signed int for width/height compositor-drm: Store width and height inside drm_fb compositor-drm: Delete drm_backend_set_modes compositor-drm: Remove open-coded weston_compositor_wake Remove DPMS-on when going offscreen compositor-drm: Reshuffle and comment plane conditions compositor: Assign new views to the primary plane compositor-x11: Remove support for ancient XCB desktop-shell: Initialise panel surface listener desktop-shell: Support panel-position 'none' Derek Foreman (2): clients: Fix weston-scaler source-only mode to use integer width and height weston-terminal: Fix
Re: [PATCH weston] clients: fix errno handling
On Thu, Jan 19, 2017 at 08:21:45AM +1000, Peter Hutterer wrote: > clients/editor.c: In function ‘read_file’: > clients/editor.c:1578:16: warning: logical ‘or’ applied to non-boolean > constant [-Wlogical-op] > errno = errsv || EINVAL; > > This works in the shell, but not in C. Introduced in 411ffabbb56b > > Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> LGTM, Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > Changes to v1: > - first version didn't return the right errno, whoops :) > > clients/editor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/clients/editor.c b/clients/editor.c > index f1dffe1..a0cc97a 100644 > --- a/clients/editor.c > +++ b/clients/editor.c > @@ -1575,7 +1575,7 @@ error: > if (fin) > fclose(fin); > free(buffer); > - errno = errsv || EINVAL; > + errno = errsv ? errsv : EINVAL; > > return NULL; > } > -- > 2.9.3 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: Schedule for 1.13 release
Lets try that again: Friday the 13th of January seems an auspiciously ominous time to announce the schedule for 1.13. So here's the upcoming dates: - 1.13-alpha around Jan 24th. Major features done by this point. - 1.13-beta in first week of February. - 1.13-rc1 around Feb 14th. - Additional rc's as needed. - 1.13.0 by Feb 21st at the earliest ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Schedule for 1.13 release
Friday the 13th of January seems an auspiciously ominous time to announce the schedule for 1.13. So here's the upcoming dates: - 1.10-alpha around Jan 24th. Major features done by this point. - 1.10-beta in first week of February. - 1.10-rc1 around Feb 14th. - Additional rc's as needed. - 1.10.0 by Feb 21st at the earliest signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH] building: fix a typo
On Tue, Jan 03, 2017 at 03:40:58PM +0500, Abdur Rehman wrote: > Signed-off-by: Abdur Rehman <arehmanq...@gmail.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> Pushed: b4bd796..5e88d0d master -> master > --- > building.html | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/building.html b/building.html > index 34663e3..95179cf 100644 > --- a/building.html > +++ b/building.html > @@ -66,7 +66,7 @@ the DRM-backend. > Hardware / Drivers > > X output requires http://dri.freedesktop.org/wiki/;>DRI2. > -Output outside of X requres href="http://dri.freedesktop.org/wiki/DRM/;>DRM and href="https://wiki.archlinux.org/index.php/kernel_mode_setting;>Kernel Mode > +Output outside of X requires href="http://dri.freedesktop.org/wiki/DRM/;>DRM and href="https://wiki.archlinux.org/index.php/kernel_mode_setting;>Kernel Mode > Setting (KMS) with the page flip ioctl. These are supported by: > > Intel: i915 (June 2004) or newer cards. DRM support has been > -- > 1.9.1 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH v4 wayland] wayland-server: log an error for events with wrong client objects
On Mon, Dec 12, 2016 at 12:46:30PM -0800, Yong Bakos wrote: > Hi Derek, > > > On Dec 12, 2016, at 12:39 PM, Derek Foreman <der...@osg.samsung.com> wrote: > > > > Check that all the objects in an event belong to the same client as > > the resource posting it. This prevents a compositor from accidentally > > mixing client objects and posting an event that causes a client to > > abort with a cryptic message. > > > > Instead the client will now be disconnected as it is when the compositor > > tries to send a null for a non-nullable object, and a log message > > will be printed by the compositor. > > > > Signed-off-by: Derek Foreman <der...@osg.samsung.com> > > Reviewed-by: Yong Bakos <yba...@humanoriented.com> Looks like a good approach to flag the potential issue. And agreed, logging an error is probably friendlier than forcing users to terminate their server. Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > yong > > > > --- > > src/wayland-server.c | 38 ++ > > 1 file changed, 38 insertions(+) > > > > This started life as an assert, became an abort, and now it's a log > > and disconnect. Log and disconnect is already how we manage nullable > > violation on the compositor side, so I'm hoping it won't be too > > controversial. > > > > For EFL clients the disconnect is recoverable under some circumstances with > > our session recovery protocol, but the current client-abort()s behaviour > > is not. > > > > Changes from v1: > > uses get_next_arguemnts and arg_count_for_signature instead of a bespoke > > implementation. > > > > Changes from v2: > > Tests new_id objects as well > > logs and disconnects instead of assert()/abort() > > superficial changes to the log text > > > > Changes from v3: > > Actually printing the interface name and message name make this > > useful for debugging - instead of actually less informative > > than it was with a client side error. > > > > diff --git a/src/wayland-server.c b/src/wayland-server.c > > index 9d7d9c1..023d427 100644 > > --- a/src/wayland-server.c > > +++ b/src/wayland-server.c > > @@ -160,6 +160,36 @@ log_closure(struct wl_resource *resource, > > } > > } > > > > +static bool > > +verify_objects(struct wl_resource *resource, uint32_t opcode, > > + union wl_argument *args) > > +{ > > + struct wl_object *object = >object; > > + const char *signature = object->interface->events[opcode].signature; > > + struct argument_details arg; > > + struct wl_resource *res; > > + int count, i; > > + > > + count = arg_count_for_signature(signature); > > + for (i = 0; i < count; i++) { > > + signature = get_next_argument(signature, ); > > + switch (arg.type) { > > + case 'n': > > + case 'o': > > + res = (struct wl_resource *) (args[i].o); > > + if (res && res->client != resource->client) { > > + wl_log("compositor bug: The compositor " > > + "tried to use an object from one " > > + "client in a '%s.%s' for a different " > > + "client.\n", object->interface->name, > > + object->interface->events[opcode].name); > > + return false; > > + } > > + } > > + } > > + return true; > > +} > > + > > WL_EXPORT void > > wl_resource_post_event_array(struct wl_resource *resource, uint32_t opcode, > > union wl_argument *args) > > @@ -167,6 +197,10 @@ wl_resource_post_event_array(struct wl_resource > > *resource, uint32_t opcode, > > struct wl_closure *closure; > > struct wl_object *object = >object; > > > > + if (!verify_objects(resource, opcode, args)) { > > + resource->client->error = 1; > > + return; > > + } > > closure = wl_closure_marshal(object, opcode, args, > > >interface->events[opcode]); > > > > @@ -206,6 +240,10 @@ wl_resource_queue_event_array(struct wl_resource > > *resource, uint32_t opcode, > > struct wl_closure *closure; > > struct wl_object *object = >object; > > > > + if (!verif
Re: [PATCH weston v3 1/2] editor: Use parse_options() from shared for command line options
On Sun, Nov 27, 2016 at 02:54:54PM -0800, Yong Bakos wrote: > On Nov 21, 2016, at 1:26 PM, Bryce Harrington <br...@osg.samsung.com> wrote: > > > > Also add a basic --help option > > > > Signed-off-by: Bryce Harrington <br...@osg.samsung.com> > > This patch extracts some option flags out of main, uses parse_options instead > of strcmp, and adds some behavior around the help option and error behavior > around an excess arg count. It reflects the same option-parsing idiom found > elsewhere in the weston codebase. > > While the `char *text_buffer` declaration in main belongs in 2/2 of this > patch, > this one is: I've made that change and pushed the two patches with your review, thanks! To ssh://git.freedesktop.org/git/wayland/weston 21fac60..411ffab master -> master Bryce > Reviewed-by: Yong Bakos <yba...@humanoriented.com> > > yong > > > > --- > > clients/editor.c | 80 > > > > 1 file changed, 58 insertions(+), 22 deletions(-) > > > > diff --git a/clients/editor.c b/clients/editor.c > > index 30bf555..b8fc63a 100644 > > --- a/clients/editor.c > > +++ b/clients/editor.c > > @@ -37,6 +37,7 @@ > > > > #include > > > > +#include "shared/config-parser.h" > > #include "shared/helpers.h" > > #include "shared/xalloc.h" > > #include "window.h" > > @@ -1489,28 +1490,63 @@ global_handler(struct display *display, uint32_t > > name, > > } > > } > > > > +/** Display help for command line options, and exit */ > > +static uint32_t opt_help = 0; > > + > > +/** Require a distinct click to show the input panel (virtual keyboard) */ > > +static uint32_t opt_click_to_show = 0; > > + > > +/** Set a specific (RFC-3066) language. Used for the virtual keyboard, > > etc. */ > > +static const char *opt_preferred_language = NULL; > > + > > +/** > > + * \brief command line options for editor > > + */ > > +static const struct weston_option editor_options[] = { > > + { WESTON_OPTION_BOOLEAN, "help", 'h', _help }, > > + { WESTON_OPTION_BOOLEAN, "click-to-show", 'C', _click_to_show }, > > + { WESTON_OPTION_STRING, "preferred-language", 'L', > > _preferred_language }, > > +}; > > + > > +static void > > +usage(const char *program_name, int exit_code) > > +{ > > + unsigned k; > > + > > + fprintf(stderr, "Usage: %s [OPTIONS]\n\n", program_name); > > + for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { > > + const struct weston_option *p = _options[k]; > > + if (p->name) { > > + fprintf(stderr, " --%s", p->name); > > + if (p->type != WESTON_OPTION_BOOLEAN) > > + fprintf(stderr, "=VALUE"); > > + fprintf(stderr, "\n"); > > + } > > + if (p->short_name) { > > + fprintf(stderr, " -%c", p->short_name); > > + if (p->type != WESTON_OPTION_BOOLEAN) > > + fprintf(stderr, "VALUE"); > > + fprintf(stderr, "\n"); > > + } > > + } > > + exit(exit_code); > > +} > > + > > int > > main(int argc, char *argv[]) > > { > > struct editor editor; > > - int i; > > - uint32_t click_to_show = 0; > > - const char *preferred_language = NULL; > > - > > - for (i = 1; i < argc; i++) { > > - if (strcmp("--click-to-show", argv[i]) == 0) > > - click_to_show = 1; > > - else if (strcmp("--preferred-language", argv[i]) == 0 && > > -i + 1 < argc) { > > - preferred_language = argv[i + 1]; > > - i++; > > - } else { > > - printf("Usage: %s [OPTIONS]\n" > > - " --click-to-show\n" > > - " --preferred-language LANGUAGE\n", > > - argv[0]); > > - return 1; > > - } > > + char *text_buffer = NULL; > > + > > + parse_options(editor_options, ARRAY_LENGTH(editor_options), > > + , argv); > > + if (opt_help) > > +
Re: [PATCH weston] Don't include version.h from compositor.h
On Wed, Nov 23, 2016 at 06:48:42PM +, Daniel Stone wrote: > Signed-off-by: Daniel Stone <dani...@collabora.com> Nothing in compositor.h or its includes seem to need the version #defines from version.h, so LGTM. Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > libweston/compositor.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libweston/compositor.h b/libweston/compositor.h > index c78cc3b..ce3d9ab 100644 > --- a/libweston/compositor.h > +++ b/libweston/compositor.h > @@ -40,7 +40,6 @@ extern "C" { > #define WL_HIDE_DEPRECATED > #include > > -#include "version.h" > #include "matrix.h" > #include "config-parser.h" > #include "zalloc.h" > -- > 2.9.3 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston v3 1/2] editor: Use parse_options() from shared for command line options
Also add a basic --help option Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/editor.c | 80 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index 30bf555..b8fc63a 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -37,6 +37,7 @@ #include +#include "shared/config-parser.h" #include "shared/helpers.h" #include "shared/xalloc.h" #include "window.h" @@ -1489,28 +1490,63 @@ global_handler(struct display *display, uint32_t name, } } +/** Display help for command line options, and exit */ +static uint32_t opt_help = 0; + +/** Require a distinct click to show the input panel (virtual keyboard) */ +static uint32_t opt_click_to_show = 0; + +/** Set a specific (RFC-3066) language. Used for the virtual keyboard, etc. */ +static const char *opt_preferred_language = NULL; + +/** + * \brief command line options for editor + */ +static const struct weston_option editor_options[] = { + { WESTON_OPTION_BOOLEAN, "help", 'h', _help }, + { WESTON_OPTION_BOOLEAN, "click-to-show", 'C', _click_to_show }, + { WESTON_OPTION_STRING, "preferred-language", 'L', _preferred_language }, +}; + +static void +usage(const char *program_name, int exit_code) +{ + unsigned k; + + fprintf(stderr, "Usage: %s [OPTIONS]\n\n", program_name); + for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { + const struct weston_option *p = _options[k]; + if (p->name) { + fprintf(stderr, " --%s", p->name); + if (p->type != WESTON_OPTION_BOOLEAN) + fprintf(stderr, "=VALUE"); + fprintf(stderr, "\n"); + } + if (p->short_name) { + fprintf(stderr, " -%c", p->short_name); + if (p->type != WESTON_OPTION_BOOLEAN) + fprintf(stderr, "VALUE"); + fprintf(stderr, "\n"); + } + } + exit(exit_code); +} + int main(int argc, char *argv[]) { struct editor editor; - int i; - uint32_t click_to_show = 0; - const char *preferred_language = NULL; - - for (i = 1; i < argc; i++) { - if (strcmp("--click-to-show", argv[i]) == 0) - click_to_show = 1; - else if (strcmp("--preferred-language", argv[i]) == 0 && -i + 1 < argc) { - preferred_language = argv[i + 1]; - i++; - } else { - printf("Usage: %s [OPTIONS]\n" - " --click-to-show\n" - " --preferred-language LANGUAGE\n", - argv[0]); - return 1; - } + char *text_buffer = NULL; + + parse_options(editor_options, ARRAY_LENGTH(editor_options), + , argv); + if (opt_help) + usage(argv[0], EXIT_SUCCESS); + + if (argc > 1) { + usage(argv[0], EXIT_FAILURE); + /* FIXME: Use remaining arguments as a path/filename to load */ + return 0; } memset(, 0, sizeof editor); @@ -1537,12 +1573,12 @@ main(int argc, char *argv[]) editor.widget = window_frame_create(editor.window, ); editor.entry = text_entry_create(, "Entry"); - editor.entry->click_to_show = click_to_show; - if (preferred_language) - editor.entry->preferred_language = strdup(preferred_language); + editor.entry->click_to_show = opt_click_to_show; + if (opt_preferred_language) + editor.entry->preferred_language = strdup(opt_preferred_language); editor.editor = text_entry_create(, "Numeric"); editor.editor->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_NUMBER; - editor.editor->click_to_show = click_to_show; + editor.editor->click_to_show = opt_click_to_show; editor.selection = NULL; editor.selected_text = NULL; -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2 1/2] editor: Use parse_options() from shared for command line options
On Mon, Nov 21, 2016 at 09:08:38PM +0100, Silvan Jegen wrote: > Hi > > > int > > main(int argc, char *argv[]) > > { > > struct editor editor; > > int i; > > This is still unused (as pointed out by Daniel) and should be removed. Oh, thanks, missed that. Bryce > Cheers, > > Silvan > > > - uint32_t click_to_show = 0; > > - const char *preferred_language = NULL; > > - > > - for (i = 1; i < argc; i++) { > > - if (strcmp("--click-to-show", argv[i]) == 0) > > - click_to_show = 1; > > - else if (strcmp("--preferred-language", argv[i]) == 0 && > > -i + 1 < argc) { > > - preferred_language = argv[i + 1]; > > - i++; > > - } else { > > - printf("Usage: %s [OPTIONS]\n" > > - " --click-to-show\n" > > - " --preferred-language LANGUAGE\n", > > - argv[0]); > > - return 1; > > - } > > + > > + parse_options(editor_options, ARRAY_LENGTH(editor_options), > > + , argv); > > + if (opt_help) > > + usage(argv[0], EXIT_SUCCESS); > > + > > + if (argc > 1) { > > + usage(argv[0], EXIT_FAILURE); > > + /* FIXME: Use remaining arguments as a path/filename to load */ > > + return 0; > > } > > > > memset(, 0, sizeof editor); > > @@ -1537,12 +1573,12 @@ main(int argc, char *argv[]) > > editor.widget = window_frame_create(editor.window, ); > > > > editor.entry = text_entry_create(, "Entry"); > > - editor.entry->click_to_show = click_to_show; > > - if (preferred_language) > > - editor.entry->preferred_language = strdup(preferred_language); > > + editor.entry->click_to_show = opt_click_to_show; > > + if (opt_preferred_language) > > + editor.entry->preferred_language = > > strdup(opt_preferred_language); > > editor.editor = text_entry_create(, "Numeric"); > > editor.editor->content_purpose = > > ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_NUMBER; > > - editor.editor->click_to_show = click_to_show; > > + editor.editor->click_to_show = opt_click_to_show; > > editor.selection = NULL; > > editor.selected_text = NULL; > > > > -- > > 1.9.1 > > > > ___ > > wayland-devel mailing list > > wayland-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston v3 2/2] editor: Load a file if specified on command line
Add support for basic text file loading, to facilitate more expansive testing of its UTF-8 text editing support. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/editor.c | 67 +++- 1 file changed, 62 insertions(+), 5 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index b8fc63a..42c7f52 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -25,6 +25,7 @@ #include "config.h" #include +#include #include #include #include @@ -1513,7 +1514,7 @@ usage(const char *program_name, int exit_code) { unsigned k; - fprintf(stderr, "Usage: %s [OPTIONS]\n\n", program_name); + fprintf(stderr, "Usage: %s [OPTIONS] [FILENAME]\n\n", program_name); for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { const struct weston_option *p = _options[k]; if (p->name) { @@ -1532,6 +1533,53 @@ usage(const char *program_name, int exit_code) exit(exit_code); } +/* Load the contents of a file into a UTF-8 text buffer and return it. + * + * Caller is responsible for freeing the buffer when done. + * On error, returns NULL. + */ +static char * +read_file(char *filename) +{ + char *buffer = NULL; + int buf_size, read_size; + FILE *fin; + int errsv; + + fin = fopen(filename, "r"); + if (fin == NULL) + goto error; + + /* Determine required buffer size */ + if (fseek(fin, 0, SEEK_END) != 0) + goto error; + buf_size = ftell(fin); + if (buf_size < 0) + goto error; + rewind(fin); + + /* Create buffer and read in the text */ + buffer = (char*) malloc(sizeof(char) * (buf_size + 1)); + if (buffer == NULL) + goto error; + read_size = fread(buffer, sizeof(char), buf_size, fin); + fclose(fin); + if (buf_size != read_size) + goto error; + buffer[buf_size] = '\0'; + + return buffer; + +error: + errsv = errno; + if (fin) + fclose(fin); + free(buffer); + errno = errsv || EINVAL; + + return NULL; +} + int main(int argc, char *argv[]) { @@ -1544,9 +1592,14 @@ main(int argc, char *argv[]) usage(argv[0], EXIT_SUCCESS); if (argc > 1) { - usage(argv[0], EXIT_FAILURE); - /* FIXME: Use remaining arguments as a path/filename to load */ - return 0; + if (argv[1][0] == '-') + usage(argv[0], EXIT_FAILURE); + + text_buffer = read_file(argv[1]); + if (text_buffer == NULL) { + fprintf(stderr, "could not read file '%s': %m\n", argv[1]); + return -1; + } } memset(, 0, sizeof editor); @@ -1572,7 +1625,10 @@ main(int argc, char *argv[]) editor.window = window_create(editor.display); editor.widget = window_frame_create(editor.window, ); - editor.entry = text_entry_create(, "Entry"); + if (text_buffer) + editor.entry = text_entry_create(, text_buffer); + else + editor.entry = text_entry_create(, "Entry"); editor.entry->click_to_show = opt_click_to_show; if (opt_preferred_language) editor.entry->preferred_language = strdup(opt_preferred_language); @@ -1606,6 +1662,7 @@ main(int argc, char *argv[]) widget_destroy(editor.widget); window_destroy(editor.window); display_destroy(editor.display); + free(text_buffer); return 0; } -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] gl: Don't declare variables in for loop
On Mon, Nov 21, 2016 at 06:06:23PM +, Daniel Stone wrote: > Hi, > > On 21 November 2016 at 18:02, Bryce Harrington <br...@osg.samsung.com> wrote: > > Fixes compilation error introduced by 43cea54c: > > > > libweston/gl-renderer.c:2862:2: error: ‘for’ loop initial declarations > > are only allowed in C99 mode > > for (unsigned i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint); > > i++) { > > ^ > > Sorry, no idea how I didn't spot that during review. Out of interest, > what exotic compiler/CFLAGS are you using to have caught this? Nothing particularly fancy, I think most of this is just stock compiler settings for my distro: GCC_CFLAGS='-Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -Wno-missing-field-initializers \ -g -fvisibility=hidden -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare' Here's the full warning for context: CCLD libweston-desktop-2.la CC libweston/gl_renderer_la-gl-renderer.lo libweston/gl-renderer.c: In function ‘gl_renderer_setup_egl_extensions’: libweston/gl-renderer.c:2862:2: error: ‘for’ loop initial declarations are only allowed in C99 mode for (unsigned i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint); i++) { ^ libweston/gl-renderer.c:2862:2: note: use option -std=c99 or -std=gnu99 to compile your code libweston/gl-renderer.c: At top level: cc1: warning: unrecognized command line option "-Wno-shift-negative-value" [enabled by default] make[1]: *** [libweston/gl_renderer_la-gl-renderer.lo] Error 1 make[1]: Leaving directory `/home/bryce/src/Wayland/weston' make: *** [all] Error 2 So, looks more like -std=c99 just isn't set by default by the compiler on my system (which it shouldn't be, for wayland anyway.) I'm running gcc 4.8.4 which is on the old side; perhaps things have changed wrt c99 defaults used with newer compilers? I haven't sorted out the -Wno-shift-negative-value warning but suspecting it's bogus. > Pushed > with review in any case: > To ssh://git.freedesktop.org/git/wayland/weston >3447619..fe0410b upstream -> master Thanks for reviewing and pushing, Bryce > Cheers, > Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston v2 2/2] editor: Load a file if specified on command line
Add support for basic text file loading, to facilitate more expansive testing of its UTF-8 text editing support. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/editor.c | 68 +++- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index 33b43d2..f386a8b 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -25,6 +25,7 @@ #include "config.h" #include +#include #include #include #include @@ -1513,7 +1514,7 @@ usage(const char *program_name, int exit_code) { unsigned k; - fprintf(stderr, "Usage: %s [OPTIONS]\n\n", program_name); + fprintf(stderr, "Usage: %s [OPTIONS] [FILENAME]\n\n", program_name); for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { const struct weston_option *p = _options[k]; if (p->name) { @@ -1532,10 +1533,58 @@ usage(const char *program_name, int exit_code) exit(exit_code); } +/* Load the contents of a file into a UTF-8 text buffer and return it. + * + * Caller is responsible for freeing the buffer when done. + * On error, returns NULL. + */ +static char * +read_file(char *filename) +{ + char *buffer = NULL; + int buf_size, read_size; + FILE *fin; + int errsv; + + fin = fopen(filename, "r"); + if (fin == NULL) + goto error; + + /* Determine required buffer size */ + if (fseek(fin, 0, SEEK_END) != 0) + goto error; + buf_size = ftell(fin); + if (buf_size < 0) + goto error; + rewind(fin); + + /* Create buffer and read in the text */ + buffer = (char*) malloc(sizeof(char) * (buf_size + 1)); + if (buffer == NULL) + goto error; + read_size = fread(buffer, sizeof(char), buf_size, fin); + fclose(fin); + if (buf_size != read_size) + goto error; + buffer[buf_size] = '\0'; + + return buffer; + +error: + errsv = errno; + if (fin) + fclose(fin); + free(buffer); + errno = errsv || EINVAL; + + return NULL; +} + int main(int argc, char *argv[]) { struct editor editor; + char *text_buffer = NULL; int i; parse_options(editor_options, ARRAY_LENGTH(editor_options), @@ -1544,9 +1593,14 @@ main(int argc, char *argv[]) usage(argv[0], EXIT_SUCCESS); if (argc > 1) { - usage(argv[0], EXIT_FAILURE); - /* FIXME: Use remaining arguments as a path/filename to load */ - return 0; + if (argv[1][0] == '-') + usage(argv[0], EXIT_FAILURE); + + text_buffer = read_file(argv[1]); + if (text_buffer == NULL) { + fprintf(stderr, "could not read file '%s': %m\n", argv[1]); + return -1; + } } memset(, 0, sizeof editor); @@ -1572,7 +1626,10 @@ main(int argc, char *argv[]) editor.window = window_create(editor.display); editor.widget = window_frame_create(editor.window, ); - editor.entry = text_entry_create(, "Entry"); + if (text_buffer) + editor.entry = text_entry_create(, text_buffer); + else + editor.entry = text_entry_create(, "Entry"); editor.entry->click_to_show = opt_click_to_show; if (opt_preferred_language) editor.entry->preferred_language = strdup(opt_preferred_language); @@ -1606,6 +1663,7 @@ main(int argc, char *argv[]) widget_destroy(editor.widget); window_destroy(editor.window); display_destroy(editor.display); + free(text_buffer); return 0; } -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston v2 1/2] editor: Use parse_options() from shared for command line options
Also add a basic --help option Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/editor.c | 78 +--- 1 file changed, 57 insertions(+), 21 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index 30bf555..33b43d2 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -37,6 +37,7 @@ #include +#include "shared/config-parser.h" #include "shared/helpers.h" #include "shared/xalloc.h" #include "window.h" @@ -1489,28 +1490,63 @@ global_handler(struct display *display, uint32_t name, } } +/** Display help for command line options, and exit */ +static uint32_t opt_help = 0; + +/** Require a distinct click to show the input panel (virtual keyboard) */ +static uint32_t opt_click_to_show = 0; + +/** Set a specific (RFC-3066) language. Used for the virtual keyboard, etc. */ +static const char *opt_preferred_language = NULL; + +/** + * \brief command line options for editor + */ +static const struct weston_option editor_options[] = { + { WESTON_OPTION_BOOLEAN, "help", 'h', _help }, + { WESTON_OPTION_BOOLEAN, "click-to-show", 'C', _click_to_show }, + { WESTON_OPTION_STRING, "preferred-language", 'L', _preferred_language }, +}; + +static void +usage(const char *program_name, int exit_code) +{ + unsigned k; + + fprintf(stderr, "Usage: %s [OPTIONS]\n\n", program_name); + for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { + const struct weston_option *p = _options[k]; + if (p->name) { + fprintf(stderr, " --%s", p->name); + if (p->type != WESTON_OPTION_BOOLEAN) + fprintf(stderr, "=VALUE"); + fprintf(stderr, "\n"); + } + if (p->short_name) { + fprintf(stderr, " -%c", p->short_name); + if (p->type != WESTON_OPTION_BOOLEAN) + fprintf(stderr, "VALUE"); + fprintf(stderr, "\n"); + } + } + exit(exit_code); +} + int main(int argc, char *argv[]) { struct editor editor; int i; - uint32_t click_to_show = 0; - const char *preferred_language = NULL; - - for (i = 1; i < argc; i++) { - if (strcmp("--click-to-show", argv[i]) == 0) - click_to_show = 1; - else if (strcmp("--preferred-language", argv[i]) == 0 && -i + 1 < argc) { - preferred_language = argv[i + 1]; - i++; - } else { - printf("Usage: %s [OPTIONS]\n" - " --click-to-show\n" - " --preferred-language LANGUAGE\n", - argv[0]); - return 1; - } + + parse_options(editor_options, ARRAY_LENGTH(editor_options), + , argv); + if (opt_help) + usage(argv[0], EXIT_SUCCESS); + + if (argc > 1) { + usage(argv[0], EXIT_FAILURE); + /* FIXME: Use remaining arguments as a path/filename to load */ + return 0; } memset(, 0, sizeof editor); @@ -1537,12 +1573,12 @@ main(int argc, char *argv[]) editor.widget = window_frame_create(editor.window, ); editor.entry = text_entry_create(, "Entry"); - editor.entry->click_to_show = click_to_show; - if (preferred_language) - editor.entry->preferred_language = strdup(preferred_language); + editor.entry->click_to_show = opt_click_to_show; + if (opt_preferred_language) + editor.entry->preferred_language = strdup(opt_preferred_language); editor.editor = text_entry_create(, "Numeric"); editor.editor->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_NUMBER; - editor.editor->click_to_show = click_to_show; + editor.editor->click_to_show = opt_click_to_show; editor.selection = NULL; editor.selected_text = NULL; -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 3/3] editor: Load a file if specified on command line
On Mon, Nov 21, 2016 at 12:55:14PM +, Daniel Stone wrote: > Hi Bryce, > > On 20 November 2016 at 22:00, Bryce Harrington <br...@osg.samsung.com> wrote: > > Add support for basic text file loading, to facilitate more expansive > > testing of its UTF-8 text editing support. > > Honestly, I question the value of turning the editor into something > 'real': as soon as we're adding a --version argument to something, Fair enough I can drop the --version, didn't expect that would be controversial. I have local and system installations of weston, so having tools report which weston they came from seemed useful, but not a big deal, there's plenty of other ways to determine that. I do think that an editor actually loading a file to edit is extraordinarily basic functionality; little risk there of making weston-editor 'real'. This small feature would have been moderately handy while working on the compose editing support, although I was more focused on input than display. I figure future developers working on text support might find use of being able to load up a file with test UTF-8 text. Remaining review comments incorporated, thanks. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston] gl: Don't declare variables in for loop
Fixes compilation error introduced by 43cea54c: libweston/gl-renderer.c:2862:2: error: ‘for’ loop initial declarations are only allowed in C99 mode for (unsigned i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint); i++) { ^ Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- libweston/gl-renderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c index 1a8cf67..4077c62 100644 --- a/libweston/gl-renderer.c +++ b/libweston/gl-renderer.c @@ -2828,6 +2828,7 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec) struct gl_renderer *gr = get_renderer(ec); const char *extensions; EGLBoolean ret; + unsigned i; gr->create_image = (void *) eglGetProcAddress("eglCreateImageKHR"); gr->destroy_image = (void *) eglGetProcAddress("eglDestroyImageKHR"); @@ -2859,7 +2860,7 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec) weston_log("warning: EGL_EXT_buffer_age not supported. " "Performance could be affected.\n"); - for (unsigned i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint); i++) { + for (i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint); i++) { if (weston_check_egl_extension(extensions, swap_damage_ext_to_entrypoint[i].extension)) { gr->swap_buffers_with_damage = -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 2/3] editor: Add command line options for version and help
Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/editor.c | 70 1 file changed, 50 insertions(+), 20 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index d6bf588..ead7b6f 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -1489,6 +1489,12 @@ global_handler(struct display *display, uint32_t name, } } +/** Display help for command line options, and exit */ +static uint32_t opt_help = 0; + +/** Display the (weston) version number, and exit */ +static uint32_t opt_version = 0; + /** Require a distinct click to show the input panel (virtual keyboard) */ static uint32_t opt_click_to_show = 0; @@ -1499,36 +1505,60 @@ static const char *opt_preferred_language = NULL; * \brief command line options for editor */ static const struct weston_option editor_options[] = { + { WESTON_OPTION_BOOLEAN, "help", 'h', _help }, + { WESTON_OPTION_BOOLEAN, "version", 'V', _version }, { WESTON_OPTION_BOOLEAN, "click-to-show", 'C', _click_to_show }, { WESTON_OPTION_STRING, "preferred-language", 'L', _preferred_language }, }; +static void +version(const char *program_name, int exit_code) +{ + fprintf(stderr, "%s (%s)\n", program_name, VERSION); + exit(exit_code); +} + +static void +usage(const char *program_name, int exit_code) +{ + unsigned k; + + fprintf(stderr, "Usage: %s [OPTIONS]\n\n", program_name); + for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { + const struct weston_option *p = _options[k]; + if (p->name) { + fprintf(stderr, " --%s", p->name); + if (p->type != WESTON_OPTION_BOOLEAN) + fprintf(stderr, "=VALUE"); + fprintf(stderr, "\n"); + } + if (p->short_name) { + fprintf(stderr, " -%c", p->short_name); + if (p->type != WESTON_OPTION_BOOLEAN) + fprintf(stderr, "VALUE"); + fprintf(stderr, "\n"); + } + } + exit(exit_code); +} + int main(int argc, char *argv[]) { struct editor editor; int i; - if (parse_options(editor_options, ARRAY_LENGTH(editor_options), - , argv) > 1) { - unsigned k; - printf("Usage: %s [OPTIONS]\n\n", argv[0]); - for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { - const struct weston_option *p = _options[k]; - if (p->name) { - printf(" --%s", p->name); - if (p->type != WESTON_OPTION_BOOLEAN) - printf("=VALUE"); - putchar('\n'); - } - if (p->short_name) { - printf(" -%c", p->short_name); - if (p->type != WESTON_OPTION_BOOLEAN) - printf("VALUE"); - putchar('\n'); - } - } - return 1; + parse_options(editor_options, ARRAY_LENGTH(editor_options), + , argv); + if (opt_help) + usage(argv[0], EXIT_SUCCESS); + if (opt_version) + version(argv[0], EXIT_SUCCESS); + + if (argc > 1) { + usage(argv[0], EXIT_FAILURE); + /* FIXME: Use remaining arguments as a path/filename to load */ + return 0; } memset(, 0, sizeof editor); -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 1/3] editor: Use parse_options() from shared for command line options
Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/editor.c | 59 +--- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index 6805d8a..d6bf588 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -37,6 +37,7 @@ #include +#include "shared/config-parser.h" #include "shared/helpers.h" #include "shared/xalloc.h" #include "window.h" @@ -1488,28 +1489,46 @@ global_handler(struct display *display, uint32_t name, } } +/** Require a distinct click to show the input panel (virtual keyboard) */ +static uint32_t opt_click_to_show = 0; + +/** Set a specific (RFC-3066) language. Used for the virtual keyboard, etc. */ +static const char *opt_preferred_language = NULL; + +/** + * \brief command line options for editor + */ +static const struct weston_option editor_options[] = { + { WESTON_OPTION_BOOLEAN, "click-to-show", 'C', _click_to_show }, + { WESTON_OPTION_STRING, "preferred-language", 'L', _preferred_language }, +}; + int main(int argc, char *argv[]) { struct editor editor; int i; - uint32_t click_to_show = 0; - const char *preferred_language = NULL; - - for (i = 1; i < argc; i++) { - if (strcmp("--click-to-show", argv[i]) == 0) - click_to_show = 1; - else if (strcmp("--preferred-language", argv[i]) == 0 && -i + 1 < argc) { - preferred_language = argv[i + 1]; - i++; - } else { - printf("Usage: %s [OPTIONS]\n" - " --click-to-show\n" - " --preferred-language LANGUAGE\n", - argv[0]); - return 1; + + if (parse_options(editor_options, ARRAY_LENGTH(editor_options), + , argv) > 1) { + unsigned k; + printf("Usage: %s [OPTIONS]\n\n", argv[0]); + for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { + const struct weston_option *p = _options[k]; + if (p->name) { + printf(" --%s", p->name); + if (p->type != WESTON_OPTION_BOOLEAN) + printf("=VALUE"); + putchar('\n'); + } + if (p->short_name) { + printf(" -%c", p->short_name); + if (p->type != WESTON_OPTION_BOOLEAN) + printf("VALUE"); + putchar('\n'); + } } + return 1; } memset(, 0, sizeof editor); @@ -1536,12 +1555,12 @@ main(int argc, char *argv[]) editor.widget = window_frame_create(editor.window, ); editor.entry = text_entry_create(, "Entry"); - editor.entry->click_to_show = click_to_show; - if (preferred_language) - editor.entry->preferred_language = strdup(preferred_language); + editor.entry->click_to_show = opt_click_to_show; + if (opt_preferred_language) + editor.entry->preferred_language = strdup(opt_preferred_language); editor.editor = text_entry_create(, "Numeric"); editor.editor->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_NUMBER; - editor.editor->click_to_show = click_to_show; + editor.editor->click_to_show = opt_click_to_show; editor.selection = NULL; editor.selected_text = NULL; -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 3/3] editor: Load a file if specified on command line
Add support for basic text file loading, to facilitate more expansive testing of its UTF-8 text editing support. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/editor.c | 115 --- 1 file changed, 110 insertions(+), 5 deletions(-) diff --git a/clients/editor.c b/clients/editor.c index ead7b6f..de50ef7 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -25,6 +25,7 @@ #include "config.h" #include +#include #include #include #include @@ -1523,7 +1524,7 @@ usage(const char *program_name, int exit_code) { unsigned k; - fprintf(stderr, "Usage: %s [OPTIONS]\n\n", program_name); + fprintf(stderr, "Usage: %s [OPTIONS] [FILENAME]\n\n", program_name); for (k = 0; k < ARRAY_LENGTH(editor_options); k++) { const struct weston_option *p = _options[k]; if (p->name) { @@ -1542,10 +1543,95 @@ usage(const char *program_name, int exit_code) exit(exit_code); } +/* Join remaining arguments in argv as a space-delimited string. + * + * Caller is responsible for freeing the returned string. + * If there are no remaining arguments, returns a blank string. + * Returns NULL on out of memory error. +*/ +char * +join_argv(int argc, char *argv[]) { + char *filename; + int buf_size = 0; + int offset = 0; + int i; + + for (i = 0; i < argc; i++) + buf_size += strlen(argv[i]) + 1; + + filename = (char*) malloc(sizeof(char) * (buf_size + 1)); + if (filename == NULL) + return NULL; + filename[0] = '\0'; + + while (argv++, --argc) { + int num = buf_size - offset; + int written = 0; + char space = ' '; + + if (argc == 1) + space = '\0'; + written = snprintf(filename+offset, num, + "%s%c", *argv, space); + if (num < written) + break; + offset += written; + } + return filename; +} + +/* Load the contents of a file into a UTF-8 text buffer and return it. + * + * Caller is responsible for freeing the buffer when done. + * On error, returns NULL. + */ +char * +read_file(char *filename) +{ + char *buffer = NULL; + int buf_size, read_size; + FILE *fin; + int errsv; + + fin = fopen(filename, "r"); + if (fin == NULL) + goto error; + + /* Determine required buffer size */ + if (fseek(fin, 0, SEEK_END) != 0) + goto error; + buf_size = ftell(fin); + if (buf_size < 0) + goto error; + rewind(fin); + + /* Create buffer and read in the text */ + buffer = (char*) malloc(sizeof(char) * (buf_size + 1)); + if (buffer == NULL) + goto error; + read_size = fread(buffer, sizeof(char), buf_size, fin); + fclose(fin); + if (buf_size != read_size) + goto error; + buffer[buf_size] = '\0'; + + return buffer; + +error: + errsv = errno; + if (fin) + fclose(fin); + free(buffer); + errno = errsv || EINVAL; + + return NULL; +} + int main(int argc, char *argv[]) { struct editor editor; + char *text_buffer = NULL; int i; parse_options(editor_options, ARRAY_LENGTH(editor_options), @@ -1556,9 +1642,24 @@ main(int argc, char *argv[]) version(argv[0], EXIT_SUCCESS); if (argc > 1) { - usage(argv[0], EXIT_FAILURE); - /* FIXME: Use remaining arguments as a path/filename to load */ - return 0; + char *filename = NULL; + + if (argv[1][0] == '-') + usage(argv[0], EXIT_FAILURE); + + filename = join_argv(argc, argv); + if (filename == NULL || strlen(filename) < 1) { + fprintf(stderr, "could not process command line arguments: %m\n"); + return -1; + } + + text_buffer = read_file(filename); + if (text_buffer == NULL) { + fprintf(stderr, "could not read '%s': %m\n", filename); + free(filename); + return -1; + } + free(filename); } memset(, 0, sizeof editor); @@ -1584,7 +1685,10 @@ main(int argc, char *argv[]) editor.window = window_create(editor.display); editor.widget = window_frame_create(editor.window, ); - editor.entry = text_entry_create(, "Entry"); + if (text_buffer) + editor.entry = text_entry_create(, text_buffer); + else + editor.entry = text_entry_create(, "Entry");
Re: [PATCH wayland] protocol: indentation fixes
On Thu, Nov 10, 2016 at 03:02:06PM +1000, Peter Hutterer wrote: > 8 spaces changed to one tab > > Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> The patch isn't applying as of change 66a26aeb (remove inconsistent line breaks), but in generating a whitespace patch myself using emacs with the Wayland style rules, I am getting a similar looking set of changes. While whitespace changes are trivial, having these fixed would make automatic style tools a bit better able to detect and fix whitespace issues in the future. Acked-by: Bryce Harrington <br...@osg.samsung.com> > --- > protocol/wayland.xml | 100 > +-- > 1 file changed, 50 insertions(+), 50 deletions(-) > > diff --git a/protocol/wayland.xml b/protocol/wayland.xml > index 6c6d078..bcc228f 100644 > --- a/protocol/wayland.xml > +++ b/protocol/wayland.xml > @@ -129,7 +129,7 @@ > > > Binds a new, client-created object to the server using the > -specified name as the identifier. > + specified name as the identifier. > > > > @@ -139,9 +139,9 @@ > > Notify the client of global objects. > > -The event notifies the client that a global object with > -the given name is now available, and it implements the > -given version of the given interface. > + The event notifies the client that a global object with > + the given name is now available, and it implements the > + given version of the given interface. > > > > @@ -152,10 +152,10 @@ > > Notify the client of removed global objects. > > -This event notifies the client that the global identified > -by name is no longer available. If the client bound to > -the global using the bind request, the client should now > -destroy that object. > + This event notifies the client that the global identified > + by name is no longer available. If the client bound to > + the global using the bind request, the client should now > + destroy that object. > > The object remains valid and requests to the object will be > ignored until the client destroys it, to avoid races between > @@ -357,7 +357,7 @@ > > The pool can be used to create shared memory based buffer > objects. The server will mmap size bytes of the passed file > -descriptor, to use as backing memory for the pool. > + descriptor, to use as backing memory for the pool. > > > > @@ -924,14 +924,14 @@ > > > > -Create a new data source. > + Create a new data source. > > > > > > > -Create a new data device for a given seat. > + Create a new data device for a given seat. > > > > @@ -1320,7 +1320,7 @@ > > > > -These errors can be emitted in response to wl_surface requests. > + These errors can be emitted in response to wl_surface requests. > > > > @@ -1679,8 +1679,8 @@ > > > > -This is a bitmask of capabilities this seat has; if a member is > -set, then it is present on the seat. > + This is a bitmask of capabilities this seat has; if a member is > + set, then it is present on the seat. > > > > @@ -1878,7 +1878,7 @@ > > > > -Describes the physical state of a button that produced the button > + Describes the physical state of a button that produced the button > event. > > > @@ -1891,8 +1891,8 @@ > > The location of the click is given by the last motion or > enter event. > -The time argument is a timestamp with millisecond > -granularity, with an undefined base. > + The time argument is a timestamp with millisecond > + granularity, with an undefined base. > > > > @@ -2106,7 +2106,7 @@ >summary="no keymap; client must understand how to interpret the > raw keycode"/> > - summary="libxkbcommon compatible; to determine the xkb keycode, > clients must add 8 to the key event keycode"/> > + summary="libxkbcommon compatible; to determine the xkb keycode, > clients must add 8 to the key event keycode"/> > > > > @@ -2152,8 +2152,8 @@ > > > A key was pressed or released. > -The time argument is a timestamp with millisecond >
Re: [PATCH wayland] util: Clarify documentation of wl_dispatcher_func_t
On Thu, Nov 17, 2016 at 08:23:14AM -0800, Yong Bakos wrote: > From: Yong Bakos <yba...@humanoriented.com> > > Adjust the brief, clarify the behavior and arguments, correct a grammar > error, and document the parameters. > > Signed-off-by: Yong Bakos <yba...@humanoriented.com> Definitely an improvement. The brief still feels a bit heavy on jargon but it's better than the original. Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > src/wayland-util.h | 25 +++-- > 1 file changed, 15 insertions(+), 10 deletions(-) > > diff --git a/src/wayland-util.h b/src/wayland-util.h > index 50f3372..17908fd 100644 > --- a/src/wayland-util.h > +++ b/src/wayland-util.h > @@ -607,21 +607,26 @@ union wl_argument { > }; > > /** > - * \brief A function pointer type for a dispatcher. > + * Dispatcher function type alias > * > * A dispatcher is a function that handles the emitting of callbacks in > client > - * code. For programs directly using the C library, this is done by using > - * libffi to call function pointers. When binding to languages other than C, > + * code. For programs directly using the C library, this is done by using > + * libffi to call function pointers. When binding to languages other than C, > * dispatchers provide a way to abstract the function calling process to be > * friendlier to other function calling systems. > * > - * A dispatcher takes five arguments: The first is the dispatcher-specific > - * implementation data associated with the target object. The second is the > - * object on which the callback is being invoked (either wl_proxy or > - * wl_resource). The third and fourth arguments are the opcode the > wl_message > - * structure corresponding to the callback being emitted. The final argument > - * is an array of arguments received from the other process via the wire > - * protocol. > + * A dispatcher takes five arguments: The first is the dispatcher-specific > + * implementation associated with the target object. The second is the object > + * upon which the callback is being invoked (either wl_proxy or wl_resource). > + * The third and fourth arguments are the opcode and the wl_message > + * corresponding to the callback. The final argument is an array of arguments > + * received from the other process via the wire protocol. > + * > + * \param "const void *" Dispatcher-specific implementation data > + * \param "void *" Callback invocation target (wl_proxy or `wl_resource`) > + * \param uint32_t Callback opcode > + * \param "const struct wl_message *" Callback message signature > + * \param "union wl_argument *" Array of received arguments > */ > typedef int (*wl_dispatcher_func_t)(const void *, void *, uint32_t, > const struct wl_message *, > -- > 2.7.2 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH] xdg-shell: clarify popup constrain's slide mechanism
On Thu, Nov 17, 2016 at 07:32:02AM -0800, Yong Bakos wrote: > Hi Mike, > > > On Nov 16, 2016, at 7:23 AM, Mike Blumenkrantz <zm...@osg.samsung.com> > > wrote: > > > > some restrictions must be placed on this or else it becomes legal for > > the compositor to place popups in unexpected locations when sliding > > is allowed > > > > Signed-off-by: Mike Blumenkrantz <zm...@osg.samsung.com> > > Per your description of the problem, this protocol change seems to make > sense, and adds specificity to the constraining behavior. I can't think > of any drawbacks to adding this. > > Reviewed-by: Yong Bakos <yba...@humanoriented.com> I agree, it specifies what seems to be an established assumption. I can't think of any sane reason for having popups appear dissociated with the toplevel if sliding behavior is the layout intent. Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > > --- > > unstable/xdg-shell/xdg-shell-unstable-v6.xml | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/unstable/xdg-shell/xdg-shell-unstable-v6.xml > > b/unstable/xdg-shell/xdg-shell-unstable-v6.xml > > index 6053e3c..30cdaeb 100644 > > --- a/unstable/xdg-shell/xdg-shell-unstable-v6.xml > > +++ b/unstable/xdg-shell/xdg-shell-unstable-v6.xml > > @@ -256,7 +256,8 @@ > > > > > > > > - Slide the surface along the x axis until it is no longer constrained. > > + Slide the surface along the x axis within the toplevel surface until > > it > > + is no longer constrained. > > > > First try to slide towards the direction of the gravity on the x axis > > until either the edge in the opposite direction of the gravity is > > @@ -271,7 +272,8 @@ > > > > > > > > - Slide the surface along the y axis until it is no longer constrained. > > + Slide the surface along the y axis within the toplevel surface until > > it > > + is no longer constrained. > > > > First try to slide towards the direction of the gravity on the y axis > > until either the edge in the opposite direction of the gravity is > > -- > > 2.5.5 > > > > ___ > > wayland-devel mailing list > > wayland-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/wayland-devel > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH] weston-editor: Don't copy the preedit string before inserting it
On Thu, Nov 17, 2016 at 09:43:05PM +0100, Silvan Jegen wrote: > Signed-off-by: Silvan Jegen> --- > clients/editor.c | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/clients/editor.c b/clients/editor.c > index 6805d8a..1ed3eec 100644 > --- a/clients/editor.c > +++ b/clients/editor.c > @@ -944,16 +944,10 @@ text_entry_reset_preedit(struct text_entry *entry) > static void > text_entry_commit_and_reset(struct text_entry *entry) > { > - char *commit = NULL; > - > if (entry->preedit.commit) > - commit = strdup(entry->preedit.commit); > + text_entry_insert_at_cursor(entry, entry->preedit.commit, 0, 0); > > text_entry_reset_preedit(entry); > - if (commit) { > - text_entry_insert_at_cursor(entry, commit, 0, 0); > - free(commit); > - } This essentially swaps the order of text_entry_reset_preedit() and text_entry_insert_at_cursor(). Does this cause any side effects? text_entry_insert_at_cursor() calls text_entry_update_layout(), which will behave differently if there is a preedit in effect with and without this patch. I'm not super familiar with this code, but on a quick skim it looks like with this patch applied, any existing pre-edits will be applied and finalized before the reset, whereas previously the pre-edits would be discarded? Am I interpreting this correctly? If this is the case, and if that change of behavior is desireable, make sure the behavioral change (and rationale for why it's being done) is documented in the changelog. If I'm not interpreting it correctly, accept my apologies and I look forward to your elucidation (which probably also would be worth referencing in the changelog entry). Thanks, Bryce > zwp_text_input_v1_reset(entry->text_input); > text_entry_update(entry); > -- > 2.10.2 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH] weston-editor: Free preferred_language in text_entry_destroy
On Thu, Nov 17, 2016 at 09:43:06PM +0100, Silvan Jegen wrote: > Signed-off-by: Silvan Jegen <s.je...@gmail.com> Yep, the value is set via a strdup in main(), so needs free'd. Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > clients/editor.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/clients/editor.c b/clients/editor.c > index 1ed3eec..a0d66d1 100644 > --- a/clients/editor.c > +++ b/clients/editor.c > @@ -719,6 +719,7 @@ text_entry_destroy(struct text_entry *entry) > zwp_text_input_v1_destroy(entry->text_input); > g_clear_object(>layout); > free(entry->text); > + free(entry->preferred_language); > free(entry); > } > > -- > 2.10.2 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston v2] xwayland: Fix crash when run with no input device
On Tue, Nov 01, 2016 at 02:14:00PM -0500, Tom Hochstein wrote: > Starting an xterm with no input device led to a crash > because weston_wm_pick_seat() was returning garbage and > weston_wm_selection_init() was trying to use the garbage. > > Signed-off-by: Tom Hochstein <tom.hochst...@nxp.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > v2: Don't call weston_wm_set_selection if there is no seat > > xwayland/selection.c | 2 ++ > xwayland/window-manager.c | 6 -- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/xwayland/selection.c b/xwayland/selection.c > index 641ac49..9668d17 100644 > --- a/xwayland/selection.c > +++ b/xwayland/selection.c > @@ -709,6 +709,8 @@ weston_wm_selection_init(struct weston_wm *wm) > wm->atom.clipboard, mask); > > seat = weston_wm_pick_seat(wm); > + if (seat == NULL) > + return; > wm->selection_listener.notify = weston_wm_set_selection; > wl_signal_add(>selection_signal, >selection_listener); > > diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c > index 0e26d7c..15e2ca2 100644 > --- a/xwayland/window-manager.c > +++ b/xwayland/window-manager.c > @@ -1306,8 +1306,10 @@ weston_wm_handle_reparent_notify(struct weston_wm *wm, > xcb_generic_event_t *even > struct weston_seat * > weston_wm_pick_seat(struct weston_wm *wm) > { > - return container_of(wm->server->compositor->seat_list.next, > - struct weston_seat, link); > + struct wl_list *seats = wm->server->compositor->seat_list.next; > + if (wl_list_empty(seats)) > + return NULL; > + return container_of(seats, struct weston_seat, link); > } > > static struct weston_seat * > -- > 1.9.1 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] clients: Make XKB compose support conditional
On Sat, Oct 22, 2016 at 03:09:24PM +0100, Daniel Stone wrote: > Debian Jessie's version of libxkbcommon is too old for compose support, > so rather than force people to upgrade, let's make it conditional. > > Signed-off-by: Daniel Stone <dani...@collabora.com> > Cc: Bryce Harrington <br...@osg.samsung.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> > --- > clients/window.c | 12 > configure.ac | 4 > 2 files changed, 16 insertions(+) > > diff --git a/clients/window.c b/clients/window.c > index 5e41210..84d585e 100644 > --- a/clients/window.c > +++ b/clients/window.c > @@ -63,7 +63,9 @@ typedef void *EGLContext; > #endif /* no HAVE_CAIRO_EGL */ > > #include > +#ifdef HAVE_XKBCOMMON_COMPOSE > #include > +#endif > #include > > #include > @@ -373,8 +375,10 @@ struct input { > struct { > struct xkb_keymap *keymap; > struct xkb_state *state; > +#ifdef HAVE_XKBCOMMON_COMPOSE > struct xkb_compose_table *compose_table; > struct xkb_compose_state *compose_state; > +#endif > xkb_mod_mask_t control_mask; > xkb_mod_mask_t alt_mask; > xkb_mod_mask_t shift_mask; > @@ -2982,8 +2986,10 @@ keyboard_handle_keymap(void *data, struct wl_keyboard > *keyboard, > struct input *input = data; > struct xkb_keymap *keymap; > struct xkb_state *state; > +#ifdef HAVE_XKBCOMMON_COMPOSE > struct xkb_compose_table *compose_table; > struct xkb_compose_state *compose_state; > +#endif > char *locale; > char *map_str; > > @@ -3031,6 +3037,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard > *keyboard, > locale = "C"; > > /* Set up XKB compose table */ > +#ifdef HAVE_XKBCOMMON_COMPOSE > compose_table = > xkb_compose_table_new_from_locale(input->display->xkb_context, > locale, > @@ -3054,6 +3061,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard > *keyboard, > fprintf(stderr, "could not create XKB compose table for locale > '%s'. " > "Disabiling compose\n", locale); > } > +#endif > > xkb_keymap_unref(input->xkb.keymap); > xkb_state_unref(input->xkb.state); > @@ -3099,6 +3107,7 @@ keyboard_handle_leave(void *data, struct wl_keyboard > *keyboard, > static xkb_keysym_t > process_key_press(xkb_keysym_t sym, struct input *input) > { > +#ifdef HAVE_XKBCOMMON_COMPOSE > if (sym == XKB_KEY_NoSymbol) > return sym; > if (xkb_compose_state_feed(input->xkb.compose_state, > @@ -3117,6 +3126,9 @@ process_key_press(xkb_keysym_t sym, struct input *input) > default: > return sym; > } > +#else > + return sym; > +#endif > } > > static void > diff --git a/configure.ac b/configure.ac > index 37da695..1e251bf 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -146,6 +146,10 @@ AC_ARG_ENABLE(xkbcommon, > if test x$enable_xkbcommon = xyes; then > AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon > support]) > COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0" > + PKG_CHECK_MODULES(XKBCOMMON_COMPOSE, [xkbcommon >= 0.5.0], > + [AC_DEFINE(HAVE_XKBCOMMON_COMPOSE, 1, > + [Define if xkbcommon is 0.5.0 or newer])], > + true) > fi > > AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],, > -- > 2.9.3 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/2] config-parser: add support for more color formats
On Fri, Oct 21, 2016 at 04:02:15PM +0100, Eric Engestrom wrote: > On Friday, 2016-10-21 12:30:07 +0200, Quentin Glidic wrote: > > Hi, > > > > On 20/10/2016 00:08, Eric Engestrom wrote: > > > Valid colours start with an optional '0x' or '#', followed by: > > > - AARRGGBB > > > - RRGGBB > > > - A R G B > > > -R G B > > > - XYXYXY > > > - XX > > > > I think this is way too much, even with minimal code effort. > > > > The well-known CSS formats are #RRGGBB and #RGB, and the backward-compatible > > extension are #RRGGBBAA and #RGBA. > > The current 0xAARRGGBB are directly derived from the internal usage of a > > colour as a number, because Weston devs are used to this. But *users* are > > not, they are used to CSS notation. > > > > IMO, 0x should be used as-is, with a little clamping, so the old way > > continue to work. OTOH, the # notation should be fully compatible with CSS. > > > > This code would lead to user-unexpected behaviour, and it’s easy to avoid > > that. > > You're right, I didn't really think this through :) > I'll send a v2 with only commonly used formats/orders when > I have some more time (probably sunday): > > - (0x)(AA)RRGGBB (backward compatibility) > - #RGB(A) > - #RRGGBB(AA) > > Bryce, I think you wanted a single repeating char format; do you also > want the 2-char format? I agree with Quentin that it's probably most important that color codes are handled in consistent ways so that they don't encounter odd unexpected behaviors. In that light less maybe more as they say. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH wayland-protocols v7] text: Create second version of text input protocol
On Wed, Jul 06, 2016 at 12:26:28AM +0200, Jan Arne Petersen wrote: > On Thu, Jun 9, 2016 at 1:01 PM Carlos Garnacho <carl...@gnome.org> wrote: > > Hi Carlos, > > Thanks for the feedback. > > > > > Chiming in, and kinda late at that... hopefully we'll get this moving :). > > I do not think we want to change text_input_unstable_v2 version 1 anymore > (since it already got shipped in Qt 5.7.0 and Plasma 5.7.0). Sorry for that. > But I already started to work on text_input_unstable_v2 version 2 and also > text_input_unstable_v3 where I like to include the feedback. > > > First of all, I'm aware that some of my comments are directed towards > > stuff that's unchanged between v1 and v2, so please bear with me, I > > hope the feedback is useful. > > Sure that is perfectly fine, I think that is the idea of the unstable > protocols > anyways that we can still change everything and adapt them with real > world experience. > > On Mon, May 30, 2016 at 11:41 AM, Jan Arne Petersen <jana...@gmail.com> > > wrote: > > > There were some shortcomings in the first version of the protocol which > > > makes it not really useful in real world applications. It is not really > > > possible to fix them in a compatible way so introduce a new v2 of the > > > protocol. > > > > > > Fixes some shortcomings of the first version: > > > > > > * Use only one wp_text_input per wl_seat (client side should be > > > handled by client toolkit) > > > * Allow focus tracking without wl_keyboard present > > > * Improve update state handling and better define state handling I'd love to see a re-rev of this patch. Looking at a diff between v1 and v2, those three changes seem quite suitable, although I'd like to see an exact minimal diff of the changes so holding off on detailed review. But worth an acked by at least: Acked-by: Bryce Harrington <br...@osg.samsung.com> The input-method and text-input protocols both deal with similar functionality (text input). I'm not sure if we already have a high level description somewhere that describes their relationship, but at a minimum I think the protocols ought to cross-reference each other. (For instance, something like, "See also the input-method protocol, which provides ...") When I first looked at the two protocols, just reading their descriptions it wasn't obvious at all how they related; it only clicked after studying the weston code. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 3/3] simple-im: Rename source file to be consistent with other client tools
On Wed, Oct 12, 2016 at 09:43:00AM +0200, Jan Arne Petersen wrote: > Hi, > > This series looks good: > Reviewed-by: Jan Arne PetersenThanks, pushed the set: To ssh://git.freedesktop.org/git/wayland/weston e57b6a1..c6a899d master -> master ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 3/3] simple-im: Rename source file to be consistent with other client tools
On Wed, Oct 12, 2016 at 05:33:19PM +0100, Emil Velikov wrote: > Hi Bryce, > > On 12 October 2016 at 00:33, Bryce Harrington <br...@osg.samsung.com> wrote: > > Except for weston-info, client source files are not prefixed "weston-". > > > > Signed-off-by: Bryce Harrington <br...@osg.samsung.com> > > --- > > Makefile.am| 2 +- > > clients/simple-im.c| 524 > > + > > clients/weston-simple-im.c | 524 > > - > > If you set the following git will produce nice (zero diff) patches ;-) > $ git config --global diff.renames true > > You can use either true or copy. > -Emil Ah, thanks. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 3/3] simple-im: Rename source file to be consistent with other client tools
Except for weston-info, client source files are not prefixed "weston-". Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- Makefile.am| 2 +- clients/simple-im.c| 524 + clients/weston-simple-im.c | 524 - 3 files changed, 525 insertions(+), 525 deletions(-) create mode 100644 clients/simple-im.c delete mode 100644 clients/weston-simple-im.c diff --git a/Makefile.am b/Makefile.am index c94c211..b08ce71 100644 --- a/Makefile.am +++ b/Makefile.am @@ -779,7 +779,7 @@ nodist_weston_keyboard_SOURCES = \ weston_keyboard_LDADD = libtoytoolkit.la weston_keyboard_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) -weston_simple_im_SOURCES = clients/weston-simple-im.c +weston_simple_im_SOURCES = clients/simple-im.c nodist_weston_simple_im_SOURCES = \ protocol/input-method-unstable-v1-protocol.c\ protocol/input-method-unstable-v1-client-protocol.h diff --git a/clients/simple-im.c b/clients/simple-im.c new file mode 100644 index 000..280589b --- /dev/null +++ b/clients/simple-im.c @@ -0,0 +1,524 @@ +/* + * Copyright © 2012 Intel Corporation + * + * 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 WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "config.h" + +#include +#include +#include +#include +#include +#include + +#include + +#include "window.h" +#include "input-method-unstable-v1-client-protocol.h" +#include "shared/helpers.h" + +enum compose_state { + state_normal, + state_compose +}; + +struct compose_seq { + uint32_t keys[4]; + + const char *text; +}; + +struct simple_im; + +typedef void (*keyboard_input_key_handler_t)(struct simple_im *keyboard, +uint32_t serial, +uint32_t time, uint32_t key, uint32_t unicode, +enum wl_keyboard_key_state state); + +struct simple_im { + struct zwp_input_method_v1 *input_method; + struct zwp_input_method_context_v1 *context; + struct wl_display *display; + struct wl_registry *registry; + struct wl_keyboard *keyboard; + enum compose_state compose_state; + struct compose_seq compose_seq; + + struct xkb_context *xkb_context; + + uint32_t modifiers; + + struct xkb_keymap *keymap; + struct xkb_state *state; + xkb_mod_mask_t control_mask; + xkb_mod_mask_t alt_mask; + xkb_mod_mask_t shift_mask; + + keyboard_input_key_handler_t key_handler; + + uint32_t serial; +}; + +static const struct compose_seq compose_seqs[] = { + { { XKB_KEY_quotedbl, XKB_KEY_A, 0 }, "Ä" }, + { { XKB_KEY_quotedbl, XKB_KEY_O, 0 }, "Ö" }, + { { XKB_KEY_quotedbl, XKB_KEY_U, 0 }, "Ü" }, + { { XKB_KEY_quotedbl, XKB_KEY_a, 0 }, "ä" }, + { { XKB_KEY_quotedbl, XKB_KEY_o, 0 }, "ö" }, + { { XKB_KEY_quotedbl, XKB_KEY_u, 0 }, "ü" }, + { { XKB_KEY_apostrophe, XKB_KEY_A, 0 }, "Á" }, + { { XKB_KEY_apostrophe, XKB_KEY_a, 0 }, "á" }, + { { XKB_KEY_slash, XKB_KEY_O, 0 }, "Ø" }, + { { XKB_KEY_slash, XKB_KEY_o, 0 }, "ø" }, + { { XKB_KEY_less, XKB_KEY_3, 0 }, "♥" }, + { { XKB_KEY_A, XKB_KEY_A, 0 }, "Å" }, + { { XKB_KEY_A, XKB_KEY_E, 0 }, "Æ" }, + { { XKB_KEY_O, XKB_KEY_C, 0 }, "©" }, + { { XKB_KEY_O, XKB_KEY_R, 0 }, "®" }, + { { XKB_KEY_s, XKB_KEY_s, 0 }, "ß" }, + { { XKB_KEY_a, XKB_KEY_e, 0 }, "æ" }, + { { XKB_KEY_a, XKB_KEY_a, 0 }, "å" }, +}; + +static co
[PATCH weston 1/3] simple-im: Use returns from main() consistently
Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/weston-simple-im.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/weston-simple-im.c b/clients/weston-simple-im.c index 1663d84..f766a88 100644 --- a/clients/weston-simple-im.c +++ b/clients/weston-simple-im.c @@ -500,7 +500,7 @@ main(int argc, char *argv[]) wl_display_roundtrip(simple_im.display); if (simple_im.input_method == NULL) { fprintf(stderr, "No input_method global\n"); - exit(1); + return -1; } simple_im.xkb_context = xkb_context_new(0); @@ -517,7 +517,7 @@ main(int argc, char *argv[]) if (ret == -1) { fprintf(stderr, "Dispatch error: %m\n"); - exit(1); + return -1; } return 0; -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 2/3] simple-im: Use the appropriate enum names to xkb calls
XKB_KEYMAP_COMPILE_NO_FLAGS and XKB_CONTEXT_NO_FLAGS are both defined as 0 so no functional change here, just improved code clarity. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/weston-simple-im.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/weston-simple-im.c b/clients/weston-simple-im.c index f766a88..280589b 100644 --- a/clients/weston-simple-im.c +++ b/clients/weston-simple-im.c @@ -192,7 +192,7 @@ input_method_keyboard_keymap(void *data, xkb_keymap_new_from_string(keyboard->xkb_context, map_str, XKB_KEYMAP_FORMAT_TEXT_V1, - 0); + XKB_KEYMAP_COMPILE_NO_FLAGS); munmap(map_str, size); close(fd); @@ -503,7 +503,7 @@ main(int argc, char *argv[]) return -1; } - simple_im.xkb_context = xkb_context_new(0); + simple_im.xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); if (simple_im.xkb_context == NULL) { fprintf(stderr, "Failed to create XKB context\n"); return -1; -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston v3] clients: Add XKB compose key support
This adds single-symbol compose support using libxkbcommon's compose functionality. E.g., assuming you have the right alt key defined as your compose key, typing +i+' will produce í, and +y+= will produce ¥. This makes compose key work for weston-editor, weston-terminal, weston-eventdemo, and any other clients that use Weston's window.* routines for accepting and managing keyboard input. Compose sequences are loaded from the system's standard tables. As well, libxkbcommon will transparently load custom sequences from the user's ~/.XCompose file. Note that due to limitations in toytoolkit's key handler interface, only compose sequences resulting in single symbols are supported. While libxkbcommon supports multi-symbol compose strings, support for passing text buffers to Weston clients is left as future work. This largely obviates the need for the weston-simple-im input method client, which had provided a very limited compose functionality that was only available in clients implementing the zwp_input_method protocol, and with no mechanism to load system or user-specified compose keys. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53648 Signed-off-by: Bryce Harrington <br...@osg.samsung.com> Reviewed-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- v3: Don't die if compose can't be established Format a couple lengthy lines to 80 columns Also check LC_CTYPE and LANG for locale settings clients/window.c | 66 1 file changed, 66 insertions(+) diff --git a/clients/window.c b/clients/window.c index 216ef96..1c53b5f 100644 --- a/clients/window.c +++ b/clients/window.c @@ -63,6 +63,7 @@ typedef void *EGLContext; #endif /* no HAVE_CAIRO_EGL */ #include +#include #include #include @@ -372,6 +373,8 @@ struct input { struct { struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; xkb_mod_mask_t control_mask; xkb_mod_mask_t alt_mask; xkb_mod_mask_t shift_mask; @@ -2979,6 +2982,9 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, struct input *input = data; struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; + char *locale; char *map_str; if (!data) { @@ -2997,6 +3003,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB keymap */ keymap = xkb_keymap_new_from_string(input->display->xkb_context, map_str, XKB_KEYMAP_FORMAT_TEXT_V1, @@ -3009,6 +3016,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB state */ state = xkb_state_new(keymap); if (!state) { fprintf(stderr, "failed to create XKB state\n"); @@ -3016,6 +3024,37 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Look up the preferred locale, falling back to "C" as default */ + if (!(locale = getenv("LC_ALL"))) + if (!(locale = getenv("LC_CTYPE"))) + if (!(locale = getenv("LANG"))) + locale = "C"; + + /* Set up XKB compose table */ + compose_table = + xkb_compose_table_new_from_locale(input->display->xkb_context, + locale, + XKB_COMPOSE_COMPILE_NO_FLAGS); + if (compose_table) { + /* Set up XKB compose state */ + compose_state = xkb_compose_state_new(compose_table, + XKB_COMPOSE_STATE_NO_FLAGS); + if (compose_state) { + xkb_compose_state_unref(input->xkb.compose_state); + xkb_compose_table_unref(input->xkb.compose_table); + input->xkb.compose_state = compose_state; + input->xkb.compose_table = compose_table; + } else { + fprintf(stderr, "could not create XKB compose state. " + "Disabiling compose.\n"); + xkb_compose_table_unref(compose_table); + compose_table = NULL; + } + } else { + fprintf(stderr, "could not create XKB compose table for locale '%s'. " +
Re: [PATCH weston v2] clients: Add XKB compose key support
On Fri, Oct 07, 2016 at 02:48:41PM +0300, Ran Benita wrote: > > + /* Look up the appropriate locale, or use "C" as default */ > > + locale = getenv("LC_ALL"); > > + if (!locale) > > + locale = "C"; > > Is there a reason why you decided not to use the "full" procedure, i.e. > also try LC_CTYPE and LANG? No particular reason. I did wonder if it would be worthwhile to check those too, but wasn't sure what order they should be checked. Should it be LANG first, then LC_CTYPE, and then fallback to LC_ALL? > > + /* Set up XKB compose table */ > > + compose_table = > > xkb_compose_table_new_from_locale(input->display->xkb_context, > > + locale, > > + > > XKB_COMPOSE_COMPILE_NO_FLAGS); > > + if (!compose_table) { > > + fprintf(stderr, "could not create XKB compose table for locale > > '%s'\n", locale); > > + xkb_state_unref(state); > > + xkb_keymap_unref(keymap); > > + return; > > + } > > In my opinion, it would be better to proceed without compose, than to > fail the entire setup. If, for example, the compose files are not > available, then it's OK to just skip it. The alternative is that the > window does not show up at all (I assume). > > Ran Ok, good point. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston v2] clients: Add XKB compose key support
This adds single-symbol compose support using libxkbcommon's compose functionality. E.g., assuming you have the right alt key defined as your compose key, typing +i+' will produce í, and +y+= will produce ¥. This makes compose key work for weston-editor, weston-terminal, weston-eventdemo, and any other clients that use Weston's window.* routines for accepting and managing keyboard input. Compose sequences are loaded from the system's standard tables. As well, libxkbcommon will transparently load custom sequences from the user's ~/.XCompose file. Note that due to limitations in toytoolkit's key handler interface, only compose sequences resulting in single symbols are supported. While libxkbcommon supports multi-symbol compose strings, support for passing text buffers to Weston clients is left as future work. This largely obviates the need for the weston-simple-im input method client, which had provided a very limited compose functionality that was only available in clients implementing the zwp_input_method protocol, and with no mechanism to load system or user-specified compose keys. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53648 Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/window.c | 64 1 file changed, 64 insertions(+) diff --git a/clients/window.c b/clients/window.c index 216ef96..0110ae4 100644 --- a/clients/window.c +++ b/clients/window.c @@ -63,6 +63,7 @@ typedef void *EGLContext; #endif /* no HAVE_CAIRO_EGL */ #include +#include #include #include @@ -372,6 +373,8 @@ struct input { struct { struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; xkb_mod_mask_t control_mask; xkb_mod_mask_t alt_mask; xkb_mod_mask_t shift_mask; @@ -2979,6 +2982,9 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, struct input *input = data; struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; + char *locale; char *map_str; if (!data) { @@ -2997,6 +3003,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB keymap */ keymap = xkb_keymap_new_from_string(input->display->xkb_context, map_str, XKB_KEYMAP_FORMAT_TEXT_V1, @@ -3009,6 +3016,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB state */ state = xkb_state_new(keymap); if (!state) { fprintf(stderr, "failed to create XKB state\n"); @@ -3016,8 +3024,38 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Look up the appropriate locale, or use "C" as default */ + locale = getenv("LC_ALL"); + if (!locale) + locale = "C"; + + /* Set up XKB compose table */ + compose_table = xkb_compose_table_new_from_locale(input->display->xkb_context, + locale, + XKB_COMPOSE_COMPILE_NO_FLAGS); + if (!compose_table) { + fprintf(stderr, "could not create XKB compose table for locale '%s'\n", locale); + xkb_state_unref(state); + xkb_keymap_unref(keymap); + return; + } + + /* Set up XKB compose state */ + compose_state = xkb_compose_state_new(compose_table, + XKB_COMPOSE_STATE_NO_FLAGS); + if (!compose_state) { + fprintf(stderr, "could not create XKB compose state\n"); + xkb_compose_table_unref(compose_table); + xkb_state_unref(state); + xkb_keymap_unref(keymap); + } + + xkb_compose_state_unref(input->xkb.compose_state); + xkb_compose_table_unref(input->xkb.compose_table); xkb_keymap_unref(input->xkb.keymap); xkb_state_unref(input->xkb.state); + input->xkb.compose_state = compose_state; + input->xkb.compose_table = compose_table; input->xkb.keymap = keymap; input->xkb.state = state; @@ -3056,6 +3094,29 @@ keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, input_remove_keyboard_focus(input); } +/* Translate symbols appropriately if a compose sequence is being entered */ +static xkb_keysym_t +process_key_press(xkb_keysym_t sym, struct input *input) +{ + if (sym == XKB
Re: [PATCH weston] clients: Add compose key support for weston clients (wip)
Wrong patch, disregard this one... On Thu, Oct 06, 2016 at 09:17:06PM -0700, Bryce Harrington wrote: > This adds single-symbol compose support using libxkbcommon's compose > functionality. E.g., assuming you have the right alt key defined as > your compose key, typing +i+' will produce í, and +y+= will > produce ¥. > > The actual symbols available will depend on what the system makes > available in its default compose sequence tables. Most systems provide > hundreds of symbols. > > Since libxkbcommon transparently handles loading of the user's > ~/.XCompose file, the user can customize and extend the compose > sequences in that file, beyond what the system provides by default. > > Note this only permits insertion of single-symbol compose strings; while > libxkbcommon is able to handle translating multi-symbol compose strings > to the corresponding char* strings for the client, weston's client.c > does not currently have a mechanism for passing text buffers to the > clients, only individual symbols, so this feature will need to be left > for future work. > > Previously, there was a limited compose functionality provided by the > weston-simple-im input method, however it only provided 18 compose key > sequences, and no mechanism to add more other than modifying source > code. Further, it was only available when using that specific input > method and using a client like weston-editor that supports the > zwp_input_method protocol. > > Notably, this enables compose key functionality in weston-terminal, > allowing entry of, for example, French letter symbols like è, á, ï, ê, > et al. weston-eventdemo will also register the composed symbols if > entered, as should any other client that uses Weston's window.* routines > for accepting and managing keyboard input. > > Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53648 > Signed-off-by: Bryce Harrington <br...@osg.samsung.com> > --- > clients/window.c | 75 > +--- > 1 file changed, 66 insertions(+), 9 deletions(-) > > diff --git a/clients/window.c b/clients/window.c > index 216ef96..f38b15a 100644 > --- a/clients/window.c > +++ b/clients/window.c > @@ -63,6 +63,7 @@ typedef void *EGLContext; > #endif /* no HAVE_CAIRO_EGL */ > > #include > +#include > #include > > #include > @@ -372,6 +373,8 @@ struct input { > struct { > struct xkb_keymap *keymap; > struct xkb_state *state; > + struct xkb_compose_table *compose_table; > + struct xkb_compose_state *compose_state; > xkb_mod_mask_t control_mask; > xkb_mod_mask_t alt_mask; > xkb_mod_mask_t shift_mask; > @@ -2979,6 +2982,9 @@ keyboard_handle_keymap(void *data, struct wl_keyboard > *keyboard, > struct input *input = data; > struct xkb_keymap *keymap; > struct xkb_state *state; > + struct xkb_compose_table *compose_table; > + struct xkb_compose_state *compose_state; > + char *locale; > char *map_str; > > if (!data) { > @@ -2997,6 +3003,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard > *keyboard, > return; > } > > + /* Set up XKB keymap */ > keymap = xkb_keymap_new_from_string(input->display->xkb_context, > map_str, > XKB_KEYMAP_FORMAT_TEXT_V1, > @@ -3009,6 +3016,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard > *keyboard, > return; > } > > + /* Set up XKB state */ > state = xkb_state_new(keymap); > if (!state) { > fprintf(stderr, "failed to create XKB state\n"); > @@ -3016,8 +3024,38 @@ keyboard_handle_keymap(void *data, struct wl_keyboard > *keyboard, > return; > } > > + /* Look up the appropriate locale, or use "C" as default */ > + locale = getenv("LC_ALL"); > + if (!locale) > + locale = "C"; > + > + /* Set up XKB compose table */ > + compose_table = > xkb_compose_table_new_from_locale(input->display->xkb_context, > + locale, > + > XKB_COMPOSE_COMPILE_NO_FLAGS); > + if (!compose_table) { > + fprintf(stderr, "could not create XKB compose table for locale > '%s'\n", locale); > + xkb_state_unref(state); > + xkb_keymap_unref(keymap); > + return; > + } > + >
[PATCH weston] clients: Add compose key support for weston clients (wip)
This adds single-symbol compose support using libxkbcommon's compose functionality. E.g., assuming you have the right alt key defined as your compose key, typing +i+' will produce í, and +y+= will produce ¥. The actual symbols available will depend on what the system makes available in its default compose sequence tables. Most systems provide hundreds of symbols. Since libxkbcommon transparently handles loading of the user's ~/.XCompose file, the user can customize and extend the compose sequences in that file, beyond what the system provides by default. Note this only permits insertion of single-symbol compose strings; while libxkbcommon is able to handle translating multi-symbol compose strings to the corresponding char* strings for the client, weston's client.c does not currently have a mechanism for passing text buffers to the clients, only individual symbols, so this feature will need to be left for future work. Previously, there was a limited compose functionality provided by the weston-simple-im input method, however it only provided 18 compose key sequences, and no mechanism to add more other than modifying source code. Further, it was only available when using that specific input method and using a client like weston-editor that supports the zwp_input_method protocol. Notably, this enables compose key functionality in weston-terminal, allowing entry of, for example, French letter symbols like è, á, ï, ê, et al. weston-eventdemo will also register the composed symbols if entered, as should any other client that uses Weston's window.* routines for accepting and managing keyboard input. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53648 Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/window.c | 75 +--- 1 file changed, 66 insertions(+), 9 deletions(-) diff --git a/clients/window.c b/clients/window.c index 216ef96..f38b15a 100644 --- a/clients/window.c +++ b/clients/window.c @@ -63,6 +63,7 @@ typedef void *EGLContext; #endif /* no HAVE_CAIRO_EGL */ #include +#include #include #include @@ -372,6 +373,8 @@ struct input { struct { struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; xkb_mod_mask_t control_mask; xkb_mod_mask_t alt_mask; xkb_mod_mask_t shift_mask; @@ -2979,6 +2982,9 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, struct input *input = data; struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; + char *locale; char *map_str; if (!data) { @@ -2997,6 +3003,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB keymap */ keymap = xkb_keymap_new_from_string(input->display->xkb_context, map_str, XKB_KEYMAP_FORMAT_TEXT_V1, @@ -3009,6 +3016,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB state */ state = xkb_state_new(keymap); if (!state) { fprintf(stderr, "failed to create XKB state\n"); @@ -3016,8 +3024,38 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Look up the appropriate locale, or use "C" as default */ + locale = getenv("LC_ALL"); + if (!locale) + locale = "C"; + + /* Set up XKB compose table */ + compose_table = xkb_compose_table_new_from_locale(input->display->xkb_context, + locale, + XKB_COMPOSE_COMPILE_NO_FLAGS); + if (!compose_table) { + fprintf(stderr, "could not create XKB compose table for locale '%s'\n", locale); + xkb_state_unref(state); + xkb_keymap_unref(keymap); + return; + } + + /* Set up XKB compose state */ + compose_state = xkb_compose_state_new(compose_table, + XKB_COMPOSE_STATE_NO_FLAGS); + if (!compose_state) { + fprintf(stderr, "could not create XKB compose state\n"); + xkb_compose_table_unref(compose_table); + xkb_state_unref(state); + xkb_keymap_unref(keymap); + } + + xkb_compose_state_unref(input->xkb.compose_state); + xkb_compose_table_unref(input->xkb.compose_table); xkb_keymap_unref(input->xkb.keymap);
Re: [PATCH weston] clients: Add XKB compose key support
On Thu, Oct 06, 2016 at 01:06:42PM +0100, Daniel Stone wrote: > Hi, > > On 6 October 2016 at 01:18, Bryce Harrington <br...@osg.samsung.com> wrote: > > This adds single-symbol compose support using libxkbcommon's compose > > functionality. E.g., assuming you have the right alt key defined as > > your compose key, typing +i+' will produce í, and +y+= will > > produce ¥. This makes compose key work for weston-editor, > > weston-terminal, weston-eventdemo, and any other clients that use > > Weston's window.* routines for accepting and managing keyboard input. > > > > Compose sequences are loaded from the system's standard tables. As > > well, libxkbcommon will transparently load custom sequences from the > > user's ~/.XCompose file. > > > > Note that due to limitations in Weston's key handler interface, only > > *toytoolkit's > > > @@ -3101,6 +3139,25 @@ keyboard_handle_key(void *data, struct wl_keyboard > > *keyboard, > >state == WL_KEYBOARD_KEY_STATE_PRESSED) { > > window_close(window); > > } else if (window->key_handler) { > > + if ((sym != XKB_KEY_NoSymbol) && > > + (state == WL_KEYBOARD_KEY_STATE_PRESSED) && > > + (xkb_compose_state_feed(input->xkb.compose_state, sym) > > == XKB_COMPOSE_FEED_ACCEPTED)) { > > Hm, this is kind of a hairy conditional. I could split the switch statement out into a separate function, like this: static xkb_keysym_t process_key_press(xkb_keysym_t sym, struct input *input) { if (sym == XKB_KEY_NoSymbol) return sym; if (xkb_compose_state_feed(input->xkb.compose_state, sym) != XKB_COMPOSE_FEED_ACCEPTED) return sym; switch (xkb_compose_state_get_status(input->xkb.compose_state)) { case XKB_COMPOSE_COMPOSING: return XKB_KEY_NoSymbol; case XKB_COMPOSE_COMPOSED: return xkb_compose_state_get_one_sym(input->xkb.compose_state); case XKB_COMPOSE_CANCELLED: return XKB_KEY_NoSymbol; case XKB_COMPOSE_NOTHING: return sym; } return sym; } With that, then the stanza in keyboard_handle_key() looks cleaner: if (sym == XKB_KEY_F5 && input->modifiers == MOD_ALT_MASK) { if (state == WL_KEYBOARD_KEY_STATE_PRESSED) window_set_maximized(window, !window->maximized); } else if (sym == XKB_KEY_F11 && window->fullscreen_handler && state == WL_KEYBOARD_KEY_STATE_PRESSED) { window->fullscreen_handler(window, window->user_data); } else if (sym == XKB_KEY_F4 && input->modifiers == MOD_ALT_MASK && state == WL_KEYBOARD_KEY_STATE_PRESSED) { window_close(window); } else if (window->key_handler) { if (state == WL_KEYBOARD_KEY_STATE_PRESSED) sym = process_key_press(sym, input); (*window->key_handler)(window, input, time, key, sym, state, window->user_data); } What do you think of that approach? > > + switch > > (xkb_compose_state_get_status(input->xkb.compose_state)) > > + { > > Brace on same line. > > > + case XKB_COMPOSE_COMPOSING: > > + sym = XKB_KEY_NoSymbol; > > + break; > > + > > + case XKB_COMPOSE_COMPOSED: > > + sym = > > xkb_compose_state_get_one_sym(input->xkb.compose_state); > > + break; > > + > > + case XKB_COMPOSE_CANCELLED: > > + case XKB_COMPOSE_NOTHING: > > + break; > > CANCELLED should also produce NoSymbol, but NOTHING is fine to pass through. > > Cheers, > Daniel Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston] clients: Add XKB compose key support
This adds single-symbol compose support using libxkbcommon's compose functionality. E.g., assuming you have the right alt key defined as your compose key, typing +i+' will produce í, and +y+= will produce ¥. This makes compose key work for weston-editor, weston-terminal, weston-eventdemo, and any other clients that use Weston's window.* routines for accepting and managing keyboard input. Compose sequences are loaded from the system's standard tables. As well, libxkbcommon will transparently load custom sequences from the user's ~/.XCompose file. Note that due to limitations in Weston's key handler interface, only compose sequences resulting in single symbols are supported. While libxkbcommon supports multi-symbol compose strings, support for passing text buffers to Weston clients is left as future work. This largely obviates the need for the weston-simple-im input method client, which had provided a very limited compose functionality that was only available in clients implementing the zwp_input_method protocol, and with no mechanism to load system or user-specified compose keys. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53648 Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- clients/window.c | 57 1 file changed, 57 insertions(+) diff --git a/clients/window.c b/clients/window.c index 216ef96..1bb0b30 100644 --- a/clients/window.c +++ b/clients/window.c @@ -63,6 +63,7 @@ typedef void *EGLContext; #endif /* no HAVE_CAIRO_EGL */ #include +#include #include #include @@ -372,6 +373,8 @@ struct input { struct { struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; xkb_mod_mask_t control_mask; xkb_mod_mask_t alt_mask; xkb_mod_mask_t shift_mask; @@ -2979,6 +2982,9 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, struct input *input = data; struct xkb_keymap *keymap; struct xkb_state *state; + struct xkb_compose_table *compose_table; + struct xkb_compose_state *compose_state; + char *locale; char *map_str; if (!data) { @@ -2997,6 +3003,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB keymap */ keymap = xkb_keymap_new_from_string(input->display->xkb_context, map_str, XKB_KEYMAP_FORMAT_TEXT_V1, @@ -3009,6 +3016,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Set up XKB state */ state = xkb_state_new(keymap); if (!state) { fprintf(stderr, "failed to create XKB state\n"); @@ -3016,8 +3024,38 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, return; } + /* Look up the appropriate locale, or use "C" as default */ + locale = getenv("LC_ALL"); + if (!locale) + locale = "C"; + + /* Set up XKB compose table */ + compose_table = xkb_compose_table_new_from_locale(input->display->xkb_context, + locale, + XKB_COMPOSE_COMPILE_NO_FLAGS); + if (!compose_table) { + fprintf(stderr, "could not create XKB compose table for locale '%s'\n", locale); + xkb_state_unref(state); + xkb_keymap_unref(keymap); + return; + } + + /* Set up XKB compose state */ + compose_state = xkb_compose_state_new(compose_table, + XKB_COMPOSE_STATE_NO_FLAGS); + if (!compose_state) { + fprintf(stderr, "could not create XKB compose state\n"); + xkb_compose_table_unref(compose_table); + xkb_state_unref(state); + xkb_keymap_unref(keymap); + } + + xkb_compose_state_unref(input->xkb.compose_state); + xkb_compose_table_unref(input->xkb.compose_table); xkb_keymap_unref(input->xkb.keymap); xkb_state_unref(input->xkb.state); + input->xkb.compose_state = compose_state; + input->xkb.compose_table = compose_table; input->xkb.keymap = keymap; input->xkb.state = state; @@ -3101,6 +3139,25 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard, state == WL_KEYBOARD_KEY_STATE_PRESSED) { window_close(window); } else if (window->key_handler) { + if ((sym != XKB_KEY_NoSymbol) && + (sta
Re: [PATCH wayland v6] util: Document wl_list methods
On Thu, Sep 22, 2016 at 09:59:37PM -0500, Yong Bakos wrote: > From: Yong Bakos <yba...@humanoriented.com> > > Add doxygen comment blocks to all wl_list methods. > > Signed-off-by: Yong Bakos <yba...@humanoriented.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> One extremely minor wording suggestion below only if you do another rev. But this all looks extremely good; will be nice to get the wl_list documentation shaped up, thanks. Bryce > --- > v6: Change description to doubly-linked list (pq) > v5: Change description to linked-list [err] > Clarify uses of `wl_list_init` (pq) > v4: Fix variable name in sample code. (pq) > Remove implemenetation details of pointer state. (pq) > Remove note about __typeof__ entirely. > - it's not helpful as a note or a code comment either > Change sample code indentation to just spaces. (pq) > Use _list suffix for list in sample code. (pq) > Use 'iterate' instead of enumerate, for consistency. (pq) > Note that only removing 'pos' is safe for *_safe methods. (pq, giucam) > v3: Standardize on term 'element', to match param names, tests, and other > text. > Use 'relates' for macros (instead of 'memberof'). > v2: Refine the writing for clarity. > Add dox for wl_list macros, omitted in v1. > Add notices for unsafe operations and invalid states (giucam, pq) > src/wayland-util.h | 224 > +++-- > 1 file changed, 184 insertions(+), 40 deletions(-) > > diff --git a/src/wayland-util.h b/src/wayland-util.h > index cacc122..71c26a1 100644 > --- a/src/wayland-util.h > +++ b/src/wayland-util.h > @@ -78,73 +78,150 @@ struct wl_interface { > > /** \class wl_list > * > - * \brief doubly-linked list > + * \brief Doubly-linked list > * > - * The list head is of "struct wl_list" type, and must be initialized > - * using wl_list_init(). All entries in the list must be of the same > - * type. The item type must have a "struct wl_list" member. This > - * member will be initialized by wl_list_insert(). There is no need to > - * call wl_list_init() on the individual item. To query if the list is > - * empty in O(1), use wl_list_empty(). > + * On its own, an instance of `struct wl_list` represents the sentinel head > of > + * a doubly-linked list, and must be initialized using wl_list_init(). > + * When empty, the list head's `next` and `prev` members point to the list > head > + * itself, otherwise `next` references the first element in the list, and > `prev` > + * refers to the last element in the list. > * > - * Let's call the list reference "struct wl_list foo_list", the item type as > - * "item_t", and the item member as "struct wl_list link". > + * Use the `struct wl_list` type to represent both the list head and the > links > + * between elements within the list. Use wl_list_empty() to determine if the > + * list is empty in O(1). > + * > + * All elements in the list must be of the same type. The element type must > have > + * a `struct wl_list` member, often named `link` by convention. Prior to > + * insertion, there is no need to initialize an element's `link` - invoking > + * wl_list_init() on an individual list element's `struct wl_list` member is > + * unnecessary if the very next operation is wl_list_insert(). However, a > + * common idiom is to initialize an element's `link` prior to removal - > ensure > + * safety by invoking wl_list_init() before wl_list_remove(). > + * > + * Consider a list reference `struct wl_list foo_list`, an element type as > + * `struct element`, and an element's link member as `struct wl_list link`. > + * > + * The following code initializes a list and adds three elements to it. > * > - * The following code will initialize a list: > * \code > * struct wl_list foo_list; > * > - * struct item_t { > - * int foo; > - * struct wl_list link; > + * struct element { > + * int foo; > + * struct wl_list link; > * }; > - * struct item_t item1, item2, item3; > + * struct element e1, e2, e3; > * > * wl_list_init(_list); > - * wl_list_insert(_list, ); // Pushes item1 at the head > - * wl_list_insert(_list, ); // Pushes item2 at the head > - * wl_list_insert(, ); // Pushes item3 after item2 > + * wl_list_insert(_list, ); // e1 is the first element > + * wl_list_insert(_list, ); // e2 is now the first element > + * wl_list_insert(, ); // insert e3 after e2 > * \endcode > > - * The list now looks like [item2, item3, item1] > + * The list now looks like [e2, e3, e1]. > + * > + * The `wl_list` API provides some iterator macros.
[ANNOUNCE] weston 1.11.1
This is a bugfix point release for the 1.11 series, containing half a dozen fixes to minor issues. Arnaud Vrac (1): fullscreen-shell: avoid access to freed data Benoit Gschwind (1): compositor-x11: fix title overflow in x11_backend_create_output Bryce Harrington (1): configure.ac: bump to version 1.11.1 for the point release Derek Foreman (2): weston-editor: Close the data source after sending compositor-drm: Stop sending uninit data to the kernel Emmanuel Gil Peyrot (1): Remove a wrong closing “extern "C"” in shared/xalloc.c Tom Hochstein (1): weston-launch: Handle invalid command line options Yann E. MORIN (1): libweston/compositor-rdp: fix no-break space U+A0 (U8+C2A0) git tag: 1.11.1 http://wayland.freedesktop.org/releases/weston-1.11.1.tar.xz MD5: c5fdc02ab67d33c0fca8f72d341facdf weston-1.11.1.tar.xz SHA1: 9b691829127ab18b838bbc8f1ff87b28ce2a63c9 weston-1.11.1.tar.xz SHA256: 548973496a5c8613d6690f9120f21066946a544df65ce4fe0ef153a8dc0bf6de weston-1.11.1.tar.xz PGP: http://wayland.freedesktop.org/releases/weston-1.11.1.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] wayland 1.11.1
This is a point release for the 1.11 series, backporting a few minor fixes from the 1.12 release. Bryce Harrington (2): scanner: Fix reported executable name to 'wayland-scanner' configure.ac: bump to version 1.11.1 for the point release Yong Bakos (2): doc: Correct docbook title scanner: Move PROGRAM_NAME define git tag: 1.11.1 http://wayland.freedesktop.org/releases/wayland-1.11.1.tar.xz MD5: 82f227c65faec3df0335847626811303 wayland-1.11.1.tar.xz SHA1: cf5c2719592ce324184a785b19a9547dc2d51377 wayland-1.11.1.tar.xz SHA256: 4c8a99d030282740e898dead98c92d92023be9c3536c7f50d215a7e39195 wayland-1.11.1.tar.xz PGP: http://wayland.freedesktop.org/releases/wayland-1.11.1.tar.xz.sig ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 1.12.0
Welcome to the official release of Weston 1.12. Weston's internal code has been restructured into a new software library, libweston. This is intended for use by other compositor efforts that want to more easily utilize Weston's internal functionalities. Weston's own compositor is now a user of this library. As well, another new library named libweston-desktop provides an additional level of functionality of relevance to compositors implementing a desktop metaphor style of graphical interface. This library API is designed around xdg_shell functionality, providing for handling of popups, window state, and interfacing with Xwayland. Both libweston and libweston-desktop should be treated as unstable libraries (i.e. their APIs are subject to change). A versioning scheme has been adopted for their ABI provisioning to enable compile-time detection of breaks. In other words, this enables users to detect incompatibilities at install-time in their packaging system, rather than when they try to actually use the software. The system is designed to help not only with released Weston components but also to flag inconsistencies when using development snapshots of the libraries, to help developers avoid problems due to inconsistencies, too. Support for the new version 6 of the xdg_shell protocol has been implemented in the Weston compositor, and all clients are ported to it. See the wayland-protocols 1.7 release notes for details on the included changes. A pointer locking and confinement API is implemented for Weston using the wp_pointer_constraints protocol, to allow clients to define window regions to confine the pointer to. These regions can be irregular; a client is included to demonstrate confinement to a H-shaped region, for example. A relative pointer protocol (using wl_relative_pointer) has also been introduced, which allows clients to continue receiving pointer movement deltas even when the pointer's absolute position is clipped for example to the edge of the monitor. The Raspberry Pi backend (rpi-backend) and renderer have been dropped. This code was reliant on a proprietary driver stack, and proved not to be maintainable within Weston. Several other features, build improvements, bug-fixes, code refactorings, refinements to destruction processes, and so on are included. See below for the full list of changes. Changes since 1.11: --- Armin Krezović (26): compositor-headless: Support starting with zero outputs desktop-shell: Return NULL when no outputs are present toytoolkit: Return NULL when no outputs are present desktop-shell: Avoid NULL pointer dereference fullscreen-shell: Avoid NULL pointer dereference keyboard: Only set toplevel when there is a valid output gl-renderer: Always setup gl-renderer compositor: Untangle surface/view is_mapped from output assignments desktop-shell: update for manual surface/view mapping fullscreen-shell: update for manual surface/view mapping ivi-shell: update for manual surface/view mapping tests: update for manual surface/view mapping compositor: Switch to new surface/view mapped checks compositor-x11: Flush xcb connection from x11_output_destroy() compositor: Extend compositor user data compositor-drm: Do not return an error when no connectors are configured compositor-drm: Do not exit when there are no outputs left compositor-headless: Use non-cast functions to retrieve backend and output objects compositor-rdp: Use non-cast functions to retrieve backend and output objects compositor-wayland: Use non-cast functions to retrieve backend and output objects compositor-x11: Use non-cast functions to retrieve backend and output objects compositor-drm: Use non-cast functions to retrieve backend and output objects compositor: Mark all views as dirty when a new output is assigned gl-renderer: Make dummy surface current after all outputs are gone libweston: fix animation crash when a view has no output assigned fullscreen-shell: Ensure that fs surface is presented on all outputs Arnaud Vrac (1): fullscreen-shell: avoid access to freed data Benoit Gschwind (3): compositor-x11: fix title overflow in x11_backend_create_output compositor-x11: add assert to avoid misuse of x11_backend_deliver_button_event compositor-x11: remove redundant state arg of x11_backend_deliver_button_event Bryce Harrington (53): releasing: Copyedit post-release branching directions weston-simple-im: Make capitalization consistent in error messages Make config.h inclusion consistent terminal: Document console codes less cryptically input: Rename weston_surface_activate to weston_seat_set_keyboard_focus input: Move weston_seat_set_keyboard_focus and document README: Fix punctuation errors xwayland: Include missing config.h
[ANNOUNCE] wayland 1.12.0
This is the official release of Wayland 1.12. Here is a brief run-down of a few of the main changes since 1.11. The core protocol documentation has received numerous refinements to improve its clarity and consistency. Along with this, many blank areas of the protocol documentation have been fleshed out. A new wl_display_add_protocol logger API provides a new interactive way to debug requests; along with this are new APIs for examining clients and their resources. This is analogous to using WAYLAND_DEBUG=1, but more powerful since it allows run time review of log data such as through a UI view. There have been improvements to how the protocol XML scanner handles version identification in protocol headers. This enables better detection and fallback handling when compositors and clients support differing versions of their protocols. Along with these user-visible changes, there have been a variety of other code refactoring and refinements in Wayland 1.12. Changes since 1.11: --- Bryce Harrington (8): scanner: Fix reported executable name to 'wayland-scanner' tests: Require base 10 for the string specifying the number of open fd's scanner: Improve documentation for strtouint() configure.ac: bump to version 1.11.91 for the alpha release configure.ac: bump to version 1.11.92 for the beta release configure.ac: bump to version 1.11.93 for the RC1 release configure.ac: bump to version 1.11.94 for the RC2 release configure.ac: bump to version 1.12.0 for the official release Giulio Camuffo (5): Add API to retrieve the interface name of a wl_resource Add API to get the list of connected clients Add a resource creation signal Add API to retrieve and iterate over the resources list of a client Add API to install protocol loggers on the server wl_display Khem Raj (1): scanner: Use uint32_t instead of uint Pekka Paalanen (1): configure.ac: bump version to 1.11.90 for open development Quentin Glidic (2): protocol: Add release (destructor) request to wl_output scanner: Generate all SINCE_VERSION macros for everyone Sungjae Park (1): server: add listener API for new clients Yong Bakos (27): doc: Unpublish wl_display_get_additional_shm_formats doc: Unpublish wl_log* and wl_abort doc: Unpublish global_zombie_object and wl_interface_equal event-loop: Make transitive include explicit wayland-server: Clarify included header dependencies wayland-shm: Include wayland-util.h event-loop: Include wayland-util.h client-core: Add missing line breaks server, server-core: Minimize fwd decs, use macro, and format scanner: Replace #define tab with space server-core, event-loop: Fix parameter alignment. scanner: Move PROGRAM_NAME define (multiple): Include stdint.h display-test: Remove redundant stdbool include server: Add doxygen comment for wl_client_for_each protocol: Add summary attributes to request params and enum entries protocol: Hyphenate subsurface protocol: Capitalize ID for consistency protocol: Add missing line break protocol: Correct description indentation protocol: Remove wl_ prefix from summary descriptions protocol: Describe serial as serial number protocol: Specify upper left corner of damage rectangle doc: Correct docbook title tests: Add test for wl_list_length protocol: Replace '#defines' with 'macros' server: Document display parameter git tag: 1.12.0 http://wayland.freedesktop.org/releases/wayland-1.12.0.tar.xz MD5: ee615e2d1e205eec48b02f069327eb96 wayland-1.12.0.tar.xz SHA1: 9a0dd96f53fff3e227035ed76caaa209b632ea8d wayland-1.12.0.tar.xz SHA256: d6b4135cba0188abcb7275513c72dede751d6194f6edc5b82183a3ba8b821ab1 wayland-1.12.0.tar.xz PGP: http://wayland.freedesktop.org/releases/wayland-1.12.0.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [REQUEST] weston 1.12 rc2
On Mon, Sep 12, 2016 at 04:38:37PM -0700, Bryce Harrington wrote: > On Mon, Sep 12, 2016 at 09:33:12PM +0200, Quentin Glidic wrote: > > Hi, > > > > With the libweston-desktop work, several sneaky bugs and regressions > > went in. We are still discovering some of them, and I think we > > should do an RC2 to have a week to test the latest fixes. > > > > How do you feel about it? > > Works for me. With a week passed now I'm checking in if you got the changes done you need to do? I see one fix has landed in trunk for libweston-desktop, was that the only issue you found to be a blocker? Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH wayland-protocols] input-method: Cleanup some grammar
Fix which vs. that, and rephrase a few descriptions to be clearer. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- unstable/input-method/input-method-unstable-v1.xml | 25 +++--- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/unstable/input-method/input-method-unstable-v1.xml b/unstable/input-method/input-method-unstable-v1.xml index e9d93ba..e454a55 100644 --- a/unstable/input-method/input-method-unstable-v1.xml +++ b/unstable/input-method/input-method-unstable-v1.xml @@ -39,7 +39,7 @@ commit_state request and are used by the input method to indicate the known text input state in events like preedit_string, commit_string, and keysym. The text input can then ignore events from the input method - which are based on an outdated state (for example after a reset). + that are based on an outdated state (for example after a reset). Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes @@ -55,11 +55,11 @@ - Send the commit string text for insertion to the application. + Send the commit string text to the application for insertion. - The text to commit could be either just a single character after a key - press or the result of some composing (pre-edit). It could be also an - empty text when some text should be removed (see + The text could be a single character corresponding to an ordinary key + press, one or more characters forming the result of a compose action + (pre-edit), or no characters such as when text should be removed (see delete_surrounding_text) or when the input cursor should be moved (see cursor_position). @@ -86,10 +86,11 @@ - Set the styling information on composing text. The style is applied for - length in bytes from index relative to the beginning of - the composing text (as byte offset). Multiple styles can - be applied to a composing text. + Set the styling information on a section of the composing text + offset index bytes from the beginning and ending at length + bytes. + + Multiple styles can be applied to a composing text. This request should be sent before sending a preedit_string request. @@ -100,7 +101,7 @@ - Set the cursor position inside the composing text (as byte offset) + Set the cursor position inside the composing text (as a byte offset) relative to the start of the composing text. When index is negative no cursor should be displayed. @@ -245,13 +246,13 @@ An input method object is responsible for composing text in response to input from hardware or virtual keyboards. There is one input method object per seat. On activate there is a new input method context object - created which allows the input method to communicate with the text input. + created that allows the input method to communicate with the text input. A text input was activated. Creates an input method context object - which allows communication with the text input. + that allows communication with the text input. -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH wayland-protocols] idle-inhibit: Lead with a verb in request description
Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- unstable/idle-inhibit/idle-inhibit-unstable-v1.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml b/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml index 70372fc..9c06cdc 100644 --- a/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml +++ b/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml @@ -42,7 +42,7 @@ - This destroys the inhibit manager. + Destroy the inhibit manager. @@ -75,7 +75,7 @@ - This removes the inhibitor effect from the associated wl_surface. + Remove the inhibitor effect from the associated wl_surface. -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH wayland-web] Drop the ubuntu 12.04 build directions.
It is unlikely anyone still needs directions on how to install on this old distro -- Ubuntu 12.04 is scheduled to hit end-of-life this April. Further, no developers (to my knowledge) still test on 12.04, so the directions have likely bitrotted anyway. (Bill had a machine running 12.04 and was keeping the page updated, but last March indicated in 4fa80f28 he is no longer testing on it. I myself moved off 12.04 some time ago as well.) For the most part, the directions are requiring a nearly full build of the stack from source, thus is rather duplicative of the generic Wayland build directions (which are more actively maintained). Only a handful of lower level X packages and some compiler tools are used from the system. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- building.html| 3 - ubuntu12.04.html | 306 --- 2 files changed, 309 deletions(-) delete mode 100644 ubuntu12.04.html diff --git a/building.html b/building.html index 22838dd..34663e3 100644 --- a/building.html +++ b/building.html @@ -54,9 +54,6 @@ Ubuntu 16.04. May be useful for any Debian-derived system. Building Weston and XWayland on Linux Mint 17, which is derived from Ubuntu 14.04. -Building Weston and XWayland on -Ubuntu 12.04. May be useful for any Debian-derived system. - For building Weston for http://www.raspberrypi.org/;>Raspberry Pi, follow the normal build guide after checking out the https://dri.freedesktop.org/wiki/VC4/;>FOSS drivers, and use diff --git a/ubuntu12.04.html b/ubuntu12.04.html deleted file mode 100644 index e79dc83..000 --- a/ubuntu12.04.html +++ /dev/null @@ -1,306 +0,0 @@ -http://www.w3.org/TR/html4/strict.dtd;> - - - - - -Building Weston on Ubuntu 12.04 - - - - -Building Weston on Ubuntu 12.04 - -The following sequence of commands successfully built Weston and -XWayland on an Ubuntu 12.04 LTS system, on October 29 2014. This system had -previously been used to compile Xlib programs, and thus already had -some dependencies (such as git, the compiler, and X11 header files) -installed. The commands have been updated for recent versions of -Wayland but not tested. - -This is about the oldest version of Linux which can compile Weston. -Newer Linux distributions should require fewer things to be compiled -from git. - -Conversely, newer versions of the code, in particular Mesa, will -probably require more dependencies than shown here. - - -# setup environment for local install: -export WLD=$HOME/install -export LD_LIBRARY_PATH=$WLD/lib -export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/ -export PATH=$WLD/bin:$PATH -export ACLOCAL_PATH=$WLD/share/aclocal -export ACLOCAL="aclocal -I $ACLOCAL_PATH" -mkdir -p $ACLOCAL_PATH -export MAKEFLAGS="j9" # or use your own flags - -# dependencies for libwayland: -sudo apt-get install doxygen xmlto # or use --disable-documentation -sudo apt-get install libxml2-dev - -# expat with pkg-config needed for libwayland: -wget http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz -tar xzf expat-2.1.0.tar.gz -cd expat-2.1.0 -./configure --prefix=$WLD -make make install -cd .. - -# libwayland-*: -git clone git://anongit.freedesktop.org/wayland/wayland -cd wayland -./autogen.sh --prefix=$WLD -make make install -cd .. - -# wayland-protocols: -git clone git://anongit.freedesktop.org/wayland/wayland-protocols -cd wayland-protocols -./autogen.sh --prefix=$WLD -make make install -cd .. - -# dependencies for Mesa: -# "sudo apt-get build-dep mesa" will install these, but will also -# install unwanted items, such as wayland itself, and xcb prototypes -# that are too old. -sudo apt-get install autoconf automake bison debhelper dpkg-dev flex \ - libudev-dev libx11-dev libx11-xcb-dev \ - libxdamage-dev libxext-dev libxfixes-dev libxxf86vm-dev \ - linux-libc-dev pkg-config python-libxml2 quilt x11proto-dri2-dev \ - x11proto-gl-dev xutils-dev - -# Mesa required llvm-3.1, but newer versions are available. -# "apt-cache search 'llvm-[0-9.]*-dev'" will list them -sudo apt-get install llvm-3.1-dev -sudo ln -sf llvm-config-3.1 /usr/bin/llvm-config - -sudo apt-get install libpciaccess-dev # needed by drm -git clone git://anongit.freedesktop.org/git/mesa/drm -cd drm -./autogen.sh --prefix=$WLD -make make install -cd .. - -# needed by libxcb: -git clone git://anongit.freedesktop.org/xcb/proto -cd proto -./autogen.sh --prefix=$WLD -make make install -cd .. - -# needed by libxcb: -git clone git://anongit.freedesktop.org/xorg/util/macros -cd macros -./autogen.sh --prefix=$WLD -make make install -cd .. - -git clone git://anongit.freedesktop.org/xcb/libxcb -cd libxcb -./autogen.sh --prefix=$WLD -make make install -cd .. - -git clone git://anongit.freedesktop.org/xorg/proto/presentproto -cd presentproto -./autogen.sh --prefix=$WLD -make make install -cd .. - -git clone git://anongit.freedesktop.org/xorg/proto/dri3proto -cd dr
Re: [PATCH libxkbcommon 2/2] README: Add basic build directions
On Fri, Sep 16, 2016 at 09:35:09AM +0300, Ran Benita wrote: > On Thu, Sep 15, 2016 at 02:31:55PM -0700, Bryce Harrington wrote: > > In particular, highlight the use of configure flags to control locating > > X11 keyboard stuff when building for Wayland. > > > > Of particular note, if the locale root is not specified, then xkbcommon > > will look for them under $prefix (i.e. /usr/local/share/X11/locale). > > But unless the user has specifically installed them there, it is better > > to look in the standard system location, /usr/share/X11/locale. > > > > Otherwise, xkbcommon will error when it can't find them, e.g.: > > > > xkbcommon: ERROR: ~/.XCompose:4:9: failed to expand %L to the locale > > Compose file > > xkbcommon: ERROR: ~/.XCompose:4:12: unterminated string literal > > > > Signed-off-by: Bryce Harrington <br...@osg.samsung.com> > > I applied these two as well, thanks! Thanks. > BTW: The xkb-config-root is usually taken from the xkeyboard-config > pkg-config file, so it's usually not problematic if you have > xkeyboard-config installed during the build. > > The x-locale-root is more unfortunate since libX11 does not provide a > pkg-config variable for it. IIRC I tried to add one (and even split the > x-locale stuff to a different repo since the Compose data is useful for > other projects well), but it was ignored... Hopefully distros can split > the libX11 package themselves though. Yeah, you're right, it would be cleaner if that were split out as a separate package (or moved to xkbcommon). This workaround is ok for now, assuming most people still have X11 installed in parallel, but for folks wanting to run pure-Wayland setups if they want compose keys too, having the compose config data only available via libX11 will be a little awkward. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH libxkbcommon 1/2] README: Bug *reports* are welcome
Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 867b532..706822a 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Patches are always welcome, and may be sent to either <xorg-de...@lists.x.org> or <wayland-devel@lists.freedesktop.org> or through github. -Bugs are also welcome, and may be reported either at +Bug reports are also welcome, and may be filed either at Bugzilla https://bugs.freedesktop.org/describecomponents.cgi?product=libxkbcommon or Github https://github.com/xkbcommon/libxkbcommon/issues -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH libxkbcommon 2/2] README: Add basic build directions
In particular, highlight the use of configure flags to control locating X11 keyboard stuff when building for Wayland. Of particular note, if the locale root is not specified, then xkbcommon will look for them under $prefix (i.e. /usr/local/share/X11/locale). But unless the user has specifically installed them there, it is better to look in the standard system location, /usr/share/X11/locale. Otherwise, xkbcommon will error when it can't find them, e.g.: xkbcommon: ERROR: ~/.XCompose:4:9: failed to expand %L to the locale Compose file xkbcommon: ERROR: ~/.XCompose:4:12: unterminated string literal Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- README.md | 15 +++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 706822a..04a5df0 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,21 @@ and dead keys. See [Quick Guide](doc/quick-guide.md). +## Building + +libxkbcommon is built the typical autoconf way: + +./autogen.sh +make + +To build for use with Wayland, you can disable X11 support while still +using the X11 keyboard configuration resource files thusly: + +./autogen.sh --disable-x11 \ +--with-xkb-config-root=/usr/share/X11/xkb \ +--with-x-locale-root=/usr/share/X11/locale +make + ## API While libxkbcommon's API is somewhat derived from the classic XKB API as found -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH libxkbcommon] bench: Check for errors opening Compose file
From: Bryce Harrington <br...@bryceharrington.org> Otherwise it can segfault e.g. running ./compose inside the bench directory. Signed-off-by: Bryce Harrington <br...@bryceharrington.org> --- bench/compose.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/bench/compose.c b/bench/compose.c index 267b757..04873a7 100644 --- a/bench/compose.c +++ b/bench/compose.c @@ -45,6 +45,12 @@ main(void) path = test_get_path("compose/en_US.UTF-8/Compose"); file = fopen(path, "r"); +if (file == NULL) { + perror(path); + free(path); + xkb_context_unref(ctx); + return -1; +} xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); xkb_context_set_log_verbosity(ctx, 0); -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH wayland-protocols] input-method: Lead with a verb in request descriptions
Make all the descriptions consistent by starting the description with a simple verb (set instead of sets, etc.) Add or rework a few of the existing descriptions to fit this form. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- unstable/input-method/input-method-unstable-v1.xml | 33 -- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/unstable/input-method/input-method-unstable-v1.xml b/unstable/input-method/input-method-unstable-v1.xml index e213c05..e9d93ba 100644 --- a/unstable/input-method/input-method-unstable-v1.xml +++ b/unstable/input-method/input-method-unstable-v1.xml @@ -86,7 +86,7 @@ - Sets styling information on composing text. The style is applied for + Set the styling information on composing text. The style is applied for length in bytes from index relative to the beginning of the composing text (as byte offset). Multiple styles can be applied to a composing text. @@ -100,7 +100,7 @@ - Sets the cursor position inside the composing text (as byte offset) + Set the cursor position inside the composing text (as byte offset) relative to the start of the composing text. When index is negative no cursor should be displayed. @@ -112,6 +112,8 @@ + Remove the surrounding text. + This request will be handled on the text_input side directly following a commit_string request. @@ -121,7 +123,7 @@ - Sets the cursor and anchor to a new position. Index is the new cursor + Set the cursor and anchor to a new position. Index is the new cursor position in bytes (when >= 0 this is relative to the end of the inserted text, otherwise it is relative to the beginning of the inserted text). Anchor is the new anchor position in bytes (when >= 0 this is relative to the end of the @@ -156,7 +158,7 @@ - Allows an input method to receive hardware keyboard input and process + Allow an input method to receive hardware keyboard input and process key events to generate text events (with pre-edit) over the wire. This allows input methods which compose multiple key events for inputting text like it is done for CJK languages. @@ -166,11 +168,9 @@ - Should be used when filtering key events with grab_keyboard. - - When the wl_keyboard::key event is not processed by the input - method itself and should be sent to the client instead, forward it - with this request. The arguments should be the ones from the + Forward a wl_keyboard::key event to the client that was not processed + by the input method itself. Should be used when filtering key events + with grab_keyboard. The arguments should be the ones from the wl_keyboard::key event. For generating custom key events use the keysym request instead. @@ -183,10 +183,9 @@ - Should be used when filtering key events with grab_keyboard. - - When the wl_keyboard::modifiers event should also be sent to the - client, forward it with this request. The arguments should be the ones + Forward a wl_keyboard::modifiers event to the client that was not + processed by the input method itself. Should be used when filtering + key events with grab_keyboard. The arguments should be the ones from the wl_keyboard::modifiers event. @@ -285,6 +284,8 @@ + Set the input_panel_surface type to keyboard. + A keyboard surface is only shown when a text input is active. @@ -293,8 +294,10 @@ - An overlay panel is shown near the input cursor above the application - window when a text input is active. + Set the input_panel_surface to be an overlay panel. + + This is shown near the input cursor above the application window when + a text input is active. -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] weston 1.11.94
This is another release candidate for weston 1.12, requested to give the libweston-desktop work another week to more fully stabilize. Weston's internal code has been restructured into a new software library, libweston. This is intended for use by other compositor efforts that want to more easily utilize Weston's internal functionalities. Weston's own compositor is now a user of this library. As well, another new library named libweston-desktop provides an additional level of functionality of relevance to compositors implementing a desktop metaphor style of graphical interface. This library API is designed around xdg_shell functionality, providing for handling of popups, window state, and interfacing with Xwayland. Both libweston and libweston-desktop should be treated as unstable libraries (i.e. their APIs are subject to change). A versioning scheme has been adopted for their ABI provisioning to enable compile-time detection of breaks. In other words, this enables users to detect incompatibilities at install-time in their packaging system, rather than when they try to actually use the software. The system is designed to help not only with released Weston components but also to flag inconsistencies when using development snapshots of the libraries, to help developers avoid problems due to inconsistencies, too. Support for the new version 6 of the xdg_shell protocol has been implemented in the Weston compositor, and all clients are ported to it. See the wayland-protocols 1.7 release notes for details on the included changes. A pointer locking and confinement API is implemented for Weston using the wp_pointer_constraints protocol, to allow clients to define window regions to confine the pointer to. These regions can be irregular; a client is included to demonstrate confinement to a H-shaped region, for example. A relative pointer protocol (using wl_relative_pointer) has also been introduced, which allows clients to continue receiving pointer movement deltas even when the pointer's absolute position is clipped for example to the edge of the monitor. The Raspberry Pi backend (rpi-backend) and renderer have been dropped. This code was reliant on a proprietary driver stack, and proved not to be maintainable within Weston. Several other features, build improvements, bug-fixes, code refactorings, refinements to destruction processes, and so on are included. See previous release notes for details. Changes since previous RC: -- Bryce Harrington (1): configure.ac: bump to version 1.11.94 for the RC2 release Quentin Glidic (6): desktop-shell: Unset fullscreen/maximized state on commit desktop-shell: Add back the saved position and rotation for fullscreen/maximized libweston-desktop/xdg_shell_v5: Add surface as needed Revert "terminal: Fix crash due to race condition in init" libweston-desktop/xdg_shell_v6: Add surface as needed libweston-desktop/xdg_shell_v6: Raise errors on not-yet-possible requests git tag: 1.11.94 http://wayland.freedesktop.org/releases/weston-1.11.94.tar.xz MD5: a4318cfedce49c0f374d7725c3a70e09 weston-1.11.94.tar.xz SHA1: aa59c450e426aff0af82d600e87954d9e740 weston-1.11.94.tar.xz SHA256: f996212d60d3e6d6aef2b34208c6511f3f888a88709907263984571f2516e0de weston-1.11.94.tar.xz PGP: http://wayland.freedesktop.org/releases/weston-1.11.94.tar.xz.sig ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[ANNOUNCE] wayland 1.11.94
This is another release candidate for wayland 1.12. Here is a brief run-down of a few of the main changes since 1.11. The core protocol documentation has received numerous refinements to improve its clarity and consistency. Along with this, many blank areas of the protocol documentation have been fleshed out. A new wl_display_add_protocol logger API provides a new interactive way to debug requests; along with this are new APIs for examining clients and their resources. This is analogous to using WAYLAND_DEBUG=1, but more powerful since it allows run time review of log data such as through a UI view. There have been improvements to how the protocol XML scanner handles version identification in protocol headers. This enables better detection and fallback handling when compositors and clients support differing versions of their protocols. Along with these user-visible changes, there have been a variety of other code refactoring and refinements in Wayland 1.12. Changes since previous RC: -- Bryce Harrington (1): configure.ac: bump to version 1.11.94 for the RC2 release Yong Bakos (2): protocol: Replace '#defines' with 'macros' server: Document display parameter git tag: 1.11.94 http://wayland.freedesktop.org/releases/wayland-1.11.94.tar.xz MD5: 290044ddb26d67b150f71f4f0b05e785 wayland-1.11.94.tar.xz SHA1: 79ac92401a30dc96aca1435695cee78aa2801849 wayland-1.11.94.tar.xz SHA256: fcca8eece0098f213d00ff24151e943828bbed7a84d346cacd8063142bb5e88d wayland-1.11.94.tar.xz PGP: http://wayland.freedesktop.org/releases/wayland-1.11.94.tar.xz.sig signature.asc Description: Digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [REQUEST] weston 1.12 rc2
On Mon, Sep 12, 2016 at 09:33:12PM +0200, Quentin Glidic wrote: > Hi, > > With the libweston-desktop work, several sneaky bugs and regressions > went in. We are still discovering some of them, and I think we > should do an RC2 to have a week to test the latest fixes. > > How do you feel about it? Works for me. I can also plan on doing a 1.12.1 next month to catch anything that does slip through. Bryce ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 1/6 v7] desktop-shell: Enable per-output fade animations
Instead of creating a single global fade surface across all outputs, create a separate surface for each output. This will permit e.g. individual fades for each output (or blocking the fade-outs if inhibiting idling as will come in a later patch.) This also fixes a potential issue if on multihead layout spanning a desktop wider than 8096 (or higher than 8096), the fade animation may not completely cover all surfaces. This assumes the output geometry doesn't change to become larger during the course of the fade animation. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> --- desktop-shell/shell.c | 137 -- desktop-shell/shell.h | 14 +++--- 2 files changed, 84 insertions(+), 67 deletions(-) v7: Changed a couple returns to continues inside a loop Restored a log message that was accidentally dropped diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index a43c2e2..88a05f6 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -196,6 +196,9 @@ surface_rotate(struct shell_surface *surface, struct weston_pointer *pointer); static void shell_fade_startup(struct desktop_shell *shell); +static void +shell_fade(struct desktop_shell *shell, enum fade_type type); + static struct shell_seat * get_shell_seat(struct weston_seat *seat); @@ -2811,9 +2814,6 @@ static const struct weston_desktop_api shell_desktop_api = { * end of libweston-desktop * * */ static void -shell_fade(struct desktop_shell *shell, enum fade_type type); - -static void configure_static_view(struct weston_view *ev, struct weston_layer *layer) { struct weston_view *v, *next; @@ -3796,16 +3796,16 @@ unlock(struct desktop_shell *shell) } static void -shell_fade_done(struct weston_view_animation *animation, void *data) +shell_fade_done_for_output(struct weston_view_animation *animation, void *data) { - struct desktop_shell *shell = data; + struct shell_output *shell_output = data; + struct desktop_shell *shell = shell_output->shell; - shell->fade.animation = NULL; - - switch (shell->fade.type) { + shell_output->fade.animation = NULL; + switch (shell_output->fade.type) { case FADE_IN: - weston_surface_destroy(shell->fade.view->surface); - shell->fade.view = NULL; + weston_surface_destroy(shell_output->fade.view->surface); + shell_output->fade.view = NULL; break; case FADE_OUT: lock(shell); @@ -3816,7 +3816,7 @@ shell_fade_done(struct weston_view_animation *animation, void *data) } static struct weston_view * -shell_fade_create_surface(struct desktop_shell *shell) +shell_fade_create_surface_for_output(struct desktop_shell *shell, struct shell_output *shell_output) { struct weston_compositor *compositor = shell->compositor; struct weston_surface *surface; @@ -3832,8 +3832,8 @@ shell_fade_create_surface(struct desktop_shell *shell) return NULL; } - weston_surface_set_size(surface, 8192, 8192); - weston_view_set_position(view, 0, 0); + weston_surface_set_size(surface, shell_output->output->width, shell_output->output->height); + weston_view_set_position(view, shell_output->output->x, shell_output->output->y); weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0); weston_layer_entry_insert(>fade_layer.view_list, >layer_link); @@ -3848,6 +3848,7 @@ static void shell_fade(struct desktop_shell *shell, enum fade_type type) { float tint; + struct shell_output *shell_output; switch (type) { case FADE_IN: @@ -3861,32 +3862,35 @@ shell_fade(struct desktop_shell *shell, enum fade_type type) return; } - shell->fade.type = type; + /* Create a separate fade surface for each output */ + wl_list_for_each(shell_output, >output_list, link) { + shell_output->fade.type = type; - if (shell->fade.view == NULL) { - shell->fade.view = shell_fade_create_surface(shell); - if (!shell->fade.view) - return; + if (shell_output->fade.view == NULL) { + shell_output->fade.view = shell_fade_create_surface_for_output(shell, shell_output); + if (!shell_output->fade.view) + continue; - shell->fade.view->alpha = 1.0 - tint; - weston_view_update_transform(shell->fade.view); - } + shell_output->fade.view->alpha = 1.0 - tint; + weston_view_update_transform(shell_output->fade.view); +
Re: [PATCH weston v6 1/6] desktop-shell: Enable per-output fade animations
On Fri, Sep 09, 2016 at 11:45:18AM +0200, Quentin Glidic wrote: > On 09/09/2016 04:31, Bryce Harrington wrote: > >Instead of creating a single global fade surface across all outputs, > >create a separate surface for each output. This will permit > >e.g. individual fades for each output (or blocking the fade-outs if > >inhibiting idling as will come in a later patch.) > > > >This also fixes a potential issue if on multihead layout spanning a > >desktop wider than 8096 (or higher than 8096), the fade animation may > >not completely cover all surfaces. > > > >This assumes the output geometry doesn't change to become larger during > >the course of the fade animation. > > > >Signed-off-by: Bryce Harrington <br...@osg.samsung.com> > > v6 should be the last for this one. A few non-blocking comments > inline, but with these “fixed”: > Reviewed-by: Quentin Glidic <sardemff7+...@sardemff7.net> > > >--- > > desktop-shell/shell.c | 138 > > -- > > desktop-shell/shell.h | 14 ++--- > > 2 files changed, 84 insertions(+), 68 deletions(-) > > > >diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c > >index a43c2e2..bd84b83 100644 > >--- a/desktop-shell/shell.c > >+++ b/desktop-shell/shell.c > >@@ -196,6 +196,9 @@ surface_rotate(struct shell_surface *surface, struct > >weston_pointer *pointer); > > static void > > shell_fade_startup(struct desktop_shell *shell); > > > >+static void > >+shell_fade(struct desktop_shell *shell, enum fade_type type); > >+ > > static struct shell_seat * > > get_shell_seat(struct weston_seat *seat); > > > >@@ -2811,9 +2814,6 @@ static const struct weston_desktop_api > >shell_desktop_api = { > > * end of libweston-desktop * > > * */ > > static void > >-shell_fade(struct desktop_shell *shell, enum fade_type type); > >- > >-static void > > configure_static_view(struct weston_view *ev, struct weston_layer *layer) > > { > > struct weston_view *v, *next; > >@@ -3796,16 +3796,16 @@ unlock(struct desktop_shell *shell) > > } > > > > static void > >-shell_fade_done(struct weston_view_animation *animation, void *data) > >+shell_fade_done_for_output(struct weston_view_animation *animation, void > >*data) > > { > >-struct desktop_shell *shell = data; > >+struct shell_output *shell_output = data; > >+struct desktop_shell *shell = shell_output->shell; > > > >-shell->fade.animation = NULL; > >- > >-switch (shell->fade.type) { > >+shell_output->fade.animation = NULL; > >+switch (shell_output->fade.type) { > > case FADE_IN: > >-weston_surface_destroy(shell->fade.view->surface); > >-shell->fade.view = NULL; > >+weston_surface_destroy(shell_output->fade.view->surface); > >+shell_output->fade.view = NULL; > > break; > > case FADE_OUT: > > lock(shell); > >@@ -3816,7 +3816,7 @@ shell_fade_done(struct weston_view_animation > >*animation, void *data) > > } > > > > static struct weston_view * > >-shell_fade_create_surface(struct desktop_shell *shell) > >+shell_fade_create_surface_for_output(struct desktop_shell *shell, struct > >shell_output *shell_output) > > { > > struct weston_compositor *compositor = shell->compositor; > > struct weston_surface *surface; > >@@ -3832,8 +3832,8 @@ shell_fade_create_surface(struct desktop_shell *shell) > > return NULL; > > } > > > >-weston_surface_set_size(surface, 8192, 8192); > >-weston_view_set_position(view, 0, 0); > >+weston_surface_set_size(surface, shell_output->output->width, > >shell_output->output->height); > >+weston_view_set_position(view, shell_output->output->x, > >shell_output->output->y); > > weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0); > > weston_layer_entry_insert(>fade_layer.view_list, > > >layer_link); > >@@ -3848,6 +3848,7 @@ static void > > shell_fade(struct desktop_shell *shell, enum fade_type type) > > { > > float tint; > >+struct shell_output *shell_output; > > > > switch (type) { > > case FADE_IN: > >@@ -3857,36 +3858,38 @@ shell_fade(struct desktop_shell *shell, enum > >fade_type type) > > tint =
[PATCH weston v6 5/6] shell: Inhibit idle fade-out behavior
When a client has registered idle inhibition on a surface, don't trigger the fade-out animation on the output(s) the surface is displayed on. But when the surface is destroyed or the inhibitor itself is destroyed by client request, re-queue the fade out animation. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- desktop-shell/shell.c | 34 ++ libweston/compositor.c | 5 - 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index bd84b83..ecc3568 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2279,6 +2279,7 @@ fade_out_done(struct weston_view_animation *animation, void *data) } } +/** Re-queue the fade animation to be evaluated if client had been inhibiting */ struct shell_surface * get_shell_surface(struct weston_surface *surface) { @@ -2295,6 +2296,26 @@ get_shell_surface(struct weston_surface *surface) */ static void +desktop_drop_idle_inhibitor(struct weston_desktop_surface *desktop_surface, + void *shell) +{ + struct shell_surface *shsurf = + weston_desktop_surface_get_user_data(desktop_surface); + struct weston_surface *surface = + weston_desktop_surface_get_surface(desktop_surface); + struct weston_compositor *compositor = + shsurf->shell->compositor; + + if (compositor->state == WESTON_COMPOSITOR_IDLE +|| compositor->state == WESTON_COMPOSITOR_OFFSCREEN +|| compositor->state == WESTON_COMPOSITOR_SLEEPING) + { + surface->inhibit_idling = false; + shell_fade(shsurf->shell, FADE_OUT); + } +} + +static void desktop_surface_added(struct weston_desktop_surface *desktop_surface, void *shell) { @@ -2358,6 +2379,9 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface, if (!shsurf) return; + if (surface->inhibit_idling) + desktop_drop_idle_inhibitor(desktop_surface, shell); + wl_signal_emit(>destroy_signal, shsurf); if (shsurf->fullscreen.black_view) @@ -2800,6 +2824,7 @@ static const struct weston_desktop_api shell_desktop_api = { .struct_size = sizeof(struct weston_desktop_api), .surface_added = desktop_surface_added, .surface_removed = desktop_surface_removed, + .drop_idle_inhibitor = desktop_drop_idle_inhibitor, .committed = desktop_surface_committed, .move = desktop_surface_move, .resize = desktop_surface_resize, @@ -3849,6 +3874,7 @@ shell_fade(struct desktop_shell *shell, enum fade_type type) { float tint; struct shell_output *shell_output; + uint32_t inhibit_mask = weston_compositor_inhibited_outputs(shell->compositor); switch (type) { case FADE_IN: @@ -3863,6 +3889,9 @@ shell_fade(struct desktop_shell *shell, enum fade_type type) /* Create a separate fade surface for each output */ wl_list_for_each(shell_output, >output_list, link) { + if (inhibit_mask & (1 << shell_output->output->id)) + continue; + shell_output->fade.type = type; if (shell_output->fade.view == NULL) { @@ -3958,12 +3987,17 @@ shell_fade_init(struct desktop_shell *shell) return; wl_list_for_each(shell_output, >output_list, link) { + uint32_t inhibit_mask = weston_compositor_inhibited_outputs(shell->compositor); + if (shell_output->fade.view != NULL) { weston_log("%s: warning: fade surface already exists\n", __func__); continue; } + if (inhibit_mask & (1 << shell_output->output->id)) + continue; + shell_output->fade.view = shell_fade_create_surface_for_output(shell, shell_output); if (!shell_output->fade.view) return; diff --git a/libweston/compositor.c b/libweston/compositor.c index 62533ca..91ed72c 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -3930,7 +3930,10 @@ bind_subcompositor(struct wl_client *client, compositor, NULL); } -/** Set a DPMS mode on all of the compositor's outputs +/** Apply a DPMS mode to the compositor's outputs. + * + * Outputs may skip setting the DPMS state if they are being used to + * display an surface that is requesting idle behaviors be inhibited. * * \param compositor The compositor instance * \param state The DPMS state the outputs will be set to -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston v6 3/6] compositor: Add public interface support for client-requested idle inhibition
This API allows clients to create an idle manager that can be used to create per-surface inhibitor objects. These direct the compositor to not idle off the output that the surface is displayed on (i.e. don't blank the surface's screen or show a screensaver). When the inhibitor object is destroyed, the inhibition request is automatically dropped and a signal fired in libweston; this is used to communicate to the shell that it should resume any idle behaviors (fade out animations, etc.) and treat the output as idled. If the client destroys the manager, the individual inhibitors will remain active until destroyed. The protocol spec does not define what should happen in this situation, so this behavior may be altered once it has been clarified. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- Makefile.am| 4 +- libweston/compositor.c | 103 + libweston/compositor.h | 9 +++-- 3 files changed, 111 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 1e63a58..6241fa0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -176,7 +176,9 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \ protocol/relative-pointer-unstable-v1-protocol.c\ protocol/relative-pointer-unstable-v1-server-protocol.h \ protocol/pointer-constraints-unstable-v1-protocol.c \ - protocol/pointer-constraints-unstable-v1-server-protocol.h + protocol/pointer-constraints-unstable-v1-server-protocol.h \ + protocol/idle-inhibit-unstable-v1-protocol.c\ + protocol/idle-inhibit-unstable-v1-server-protocol.h BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES) diff --git a/libweston/compositor.c b/libweston/compositor.c index 7f92288..62533ca 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -51,6 +51,8 @@ #include #include +#include + #include "timeline.h" #include "compositor.h" @@ -457,6 +459,7 @@ weston_surface_create(struct weston_compositor *compositor) wl_signal_init(>destroy_signal); wl_signal_init(>commit_signal); + wl_signal_init(>drop_idle_inhibitor_signal); surface->compositor = compositor; surface->ref_count = 1; @@ -4723,6 +4726,102 @@ compositor_bind(struct wl_client *client, compositor, NULL); } +struct weston_idle_inhibitor { + struct weston_surface *surface; +}; + +/* Called when the idle inhibitor is destroyed on the server-side */ +static void +destroy_idle_inhibitor(struct wl_resource *resource) +{ + struct weston_idle_inhibitor *inhibitor = wl_resource_get_user_data(resource); + + assert(inhibitor); + + if (inhibitor->surface) { + inhibitor->surface->inhibit_idling = false; + wl_resource_set_user_data(resource, NULL); + } + + free(inhibitor); +} + +/* Called when the client requests destruction of the idle inhibitor */ +static void +idle_inhibitor_destroy(struct wl_client *client, struct wl_resource *resource) +{ + struct weston_idle_inhibitor *inhibitor = wl_resource_get_user_data(resource); + + assert(inhibitor); + + wl_resource_destroy(resource); + + /* Send a notification to re-queue any idle behaviors */ + wl_signal_emit(>surface->drop_idle_inhibitor_signal, + inhibitor->surface); +} + +static const struct zwp_idle_inhibitor_v1_interface idle_inhibitor_interface = { + idle_inhibitor_destroy +}; + +static void +idle_inhibit_manager_destroy(struct wl_client *client, struct wl_resource *resource) +{ + wl_resource_destroy(resource); +} + +static void +idle_inhibit_manager_create_inhibitor(struct wl_client *client, struct wl_resource *resource, + uint32_t id, struct wl_resource *surface_resource) +{ + struct weston_surface *surface = wl_resource_get_user_data(surface_resource); + struct weston_idle_inhibitor *inhibitor; + struct wl_resource *cr; + + cr = wl_resource_create(client, _idle_inhibitor_v1_interface, + wl_resource_get_version(resource), id); + if (cr == NULL) { + wl_client_post_no_memory(client); + return; + } + + inhibitor = zalloc(sizeof *inhibitor); + if (inhibitor == NULL) { + wl_client_post_no_memory(client); + return; + } + + inhibitor->surface = surface; + inhibitor->surface->inhibit_idling = true; + + wl_resource_set_implementation(cr, _inhibitor_interface, + inhibitor, destroy_idle_inhibitor); +} + +static const struct zwp_idle_inhibit_manager_v1_interface idle_inhibit_manager_interface = { + idle_inhibit_manager_destr
[PATCH weston v6 6/6] clients: Add screensaver inhibitor client demo
Derive client from simple-shm and hook up the API defined in wayland-protocols to allow client screensaver inhibition requests. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- .gitignore| 1 + Makefile.am | 14 +- clients/simple-idle.c | 573 ++ 3 files changed, 587 insertions(+), 1 deletion(-) create mode 100644 clients/simple-idle.c diff --git a/.gitignore b/.gitignore index 41a140b..d451120 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,7 @@ weston-scaler weston-simple-dmabuf-intel weston-simple-dmabuf-v4l weston-simple-egl +weston-simple-idle weston-simple-shm weston-simple-touch weston-simple-damage diff --git a/Makefile.am b/Makefile.am index 6241fa0..e2959f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -525,6 +525,7 @@ if BUILD_SIMPLE_CLIENTS demo_clients +=\ weston-simple-shm \ weston-simple-damage\ + weston-simple-idle \ weston-simple-touch \ weston-presentation-shm \ weston-multi-resource @@ -551,6 +552,15 @@ nodist_weston_simple_damage_SOURCES = \ weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS) weston_simple_damage_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la +weston_simple_idle_SOURCES = clients/simple-idle.c +nodist_weston_simple_idle_SOURCES =\ + protocol/xdg-shell-unstable-v6-protocol.c \ + protocol/xdg-shell-unstable-v6-client-protocol.h\ + protocol/idle-inhibit-unstable-v1-protocol.c\ + protocol/idle-inhibit-unstable-v1-client-protocol.h +weston_simple_idle_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS) +weston_simple_idle_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la + weston_simple_touch_SOURCES = \ clients/simple-touch.c \ shared/helpers.h @@ -849,7 +859,9 @@ BUILT_SOURCES +=\ protocol/ivi-hmi-controller-protocol.c \ protocol/ivi-hmi-controller-client-protocol.h \ protocol/ivi-application-protocol.c \ - protocol/ivi-application-client-protocol.h + protocol/ivi-application-client-protocol.h \ + protocol/idle-inhibit-unstable-v1-protocol.c \ + protocol/idle-inhibit-unstable-v1-client-protocol.h westondatadir = $(datadir)/weston dist_westondata_DATA = \ diff --git a/clients/simple-idle.c b/clients/simple-idle.c new file mode 100644 index 000..e7cd66f --- /dev/null +++ b/clients/simple-idle.c @@ -0,0 +1,573 @@ +/* + * Copyright © 2016 Samsung Electronics Co., Ltd + * Copyright © 2011 Benjamin Franzke + * Copyright © 2010 Intel Corporation + * + * 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 WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/** + * \file simple-idle.c + * \brief Demonstrate the use of Wayland's idle behavior inhibition protocol + * + * \author Bryce Harrington + */ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "shared/config-parser.h" +#include "shared/helpers.h" +#include "shared/os-compatibility.h" +#include "shared/zalloc.h" +#include "xdg-shell-unstable-v6-client-protocol.h" +#include "idle-inhibit-unstable-v1-client-protocol.h" + + +/** display help message */ +static bool opt_help = false; + +/** print extra output to stdout */ +static bool opt_verbose = false; + +/** Delay this many milliseconds when the inhibitor is requested */ +static int opt_inhibitor_creation_delay = 0; + +/** if non-negative, destroy the inhibitor after this many milliseconds have elapsed since program start */ +static
[PATCH weston v6 2/6] compositor: Add internal support to track idle inhibition requests
Adds a helper routine weston_output_inhibited_outputs() which returns a mask of outputs that should inhibit screen idling. Use this routine to check for inhibiting outputs for handling of idle behaviors in core: In sleep mode, only halt repainting outputs that don't have valid inhibits. Don't send these monitors DPMS off commands either, if the system would otherwise be powering them down. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- libweston/compositor.c | 56 -- libweston/compositor.h | 10 + 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 47907bb..7f92288 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -485,6 +485,8 @@ weston_surface_create(struct weston_compositor *compositor) wl_list_init(>pointer_constraints); + surface->inhibit_idling = false; + return surface; } @@ -2320,15 +2322,42 @@ weston_output_schedule_repaint_reset(struct weston_output *output) TL_POINT("core_repaint_exit_loop", TLP_OUTPUT(output), TLP_END); } +/** Retrieves a mask of outputs that should inhibit screensaving + * + * \param compositor The compositor instance. + * \return An output mask indicating the ids of all inhibiting outputs + * + * Checks for surfaces whose clients have requested that they + * disable the screenserver and display powersaving. Note + * the output ids for these surfaces. + */ +WL_EXPORT uint32_t +weston_compositor_inhibited_outputs(struct weston_compositor *compositor) +{ + struct weston_view *view; + uint32_t inhibited_outputs_mask = 0; + + wl_list_for_each(view, >view_list, link) { + /* Does the view's surface inhibit this output? */ + if (!view->surface->inhibit_idling) + continue; + + inhibited_outputs_mask |= view->output_mask; + } + return inhibited_outputs_mask; +} + static int output_repaint_timer_handler(void *data) { struct weston_output *output = data; struct weston_compositor *compositor = output->compositor; + uint32_t inhibited_outputs_mask = weston_compositor_inhibited_outputs(compositor); if (output->repaint_needed && - compositor->state != WESTON_COMPOSITOR_SLEEPING && compositor->state != WESTON_COMPOSITOR_OFFSCREEN && + (compositor->state != WESTON_COMPOSITOR_SLEEPING +|| inhibited_outputs_mask & (1 << output->id)) && weston_output_repaint(output) == 0) return 0; @@ -2450,9 +2479,15 @@ weston_output_schedule_repaint(struct weston_output *output) { struct weston_compositor *compositor = output->compositor; struct wl_event_loop *loop; + uint32_t inhibited_outputs_mask = weston_compositor_inhibited_outputs(compositor); - if (compositor->state == WESTON_COMPOSITOR_SLEEPING || - compositor->state == WESTON_COMPOSITOR_OFFSCREEN) + /* If we're offscreen, or if we're sleeping and the monitor +* isn't currently being inhibited by an active surface, then +* skip repainting. +*/ + if (compositor->state == WESTON_COMPOSITOR_OFFSCREEN || + (compositor->state == WESTON_COMPOSITOR_SLEEPING && +!(inhibited_outputs_mask & (1 << output->id return; if (!output->repaint_needed) @@ -3902,10 +3937,19 @@ weston_compositor_dpms(struct weston_compositor *compositor, enum dpms_enum state) { struct weston_output *output; + uint32_t inhibited_outputs_mask = weston_compositor_inhibited_outputs(compositor); -wl_list_for_each(output, >output_list, link) - if (output->set_dpms) - output->set_dpms(output, state); + wl_list_for_each(output, >output_list, link) { + if (!output->set_dpms) + continue; + + /* If output is idle-inhibited, don't toggle to any DPMS state except ON. */ + if (state != WESTON_DPMS_ON && + inhibited_outputs_mask & (1 << output->id)) + continue; + + output->set_dpms(output, state); + } } /** Restores the compositor to active status diff --git a/libweston/compositor.h b/libweston/compositor.h index 16db03b..7a53127 100644 --- a/libweston/compositor.h +++ b/libweston/compositor.h @@ -1155,6 +1155,14 @@ struct weston_surface { /* An list of per seat pointer constraints. */ struct wl_list pointer_constraints; + + /* +* Indicates the surface prefers no screenblanking, screensaving, +* or other automatic obscurement to kick
[PATCH weston v6 4/6] libweston-desktop: Add listener and API to drop the idle inhibitor
Listen for the drop_idle_inhibitor signal from libweston, and propagate the call to a corresponding libweston-desktop API. Shells aren't required to implement handling for destruction of the idle inhibitor, if they have no additional behaviors (e.g. fade-out animations) beyond letting the output be idled off. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- libweston-desktop/internal.h | 3 +++ libweston-desktop/libweston-desktop.c | 9 + libweston-desktop/libweston-desktop.h | 2 ++ libweston-desktop/surface.c | 17 + 4 files changed, 31 insertions(+) diff --git a/libweston-desktop/internal.h b/libweston-desktop/internal.h index a9c974b..c9f51b6 100644 --- a/libweston-desktop/internal.h +++ b/libweston-desktop/internal.h @@ -47,6 +47,9 @@ void weston_desktop_api_surface_removed(struct weston_desktop *desktop, struct weston_desktop_surface *surface); void +weston_desktop_api_drop_idle_inhibitor(struct weston_desktop *desktop, + struct weston_desktop_surface *surface); +void weston_desktop_api_committed(struct weston_desktop *desktop, struct weston_desktop_surface *surface, int32_t sx, int32_t sy); diff --git a/libweston-desktop/libweston-desktop.c b/libweston-desktop/libweston-desktop.c index 0ee1139..2418242 100644 --- a/libweston-desktop/libweston-desktop.c +++ b/libweston-desktop/libweston-desktop.c @@ -61,6 +61,7 @@ weston_desktop_create(struct weston_compositor *compositor, assert(api->surface_added); assert(api->surface_removed); + /* assert(api->surface_drop_idle_inhibitor); -- optional, for now */ desktop = zalloc(sizeof(struct weston_desktop)); desktop->compositor = compositor; @@ -166,6 +167,14 @@ weston_desktop_api_surface_removed(struct weston_desktop *desktop, } void +weston_desktop_api_drop_idle_inhibitor(struct weston_desktop *desktop, + struct weston_desktop_surface *surface) +{ + if (desktop->api.drop_idle_inhibitor) + desktop->api.drop_idle_inhibitor(surface, desktop->user_data); +} + +void weston_desktop_api_committed(struct weston_desktop *desktop, struct weston_desktop_surface *surface, int32_t sx, int32_t sy) diff --git a/libweston-desktop/libweston-desktop.h b/libweston-desktop/libweston-desktop.h index f77ab55..962e46c 100644 --- a/libweston-desktop/libweston-desktop.h +++ b/libweston-desktop/libweston-desktop.h @@ -59,6 +59,8 @@ struct weston_desktop_api { void *user_data); void (*surface_removed)(struct weston_desktop_surface *surface, void *user_data); + void (*drop_idle_inhibitor)(struct weston_desktop_surface *surface, + void *user_data); void (*committed)(struct weston_desktop_surface *surface, int32_t sx, int32_t sy, void *user_data); void (*show_window_menu)(struct weston_desktop_surface *surface, diff --git a/libweston-desktop/surface.c b/libweston-desktop/surface.c index 2205107..feb3e1b 100644 --- a/libweston-desktop/surface.c +++ b/libweston-desktop/surface.c @@ -54,6 +54,7 @@ struct weston_desktop_surface { struct weston_position buffer_move; struct wl_listener surface_commit_listener; struct wl_listener surface_destroy_listener; + struct wl_listener drop_idle_inhibitor_listener; struct wl_listener client_destroy_listener; struct wl_list children_list; @@ -130,6 +131,7 @@ weston_desktop_surface_destroy(struct weston_desktop_surface *surface) wl_list_remove(>surface_commit_listener.link); wl_list_remove(>surface_destroy_listener.link); + wl_list_remove(>drop_idle_inhibitor_listener.link); wl_list_remove(>client_destroy_listener.link); if (!wl_list_empty(>resource_list)) { @@ -218,6 +220,17 @@ weston_desktop_surface_resource_destroy(struct wl_resource *resource) } static void +weston_desktop_drop_idle_inhibitor(struct wl_listener *listener, + void *data) +{ + struct weston_desktop_surface *surface = + wl_container_of(listener, surface, drop_idle_inhibitor_listener); + struct weston_desktop *desktop = surface->desktop; + + weston_desktop_api_drop_idle_inhibitor(desktop, surface); +} + +static void weston_desktop_surface_committed(struct weston_surface *wsurface, int32_t sx, int32_t sy) { @@ -277,6 +290,10 @@ weston_desktop_surface_create(struct weston_desktop *desktop, weston_desktop_surface_surface_destroyed; wl_signal_add(>surface->destroy_signal, >surface_destroy_listener)
[PATCH weston v6 1/6] desktop-shell: Enable per-output fade animations
Instead of creating a single global fade surface across all outputs, create a separate surface for each output. This will permit e.g. individual fades for each output (or blocking the fade-outs if inhibiting idling as will come in a later patch.) This also fixes a potential issue if on multihead layout spanning a desktop wider than 8096 (or higher than 8096), the fade animation may not completely cover all surfaces. This assumes the output geometry doesn't change to become larger during the course of the fade animation. Signed-off-by: Bryce Harrington <br...@osg.samsung.com> --- desktop-shell/shell.c | 138 -- desktop-shell/shell.h | 14 ++--- 2 files changed, 84 insertions(+), 68 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index a43c2e2..bd84b83 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -196,6 +196,9 @@ surface_rotate(struct shell_surface *surface, struct weston_pointer *pointer); static void shell_fade_startup(struct desktop_shell *shell); +static void +shell_fade(struct desktop_shell *shell, enum fade_type type); + static struct shell_seat * get_shell_seat(struct weston_seat *seat); @@ -2811,9 +2814,6 @@ static const struct weston_desktop_api shell_desktop_api = { * end of libweston-desktop * * */ static void -shell_fade(struct desktop_shell *shell, enum fade_type type); - -static void configure_static_view(struct weston_view *ev, struct weston_layer *layer) { struct weston_view *v, *next; @@ -3796,16 +3796,16 @@ unlock(struct desktop_shell *shell) } static void -shell_fade_done(struct weston_view_animation *animation, void *data) +shell_fade_done_for_output(struct weston_view_animation *animation, void *data) { - struct desktop_shell *shell = data; + struct shell_output *shell_output = data; + struct desktop_shell *shell = shell_output->shell; - shell->fade.animation = NULL; - - switch (shell->fade.type) { + shell_output->fade.animation = NULL; + switch (shell_output->fade.type) { case FADE_IN: - weston_surface_destroy(shell->fade.view->surface); - shell->fade.view = NULL; + weston_surface_destroy(shell_output->fade.view->surface); + shell_output->fade.view = NULL; break; case FADE_OUT: lock(shell); @@ -3816,7 +3816,7 @@ shell_fade_done(struct weston_view_animation *animation, void *data) } static struct weston_view * -shell_fade_create_surface(struct desktop_shell *shell) +shell_fade_create_surface_for_output(struct desktop_shell *shell, struct shell_output *shell_output) { struct weston_compositor *compositor = shell->compositor; struct weston_surface *surface; @@ -3832,8 +3832,8 @@ shell_fade_create_surface(struct desktop_shell *shell) return NULL; } - weston_surface_set_size(surface, 8192, 8192); - weston_view_set_position(view, 0, 0); + weston_surface_set_size(surface, shell_output->output->width, shell_output->output->height); + weston_view_set_position(view, shell_output->output->x, shell_output->output->y); weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0); weston_layer_entry_insert(>fade_layer.view_list, >layer_link); @@ -3848,6 +3848,7 @@ static void shell_fade(struct desktop_shell *shell, enum fade_type type) { float tint; + struct shell_output *shell_output; switch (type) { case FADE_IN: @@ -3857,36 +3858,38 @@ shell_fade(struct desktop_shell *shell, enum fade_type type) tint = 1.0; break; default: - weston_log("shell: invalid fade type\n"); return; } - shell->fade.type = type; + /* Create a separate fade surface for each output */ + wl_list_for_each(shell_output, >output_list, link) { + shell_output->fade.type = type; - if (shell->fade.view == NULL) { - shell->fade.view = shell_fade_create_surface(shell); - if (!shell->fade.view) - return; + if (shell_output->fade.view == NULL) { + shell_output->fade.view = shell_fade_create_surface_for_output(shell, shell_output); + if (!shell_output->fade.view) + return; - shell->fade.view->alpha = 1.0 - tint; - weston_view_update_transform(shell->fade.view); - } + shell_output->fade.view->alpha = 1.0 - tint; + weston_view_update_transform(shell_output->fade.view); + } - if (shell->fade.view->output
[PATCH weston v6 0/6] Implement screensaver/idle inhibition
dicate the inhibitor was destroyed. Screen should fade to black immediately (i.e. within less than a second). Bryce Harrington (6): desktop-shell: Enable per-output fade animations compositor: Add internal support to track idle inhibition requests compositor: Add public interface support for client-requested idle inhibition libweston-desktop: Add listener and API to drop the idle inhibitor shell: Inhibit idle fade-out behavior clients: Add screensaver inhibitor client demo .gitignore| 1 + Makefile.am | 18 +- clients/simple-idle.c | 573 ++ desktop-shell/shell.c | 172 ++ desktop-shell/shell.h | 14 +- libweston-desktop/internal.h | 3 + libweston-desktop/libweston-desktop.c | 9 + libweston-desktop/libweston-desktop.h | 2 + libweston-desktop/surface.c | 17 + libweston/compositor.c| 164 +- libweston/compositor.h| 15 +- 11 files changed, 909 insertions(+), 79 deletions(-) create mode 100644 clients/simple-idle.c -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH wayland-protocols] input-method: Correct grammar
From: Bryce Harrington <br...@bryceharrington.org> These should all be pretty straightforward; there are no behavioral changes. Signed-off-by: Bryce Harrington <br...@bryceharrington.org> --- unstable/input-method/input-method-unstable-v1.xml | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unstable/input-method/input-method-unstable-v1.xml b/unstable/input-method/input-method-unstable-v1.xml index c1b2b59..e213c05 100644 --- a/unstable/input-method/input-method-unstable-v1.xml +++ b/unstable/input-method/input-method-unstable-v1.xml @@ -27,8 +27,8 @@ Corresponds to a text input on the input method side. An input method context - is created on text input activation on the input method side. It allows to - receive information about the text input from the application via events. + is created on text input activation on the input method side. It allows + receiving information about the text input from the application via events. Input method contexts do not keep state after deactivation and should be destroyed after deactivation is handled. @@ -122,10 +122,10 @@ Sets the cursor and anchor to a new position. Index is the new cursor - position in bytes (when >= 0 relative to the end of inserted text, - otherwise relative to the beginning of the inserted text). Anchor is - the new anchor position in bytes (when >= 0 relative to the end of the - inserted text, otherwise relative to the beginning of the inserted + position in bytes (when >= 0 this is relative to the end of the inserted text, + otherwise it is relative to the beginning of the inserted text). Anchor is + the new anchor position in bytes (when >= 0 this is relative to the end of the + inserted text, otherwise it is relative to the beginning of the inserted text). When there should be no selected text, anchor should be the same as index. @@ -145,7 +145,7 @@ Notify when a key event was sent. Key events should not be used for normal text input operations, which should be done with commit_string, delete_surrounding_text, etc. The key event follows the wl_keyboard key - event convention. Sym is an XKB keysym, state a wl_keyboard key_state. + event convention. Sym is an XKB keysym, state is a wl_keyboard key_state. @@ -212,7 +212,7 @@ position in bytes within the surrounding text relative to the beginning of the text. Anchor is the position in bytes of the selection anchor within the surrounding text relative to the beginning of the text. If - there is no selected text anchor is the same as cursor. + there is no selected text then anchor is the same as cursor. -- 1.9.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel