Re: [PATCH wayland-web 2/2] gitlab-ci: Automate wayland's docs publishing

2018-07-17 Thread Peter Hutterer
On Mon, Jul 16, 2018 at 02:08:35PM -0300, Matheus Santana wrote:
> These changes
> 
> 1. remove the `docs/` dir, which won't be necessary anymore as we'll
>build them from wayland's repo
> 2. build wayland in CI pipeline, providing docs as an artifact which is
>later published to GitLab pages
> 
> Also see https://gitlab.freedesktop.org/wayland/wayland/issues/48
> 
> Signed-off-by: Matheus Santana 
> ---
>  .gitlab-ci.yml |   31 +
>  docs/html/Wayland.proc |0
>  docs/html/apa.html | 2051 
> 
>  docs/html/apb.html |  624 -
>  docs/html/apc.html |  674 -
>  docs/html/ch01.html|   73 -
>  docs/html/ch02.html|   77 --
>  docs/html/ch03.html|  237 
>  docs/html/ch04.html|  381 --
>  docs/html/ch05.html|  120 --
>  docs/html/css/brand.css|   14 -
>  docs/html/css/common.css   | 1769 
>  docs/html/css/default.css  |3 -
>  docs/html/css/epub.css |  115 --
>  docs/html/css/print.css|   15 -
>  docs/html/images/icon.svg  |   19 -
>  docs/html/images/wayland-architecture.png  |  Bin 28435 -> 0 bytes
>  docs/html/images/wayland.png   |  Bin 5649 -> 0 bytes
>  docs/html/images/x-architecture.png|  Bin 32329 -> 0 bytes
>  docs/html/images/xwayland-architecture.png |  Bin 7611 -> 0 bytes
>  docs/html/index.html   |   89 --
>  docs/html/pr01.html|   15 -
>  docs/html/pr02.html|8 -
>  23 files changed, 31 insertions(+), 6284 deletions(-)
>  delete mode 100644 docs/html/Wayland.proc
>  delete mode 100644 docs/html/apa.html
>  delete mode 100644 docs/html/apb.html
>  delete mode 100644 docs/html/apc.html
>  delete mode 100644 docs/html/ch01.html
>  delete mode 100644 docs/html/ch02.html
>  delete mode 100644 docs/html/ch03.html
>  delete mode 100644 docs/html/ch04.html
>  delete mode 100644 docs/html/ch05.html
>  delete mode 100644 docs/html/css/brand.css
>  delete mode 100644 docs/html/css/common.css
>  delete mode 100644 docs/html/css/default.css
>  delete mode 100644 docs/html/css/epub.css
>  delete mode 100644 docs/html/css/print.css
>  delete mode 100644 docs/html/images/icon.svg
>  delete mode 100644 docs/html/images/wayland-architecture.png
>  delete mode 100644 docs/html/images/wayland.png
>  delete mode 100644 docs/html/images/x-architecture.png
>  delete mode 100644 docs/html/images/xwayland-architecture.png
>  delete mode 100644 docs/html/index.html
>  delete mode 100644 docs/html/pr01.html
>  delete mode 100644 docs/html/pr02.html
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 0e69f62..3d33881 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -24,6 +24,37 @@ libinput:
>  # libinput's .gitlab-ci.yml has the list of ARCH_PKGS, copied from there
>  ARCH_PKGS:   'git gcc pkgconfig  meson check   
> libsystemdlibevdev   doxygen graphviz valgrind binutils libwacom  
>gtk3mtdev  '
>  
> +wayland:
> +  image: debian:stretch
> +  stage: build
> +  before_script:
> +  - echo 'path-exclude=/usr/share/doc/*' > 
> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
> +  - echo 'path-exclude=/usr/share/man/*' >> 
> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
> +  - echo '#!/bin/sh' > /usr/sbin/policy-rc.d
> +  - echo 'exit 101' >> /usr/sbin/policy-rc.d
> +  - chmod +x /usr/sbin/policy-rc.d
> +  - apt-get update
> +  - apt-get -y --no-install-recommends install build-essential automake 
> autoconf libtool pkg-config libexpat1-dev libffi-dev libxml2-dev doxygen 
> graphviz xmlto xsltproc docbook-xsl git ca-certificates

fwiw, the reason we use arch for the libinput build is because it's updated
frequently and (from non-scientific observation) fastest to install the
various packages. It wouldn't require all the other steps either, afaict.

> +  script:
> +  - git clone https://gitlab.freedesktop.org/embs/wayland.git wayland.git

this needs to use the right URL

> +  - pushd wayland.git
> +  - export BUILD_ID="wayland-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
> +  - export PREFIX="$(pwd)/prefix-$BUILD_ID"
> +  - export BUILDDIR="$(pwd)/build-$BUILD_ID"
> +  - export MAKEFLAGS="-j4"
> +  - mkdir "$BUILDDIR" "$PREFIX"
> +  - cd "$BUILDDIR"

you're using pushd above but cd here? either is fine but mixing them seems
odd.

