[ANNOUNCE] libinput now uses GitLab for review

2018-08-09 Thread Peter Hutterer
Basically the same as Daniel's email
https://lists.freedesktop.org/archives/wayland-devel/2018-August/039272.html

I'm switching libinput to gitlab to track everything there instead of
spamming the list with patches. I'll keep an eye on wayland-devel for
libinput patches anyway because it's not much effort, afaict this accounted
for less than 10 patches in 2018 :( 

But to do yourself a favour, submit a MR in gitlab, it's a lot easier to
handle, update, review and discuss. And you get CI.

If you want to keep up-to-date with the code and/or review, I suggest (and
beg you) that you select "Custom notification events" and tick the "New
merge request" option. And maybe the "New issue" option. Those two will keep
you up-to-date and give you the chance to interject where necessary.

This setting is available in the right-most box with the bell symbol,
probably says "Global" when you open it.
https://gitlab.freedesktop.org/libinput/libinput

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


[PATCH libinput] doc/user: expand the Contributing document

2018-08-09 Thread Peter Hutterer
This is mostly taken from the Weston Contributing.md document.

Main changes from there are:
- more detailed step-by-step on how to create a MR
- commit history/messages in two sections
- s/Weston/libinput/

I skipped the Review/Commit Rights sections for now until there's some demand
for it. Same with the Licensing/Stabilising for releases sections.

Cc: Daniel Stone ,
Cc: Pekka Paalanen ,
Cc: Quentin Glidic 
Signed-off-by: Peter Hutterer 
---
 doc/user/contributing.rst | 177 --
 1 file changed, 168 insertions(+), 9 deletions(-)

diff --git a/doc/user/contributing.rst b/doc/user/contributing.rst
index 674275932..de34fb6f7 100644
--- a/doc/user/contributing.rst
+++ b/doc/user/contributing.rst
@@ -5,14 +5,173 @@
 Contributing to libinput
 ==
 
-Contributions to libinput are always welcome. Any patches should be sent to
-the
-`wayland-devel `_
-email list with a subject prefix of ``[PATCH libinput]``. The easiest
-way to achieve that is to run the following command in the libinput
-repository: ::
+Contributions to libinput are always welcome. Please see the steps below for
+details on how to create merge requests, correct git formatting and other
+topics:
 
-   git config --add format.subjectprefix "PATCH libinput"
+.. contents::
+:local:
 
-Likewise, any new features should also be discussed publicly on the
-wayland-devel list.
+Questions regarding this process can be asked on ``#wayland-devel`` on
+freenode or on the `wayland-devel@lists.freedesktop.org
+`_ mailing
+list.
+
+.. note:: The content of this document is largely taken from  `Weston's
+ CONTRIBUTING.md 
`_,
+ many thanks to the authors for their efforts.
+
+--
+Submitting Code
+--
+
+Any patches should be sent via a Merge Request (see the `GitLab docs
+`_)
+in the `libinput GitLab instance hosted by freedesktop.org
+`_.
+
+To submit a merge request, you need to
+
+- `Register an account `_ in
+  the freedesktop.org GitLab instance.
+- `Fork libinput `_
+  into your username's namespace
+- Get libinput's main repository: ::
+
+git clone https://gitlab.freedesktop.org/libinput/libinput.git
+
+- Add the forked git repository to your remotes (replace ``USERNAME``
+  with your username): ::
+
+cd /path/to/libinput.git
+git remote add gitlab g...@gitlab.freedesktop.org:USERNAME/libinput.git
+git fetch gitlab
+
+- Push your changes to your fork: ::
+
+git push gitlab BRANCHNAME
+
+- Submit a merge request. The URL for a merge request is: ::
+
+https://gitlab.freedesktop.org/USERNAME/libinput/merge_requests
+
+  Select your branch name to merge and ``libinput/libinput`` ``master`` as 
target branch.
+
+--
+Commit History
+--
+
+libinput strives to have a
+`linear, 'recipe' style history 
`_
+This means that every commit should be small, digestible, stand-alone, and
+functional. Rather than a purely chronological commit history like this: ::
+
+   doc: final docs for view transforms
+   fix tests when disabled, redo broken doc formatting
+   better transformed-view iteration (thanks Hannah!)
+   try to catch more cases in tests
+   tests: add new spline test
+   fix compilation on splines
+   doc: notes on reticulating splines
+   compositor: add spline reticulation for view transforms
+
+We aim to have a clean history which only reflects the final state, broken up
+into functional groupings: ::
+
+   compositor: add spline reticulation for view transforms
+   compositor: new iterator for view transforms
+   tests: add view-transform correctness tests
+   doc: fix Doxygen formatting for view transforms
+
+This ensures that the final patch series only contains the final state,
+without the changes and missteps taken along the development process.
+
+The first line of a commit message should contain a prefix indicating
+what part is affected by the patch followed by one sentence that
+describes the change. For example: ::
+
+   touchpad: add software button behavior
+   fallback: disable button debouncing on device foo
+
+If in doubt what prefix to use, look at other commits 

Re: [writing a compositor] Compositor freezes when popup menu clicked

2018-08-09 Thread adlo
It seems to particularly refer to this part of the code:

https://github.com/adlocode/test-libweston-desktop/blob/master/shell.c#L179

If I remove the calls to weston_layer_entry_remove() and/or 
weston_layer_entry_insert(), the problem disappears. Of course this means 
windows no longer raise when clicked.

Are there any possible solutions for this problem?

Regards

adlo


> On 27 Jul 2018, at 05:44, adlo  wrote:
> 
> Any ideas?
> 
> The rest of my code can be found at:
> https://github.com/adlocode/test-libweston-desktop
> 
> Regards
> 
> adlo
> 
> 
>> On Tue, 2018-07-17 at 09:21 +0100, adlo wrote:
>> 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