> +  - ../autogen.sh --prefix="$PREFIX" --with-icondir=/usr/share/X11/icons
> +  - make all
> +  - make check
> +  - make install
> +  - make distcheck

I think you can drop check/distcheck here and rely on the wayland repo
proper to not merge anything unless distcheck passes.

That aside, this whole thing looks 

Re: [PATCH wayland 1/2] gitlab-ci: Trigger site's project pipeline

2018-07-17 Thread Peter Hutterer
On Mon, Jul 16, 2018 at 02:08:34PM -0300, Matheus Santana wrote:
> For automatically building and publishing docs.
> 
> It'll be necessary to
> 
> 1. create a pipeline trigger for the [site's project][trigger]
> 2. create a variable within [wayland's CI][envar] whose key is
>WAYLAND_FREEDESKTOP_ORG_PIPELINE_TRIGGER_TOKEN and value is the token
>created in previous step
> 
> Also see https://gitlab.freedesktop.org/wayland/wayland/issues/48
> 
> Signed-off-by: Matheus Santana 
> 
> [trigger]: 
> https://gitlab.freedesktop.org/wayland/wayland.freedesktop.org/settings/ci_cd
> [envar]: https://gitlab.freedesktop.org/wayland/wayland/settings/ci_cd
> ---
>  .gitlab-ci.yml | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 2489665..c6840e6 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -2,6 +2,7 @@ image: debian:stretch
>  
>  stages:
>- build
> +  - deploy
>  
>  before_script:
>- echo 'path-exclude=/usr/share/doc/*' > 
> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
> @@ -10,7 +11,7 @@ before_script:
>- echo 'exit 101' >> /usr/sbin/policy-rc.d
>- chmod +x /usr/sbin/policy-rc.d
>- apt-get update
> -  - apt-get -y --no-install-recommends install build-essential automake 
> autoconf libtool pkg-config libexpat1-dev libffi-dev libxml2-dev doxygen 
> graphviz xmlto xsltproc docbook-xsl
> +  - apt-get -y --no-install-recommends install build-essential automake 
> autoconf libtool pkg-config libexpat1-dev libffi-dev libxml2-dev doxygen 
> graphviz xmlto xsltproc docbook-xsl curl ca-certificates
>  
>  build-native:
>stage: build
> @@ -34,3 +35,10 @@ build-native:
>  - build-*/wayland*/_build/sub/*.log
>  - build-*/*.log
>  - prefix-*
> +
> +publish-docs:
> +  stage: deploy
> +  script:
> +  - curl -X POST -F token=$WAYLAND_FREEDESKTOP_ORG_PIPELINE_TRIGGER_TOKEN -F 
> ref=master https://gitlab.freedesktop.org/api/v4/projects/136/trigger/pipeline

fwiw, check out the libinput .gitlab-ci.yml for how to use the project name
here instead of the number. Either will work though. You can also use 
  image: registry.freedesktop.org/libinput/libinput/jq:latest
that way you can skip the before_script stage and speed up everything
significantly

> +  only:
> +  - master

I'd prefer the more explicit:
only:
  refs:
  - master

but afaict yours will work just fine. However, 
you probably want this here:

   only:
   variables:
  - $CI_PROJECT_PATH == "wayland/wayland"

otherwise your're trying to run the job on any push to wayland master in any
personal project. They won't have the token set and thus not do anything but
waste time.

also add a single line
  dependencies:

to indicate you don't care about any dependencies from previous steps

Cheers,
   Peter
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCHv4 wayland-protocols] text-input: Add v3 of the text-input protocol

2018-07-17 Thread Carlos Garnacho
Hi!,

(Way way late, trying to revive the conversation...)

On Thu, May 3, 2018 at 9:22 PM, Dorota Czaplejewicz
 wrote:
> On Thu, 3 May 2018 20:47:27 +0200
> Silvan Jegen  wrote:
>
>> Hi Dorota
>>
>> Some comments and typo fixes below.
>>
>> On Thu, May 03, 2018 at 05:41:21PM +0200, Dorota Czaplejewicz wrote:
>> > This new protocol description is a simplification over v2.
>> >
>> > - All pre-edit text styling is gone.
>> > - Pre-edit cursor can span characters.
>> > - No events regarding input panel (OSK) state nor covered rectangle.
>> >   Compositors are still free to handle situations where the keyboard
>> >   focus rectangle is covered by the input panel.
>> > - No set_preferred_language request for clients.
>> > - There is no event to send keysyms. Compositors can use wl_keyboard
>> >   interface instead.
>> > - All state is double-buffered, with specified state.
>> > - Use Unicode codepoints to measure strings.
>> >
>> > Signed-off-by: Dorota Czaplejewicz 
>> > Signed-off-by: Carlos Garnacho 
>> > ---
>> > This is the next update coming from Purism to perfect the text input 
>> > protocol.
>> >
>> > The following changes added on top of PATCHv3:
>> >
>> > - Fixed whitespaces.
>> > - Removed enable flags - the same information can be gathered from the 
>> > first requests after enter.
>> > - Changed offsets inside UTF-8 strings to use Unicode character counts in 
>> > order to remove the possibility of communicating invalid state.
>> > - Specified the exact lifetime of double-buffered state, and initial 
>> > values.
>> > - Made changes requested by the IM double-buffered.
>> >
>> > Some questions remain open. One is: how to specify how much text to 
>> > capture in set_surrounding_text, and how often to update?

IMHO the only reason to state it here is that it's more likely that a
lazy implementation will try to squeeze a full book here, than eg. an
application setting an insanely long title. But certainly other
messages across protocols may hit this limit (the long title issue
wasn't made up :).

As for how much, I think it ultimately depends on the IM behind. Text
correction probably just wants the current word, any sort of
prediction will probably require phrases to paragraphs, char
composition can probably do without. Sounds like this could be some
sort of hint, but I don't think IMs can tell you today how much text
do they want...

>> >
>> > A possible change that I decided against for now is to replace 
>> > enable/disable events by create/destroy of a new object, which would make 
>> > more state lifetimes encoded in the protocol.
>> >
>> > After reading a blog post on fcitx [0], I got the impression that letting 
>> > the compositor know some persistent ID of a text edit instance could be 
>> > useful, however I'm not sure what the use cases are.
>> >
>> > As always, I'm happy to hear feedback.
>> >
>> > Cheers,
>> > Dorota Czaplejewicz
>> >
>> > [0] 
>> > https://www.csslayer.info/wordpress/fcitx-dev/gaps-between-wayland-and-fcitx-or-all-input-methods/
>> >
>> >  Makefile.am|   1 +
>> >  unstable/text-input/text-input-unstable-v3.xml | 362 
>> > +
>> >  2 files changed, 363 insertions(+)
>> >  create mode 100644 unstable/text-input/text-input-unstable-v3.xml
>> >
>> > diff --git a/Makefile.am b/Makefile.am
>> > index 4b9a901..86d7ca9 100644
>> > --- a/Makefile.am
>> > +++ b/Makefile.am
>> > @@ -3,6 +3,7 @@ unstable_protocols =   
>> >  \
>> > unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml 
>> >  \
>> > unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml 
>> >  \
>> > unstable/text-input/text-input-unstable-v1.xml 
>> >  \
>> > +   unstable/text-input/text-input-unstable-v3.xml 
>> >  \
>> > unstable/input-method/input-method-unstable-v1.xml 
>> >  \
>> > unstable/xdg-shell/xdg-shell-unstable-v5.xml   
>> >  \
>> > unstable/xdg-shell/xdg-shell-unstable-v6.xml   
>> >  \
>> > diff --git a/unstable/text-input/text-input-unstable-v3.xml 
>> > b/unstable/text-input/text-input-unstable-v3.xml
>> > new file mode 100644
>> > index 000..ed5204f
>> > --- /dev/null
>> > +++ b/unstable/text-input/text-input-unstable-v3.xml
>> > @@ -0,0 +1,362 @@
>> > +
>> > +
>> > +
>> > +  
>> > +Copyright © 2012, 2013 Intel Corporation
>> > +Copyright © 2015, 2016 Jan Arne Petersen
>> > +Copyright © 2017, 2018 Red Hat, Inc.
>> > +Copyright © 2018 Purism SPC
>> > +
>> > +Permission to use, copy, modify, distribute, and sell this
>> > +software and its documentation for any purpose is hereby granted
>> > +without fee, provided that the above copyright notice appear in
>> > +all copies and that both that copyright notice and this permission
>> > +notice appear in supporting 

[writing a compositor] Compositor freezes when popup menu clicked

2018-07-17 Thread adlo
I am writing a compositor using libweston. I am attempting to implement raising 
windows on click. It mostly works, but it has introduced a regression where the 
compositor freezes when I click on a popup menu, such as those in gedit.

Here is my code:

static void click_to_activate_binding (struct weston_pointer *pointer,
   const struct timespec *time,
   uint32_t   button,
   void  *data)
{
  struct TestServer *server = data;
  struct TestServerSurface *shsurf;
  struct weston_seat *s;
  struct weston_surface *main_surface;

  main_surface = weston_surface_get_main_surface (pointer->focus->surface);
  shsurf = weston_desktop_surface_get_user_data 
(weston_surface_get_desktop_surface
(main_surface));
  struct weston_surface *surface = weston_desktop_surface_get_surface 
(shsurf->desktop_surface);

  wl_list_for_each (s, >compositor->seat_list, link)
{
  weston_view_activate (pointer->focus, s,
WESTON_ACTIVATE_FLAG_CLICKED |
WESTON_ACTIVATE_FLAG_CONFIGURE);
  weston_seat_set_keyboard_focus (s, pointer->focus->surface);
  weston_view_geometry_dirty (shsurf->view);
  weston_layer_entry_remove (>focus->layer_link);
  weston_layer_entry_insert (>surfaces_layer.view_list, 
>focus->layer_link);
  weston_view_geometry_dirty (shsurf->view);
  weston_surface_damage (main_surface);
  weston_desktop_surface_propagate_layer (shsurf->desktop_surface);
}

}

How can I resolve this?

Regards

adlo
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel