[PATCH libinput] tools: rename list-quirks to the more generic "quirks list"

2018-06-26 Thread Peter Hutterer
Enables us to easily add more tools where needed and it is
more consistent with the existing tools.

The commands are now:
   libinput quirks list
   libinput quirks validate

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/66

Signed-off-by: Peter Hutterer 
---
 doc/device-quirks.dox | 14 ---
 meson.build   | 41 ---
 tools/libinput-list-quirks.man| 36 
 tools/libinput-measure-touch-size |  6 +--
 tools/libinput-measure-touchpad-pressure  |  4 +-
 ...binput-list-quirks.c => libinput-quirks.c} | 29 +
 tools/libinput-quirks.man | 41 +++
 7 files changed, 102 insertions(+), 69 deletions(-)
 delete mode 100644 tools/libinput-list-quirks.man
 rename tools/{libinput-list-quirks.c => libinput-quirks.c} (90%)
 create mode 100644 tools/libinput-quirks.man

diff --git a/doc/device-quirks.dox b/doc/device-quirks.dox
index 35e78215..d4368664 100644
--- a/doc/device-quirks.dox
+++ b/doc/device-quirks.dox
@@ -54,21 +54,23 @@ Once the required section has been added, use the 
information from section
 
 @section device-quirks-debugging Debugging device quirks
 
-libinput provides the `libinput list-quirks` tool to list and debug model
-quirks that apply to one or more local devices.
+libinput provides the `libinput quirks` tool to debug the quirks database.
+This tool takes an action as first argument, the most common invocation is
+`libinput quirks list` to list model quirks that apply to one or more local
+devices.
 
 @verbatim
-$ libinput list-quirks /dev/input/event19
+$ libinput quirks list /dev/input/event19
 Device has no quirks defined
-$ libinput list-quirks /dev/input/event0
+$ libinput quirks list /dev/input/event0
 AttrLidSwitchReliability
 @endverbatim
 
-When called with the `--verbose` argument, `libinput list-quirks` prints
+When called with the `--verbose` argument, `libinput quirks list` prints
 information about all files and its attempts to match the device:
 
 @verbatim
-$ libinput list-quirks --verbose /dev/input/event0
+$ libinput quirks list --verbose /dev/input/event0
 quirks debug: /usr/share/share/libinput is data root
 quirks debug: /usr/share/share/libinput/10-generic-keyboard.quirks
 quirks debug: /usr/share/share/libinput/10-generic-lid.quirks
diff --git a/meson.build b/meson.build
index d01c4af9..58e909b6 100644
--- a/meson.build
+++ b/meson.build
@@ -471,21 +471,34 @@ configure_file(input : 'tools/libinput-debug-events.man',
   install_dir : join_paths(get_option('mandir'), 'man1')
   )
 
-libinput_list_quirks_sources = [ 'tools/libinput-list-quirks.c' ]
-libinput_list_quirks = executable('libinput-list-quirks',
- libinput_list_quirks_sources,
- dependencies : [dep_libquirks, 
dep_tools_shared, dep_libinput],
- include_directories : [includes_src, 
includes_include],
- install_dir : libinput_tool_path,
- install : true
-)
+libinput_quirks_sources = [ 'tools/libinput-quirks.c' ]
+libinput_quirks = executable('libinput-quirks',
+libinput_quirks_sources,
+dependencies : [dep_libquirks, dep_tools_shared, 
dep_libinput],
+include_directories : [includes_src, 
includes_include],
+install_dir : libinput_tool_path,
+install : true
+   )
 test('validate-quirks',
- libinput_list_quirks,
- args: ['--validate-only', 
'--data-dir=@0@'.format(join_paths(meson.source_root(), 'data'))]
+ libinput_quirks,
+ args: ['validate', 
'--data-dir=@0@'.format(join_paths(meson.source_root(), 'data'))]
  )
 
-configure_file(input : 'tools/libinput-list-quirks.man',
-  output : 'libinput-list-quirks.1',
+configure_file(input : 'tools/libinput-quirks.man',
+  output : 'libinput-quirks.1',
+  configuration : man_config,
+  install : true,
+  install_dir : join_paths(get_option('mandir'), 'man1')
+  )
+# Same man page for the subtools to stay consistent with the other tools
+configure_file(input : 'tools/libinput-quirks.man',
+  output : 'libinput-quirks-list.1',
+  configuration : man_config,
+  install : true,
+  install_dir : join_paths(get_option('mandir'), 'man1')
+  )
+configure_file(input : 'tools/libinput-quirks.man',
+  output : 'libinput-quirks-validate.1',
   configuration : man_config,
   install : true,
   install_dir : join_paths(get_option('mandir'), 'man1')
@@ -544,7 +557,7 @@ configure_file(input : 
'tools/libinput-measure-touchpad-tap.man',
 

[PATCH v7 4/6] compositor-fbdev: set fb device info upon the first run.

2018-06-26 Thread nerdopolis
This attempts to wake up secondary framebuffer devices
(/dev/fb1 and up) as usually these devices start powered off, and
the FBIOPUT_VSCREENINFO ioctl turns it on. This was tested on a
qemu system with the options:

-vga none -device VGA,id=video0 -device secondary-vga,id=video1 \
-device secondary-vga,id=video2
---
 libweston/compositor-fbdev.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index 09a2eb39..e3777495 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -384,6 +384,13 @@ fbdev_frame_buffer_open(const char *fb_dev,
return -1;
}
 
+   /* Attempt to correct the framebuffer settings */
+   if (fbdev_set_screen_info(fd, screen_info) < 0) {
+   weston_log("Failed to set mode settings. "
+  "Attempting to open output anyway.\n");
+   }
+
+
return fd;
 }
 
-- 
2.17.1

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


[PATCH v7 2/6] compositor-fbdev: support the --seat option, (and XDG_SEAT variable)

2018-06-26 Thread nerdopolis
This allows the fbdev backend to run on, and use devices from the
specified seat, similar to the drm backend.
---
 compositor/main.c|  2 ++
 libweston/compositor-fbdev.c | 10 +-
 libweston/compositor-fbdev.h |  9 +
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/compositor/main.c b/compositor/main.c
index 7bfe0a33..068cdd8f 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -494,6 +494,7 @@ usage(int error_code)
"Options for fbdev-backend.so:\n\n"
"  --tty=TTY\t\tThe tty to use\n"
"  --device=DEVICE\tThe framebuffer device to use\n"
+   "  --seat=SEAT\t\tThe seat that weston should run on, instead 
of the seat defined in XDG_SEAT\n"
"\n");
 #endif
 
@@ -1593,6 +1594,7 @@ load_fbdev_backend(struct weston_compositor *c,
const struct weston_option fbdev_options[] = {
{ WESTON_OPTION_INTEGER, "tty", 0,  },
{ WESTON_OPTION_STRING, "device", 0,  },
+   { WESTON_OPTION_STRING, "seat", 0, _id },
};
 
parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv);
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index a78f6fab..09a2eb39 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -776,6 +776,13 @@ fbdev_backend_create(struct weston_compositor *compositor,
 {
struct fbdev_backend *backend;
const char *seat_id = default_seat;
+   const char *session_seat;
+
+   session_seat = getenv("XDG_SEAT");
+   if (session_seat)
+   seat_id = session_seat;
+   if (param->seat_id)
+   seat_id = param->seat_id;
 
weston_log("initializing fbdev backend\n");
 
@@ -800,7 +807,7 @@ fbdev_backend_create(struct weston_compositor *compositor,
wl_signal_add(>session_signal,
  >session_listener);
compositor->launcher =
-   weston_launcher_connect(compositor, param->tty, "seat0", false);
+   weston_launcher_connect(compositor, param->tty, seat_id, false);
if (!compositor->launcher) {
weston_log("fatal: fbdev backend should be run using "
   "weston-launch binary, or your system should "
@@ -846,6 +853,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config 
*config)
 * udev, rather than passing a device node in as a parameter. */
config->tty = 0; /* default to current tty */
config->device = "/dev/fb0"; /* default frame buffer */
+   config->seat_id = NULL;
 }
 
 WL_EXPORT int
diff --git a/libweston/compositor-fbdev.h b/libweston/compositor-fbdev.h
index 8b7d900e..540120a4 100644
--- a/libweston/compositor-fbdev.h
+++ b/libweston/compositor-fbdev.h
@@ -52,6 +52,15 @@ struct weston_fbdev_backend_config {
 */
void (*configure_device)(struct weston_compositor *compositor,
 struct libinput_device *device);
+
+   /** The seat to be used for input and output.
+*
+* Set first by the XDG_SEAT variable, and overridable by the --seat 
option.
+* If none are specified, the default "seat0" is assumed. The backend 
will
+* take ownership of the seat_id pointer and will free it on
+* backend destruction.
+*/
+   char *seat_id;
 };
 
 #ifdef  __cplusplus
-- 
2.17.1

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


[PATCH v7 5/6] compositor-fbdev: detect the first fb device in the seat

2018-06-26 Thread nerdopolis
This adds a function to detect the first framebuffer device in the
current seat. Instead of hardcoding /dev/fb0, detect the device
with udev, favoring the boot_vga device, and falling back to the
first framebuffer device in the seat if there is none. This is very
similar to what compositor-drm does to find display devices
---
 libweston/compositor-fbdev.c | 83 ++--
 1 file changed, 80 insertions(+), 3 deletions(-)

diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index e3777495..616300dc 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -777,6 +777,77 @@ session_notify(struct wl_listener *listener, void *data)
}
 }
 
+static char *
+find_framebuffer_device(struct fbdev_backend *b, const char *seat)
+{
+   struct udev_enumerate *e;
+   struct udev_list_entry *entry;
+   const char *path, *device_seat, *id, *fb_device_path;
+   struct udev_device *device, *fb_device, *pci;
+
+   e = udev_enumerate_new(b->udev);
+   udev_enumerate_add_match_subsystem(e, "graphics");
+   udev_enumerate_add_match_sysname(e, "fb[0-9]*");
+
+   udev_enumerate_scan_devices(e);
+   fb_device = NULL;
+   udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) {
+   bool is_boot_vga = false;
+
+   path = udev_list_entry_get_name(entry);
+   device = udev_device_new_from_syspath(b->udev, path);
+   if (!device)
+   continue;
+   device_seat = udev_device_get_property_value(device, "ID_SEAT");
+   if (!device_seat)
+   device_seat = default_seat;
+   if (strcmp(device_seat, seat)) {
+   udev_device_unref(device);
+   continue;
+   }
+
+   pci = udev_device_get_parent_with_subsystem_devtype(device,
+   "pci", NULL);
+   if (pci) {
+   id = udev_device_get_sysattr_value(pci, "boot_vga");
+   if (id && !strcmp(id, "1"))
+   is_boot_vga = true;
+   }
+
+   /* If a framebuffer device was found, and this device isn't
+* the boot-VGA device, don't use it. */
+   if (!is_boot_vga && fb_device) {
+   udev_device_unref(device);
+   continue;
+   }
+
+   /* There can only be one boot_vga device. Try to use it
+* at all costs. */
+   if (is_boot_vga) {
+   if (fb_device)
+   udev_device_unref(fb_device);
+   fb_device = device;
+   break;
+   }
+
+   /* Per the (!is_boot_vga && fb_device) test above, only
+* trump existing saved devices with boot-VGA devices, so if
+* the test ends up here, this must be the first device seen. */
+   assert(!fb_device);
+   fb_device = device;
+   }
+
+   udev_enumerate_unref(e);
+
+   if (fb_device)
+   {
+   fb_device_path=strdup(udev_device_get_devnode(fb_device));
+   udev_device_unref(fb_device);
+   }
+
+   return fb_device_path;
+}
+
 static struct fbdev_backend *
 fbdev_backend_create(struct weston_compositor *compositor,
  struct weston_fbdev_backend_config *param)
@@ -809,6 +880,11 @@ fbdev_backend_create(struct weston_compositor *compositor,
goto out_compositor;
}
 
+   if (!param->device)
+   param->device = find_framebuffer_device(backend, seat_id);
+   if (!param->device)
+   param->device = strdup("/dev/fb0");
+
/* Set up the TTY. */
backend->session_listener.notify = session_notify;
wl_signal_add(>session_signal,
@@ -835,12 +911,15 @@ fbdev_backend_create(struct weston_compositor *compositor,
if (!fbdev_head_create(backend, param->device))
goto out_launcher;
 
+   free(param->device);
+
udev_input_init(>input, compositor, backend->udev,
seat_id, param->configure_device);
 
return backend;
 
 out_launcher:
+   free(param->device);
weston_launcher_destroy(compositor->launcher);
 
 out_udev:
@@ -856,10 +935,8 @@ out_compositor:
 static void
 config_init_to_defaults(struct weston_fbdev_backend_config *config)
 {
-   /* TODO: Ideally, available frame buffers should be enumerated using
-* udev, rather than passing a device node in as a parameter. */
config->tty = 0; /* default to current tty */
-   config->device = "/dev/fb0"; /* default frame buffer */
+   config->device = NULL;
config->seat_id = NULL;
 }
 
-- 
2.17.1

___

[PATCH v7 1/6] libweston: set the seat automatically based on the XDG_SEAT environment variable

2018-06-26 Thread nerdopolis
This will allow the seat to be set by the environment as pam_systemd typically
sets the XDG_SEAT variable
---
 compositor/main.c  |  2 +-
 libweston/compositor-drm.c | 11 ---
 libweston/compositor-drm.h |  3 ++-
 man/weston-drm.man |  7 +--
 4 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/compositor/main.c b/compositor/main.c
index 2cb50c19..7bfe0a33 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -482,7 +482,7 @@ usage(int error_code)
 #if defined(BUILD_DRM_COMPOSITOR)
fprintf(out,
"Options for drm-backend.so:\n\n"
-   "  --seat=SEAT\t\tThe seat that weston should run on\n"
+   "  --seat=SEAT\t\tThe seat that weston should run on, instead 
of the seat defined in XDG_SEAT\n"
"  --tty=TTY\t\tThe tty to use\n"
"  --drm-device=CARD\tThe DRM device to use, e.g. \"card0\".\n"
"  --use-pixman\t\tUse the pixman (CPU) renderer\n"
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 8b1ea66d..4a352132 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -6029,8 +6029,16 @@ drm_backend_create(struct weston_compositor *compositor,
struct udev_device *drm_device;
struct wl_event_loop *loop;
const char *seat_id = default_seat;
+   const char *session_seat;
int ret;
 
+   session_seat = getenv("XDG_SEAT");
+   if (session_seat)
+   seat_id = session_seat;
+
+   if (config->seat_id)
+   seat_id = config->seat_id;
+
weston_log("initializing drm backend\n");
 
b = zalloc(sizeof *b);
@@ -6062,9 +6070,6 @@ drm_backend_create(struct weston_compositor *compositor,
if (parse_gbm_format(config->gbm_format, GBM_FORMAT_XRGB, 
>gbm_format) < 0)
goto err_compositor;
 
-   if (config->seat_id)
-   seat_id = config->seat_id;
-
/* Check if we run drm-backend using weston-launch */
compositor->launcher = weston_launcher_connect(compositor, config->tty,
   seat_id, true);
diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h
index 5393..edf4b8e6 100644
--- a/libweston/compositor-drm.h
+++ b/libweston/compositor-drm.h
@@ -106,7 +106,8 @@ struct weston_drm_backend_config {
 
/** The seat to be used for input and output.
 *
-* If NULL the default "seat0" will be used.  The backend will
+* Set first by the XDG_SEAT variable, and overridable by the --seat 
option.
+* If none are specified, the default "seat0" is assumed. The backend 
will
 * take ownership of the seat_id pointer and will free it on
 * backend destruction.
 */
diff --git a/man/weston-drm.man b/man/weston-drm.man
index d4cb75a7..7ebfadf7 100644
--- a/man/weston-drm.man
+++ b/man/weston-drm.man
@@ -105,8 +105,8 @@ status. For example, use
 \fB\-\-seat\fR=\fIseatid\fR
 Use graphics and input devices designated for seat
 .I seatid
-instead of the default seat
-.BR seat0 .
+instead of the seat defined in the environment variable
+. BR XDG_SEAT ". If neither is specifed, seat0 will be assumed."
 .TP
 \fB\-\-tty\fR=\fIx\fR
 Launch Weston on tty
@@ -133,6 +133,9 @@ The file descriptor (integer) where
 .B weston-launch
 is listening. Automatically set by
 .BR weston-launch .
+.TP
+.B XDG_SEAT
+The seat Weston will start on, unless overridden on the command line.
 .
 .\" ***
 .SH "SEE ALSO"
-- 
2.17.1

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


[PATCH v7 6/6] main: don't configure /dev/fb0 by default

2018-06-26 Thread nerdopolis
The framebuffer backend now detects the framebuffer device
dynamically. Don't assume that the framebuffer device is /dev/fb0
---
 compositor/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/compositor/main.c b/compositor/main.c
index 068cdd8f..f1ee02b4 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -1599,9 +1599,6 @@ load_fbdev_backend(struct weston_compositor *c,
 
parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv);
 
-   if (!config.device)
-   config.device = strdup("/dev/fb0");
-
config.base.struct_version = WESTON_FBDEV_BACKEND_CONFIG_VERSION;
config.base.struct_size = sizeof(struct weston_fbdev_backend_config);
config.configure_device = configure_input_device;
-- 
2.17.1

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


[PATCH v7 3/6] launcher-logind: only get a VT on seat0, as only seat0 supports VTs

2018-06-26 Thread nerdopolis
As only seat0 supports TTYs, this changes the logind launcher where
it detects a TTY, only if the seat is seat0. This has only been
tested for logind
---
 libweston/launcher-logind.c | 22 --
 libweston/launcher-util.c   |  4 
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/libweston/launcher-logind.c b/libweston/launcher-logind.c
index d0559c8f..36a4e642 100644
--- a/libweston/launcher-logind.c
+++ b/libweston/launcher-logind.c
@@ -762,18 +762,20 @@ launcher_logind_connect(struct weston_launcher **out, 
struct weston_compositor *
free(t);
goto err_session;
}
-   free(t);
 
-   r = weston_sd_session_get_vt(wl->sid, >vtnr);
-   if (r < 0) {
-   weston_log("logind: session not running on a VT\n");
-   goto err_session;
-   } else if (tty > 0 && wl->vtnr != (unsigned int )tty) {
-   weston_log("logind: requested VT --tty=%d differs from real 
session VT %u\n",
-  tty, wl->vtnr);
-   r = -EINVAL;
-   goto err_session;
+   if (!strcmp(t, "seat0")) {
+   r = weston_sd_session_get_vt(wl->sid, >vtnr);
+   if (r < 0) {
+   weston_log("logind: session not running on a VT\n");
+   goto err_session;
+   } else if (tty > 0 && wl->vtnr != (unsigned int )tty) {
+   weston_log("logind: requested VT --tty=%d differs from 
real session VT %u\n",
+  tty, wl->vtnr);
+   r = -EINVAL;
+   goto err_session;
+   }
}
+   free(t);
 
loop = wl_display_get_event_loop(compositor->wl_display);
r = weston_dbus_open(loop, DBUS_BUS_SYSTEM, >dbus, >dbus_ctx);
diff --git a/libweston/launcher-util.c b/libweston/launcher-util.c
index 03f3219b..41ac7950 100644
--- a/libweston/launcher-util.c
+++ b/libweston/launcher-util.c
@@ -104,6 +104,10 @@ WL_EXPORT void
 weston_setup_vt_switch_bindings(struct weston_compositor *compositor)
 {
uint32_t key;
+   struct weston_launcher *launcher = compositor->launcher;
+
+   if (launcher->iface->get_vt(launcher) <= 0)
+   return;
 
if (compositor->vt_switching == false)
return;
-- 
2.17.1

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


[PATCH v7 0/6] Make Weston multiseat aware

2018-06-26 Thread nerdopolis
These patches make Weston handle multiple seats. Fixes from the last 
attempt include updating fbdev_set_screen_info , updating some fuzz,
and making the selection of the framebuffer device similar to 
compositor-drm.c by favoring the boot_vga device, and making
requested changes


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


Re: [PATCH 0/5] Implement support for drm properties "GAMMA_LUT" and "CTM"

2018-06-26 Thread Emil Velikov
On 26 June 2018 at 17:47, Matheus Santana  wrote:
>
>
> On Tue, Jun 26, 2018 at 11:51 AM, Emil Velikov 
> wrote:
>>
>> On 25 June 2018 at 19:48, Matheus Santana  wrote:
>> > Hi Harsha,
>> >
>> >> Weston needs to be rebuilt. But, no new library versions dependencies.
>> >
>> >
>> > All right.
>> >
>> > On Mon, Jun 25, 2018 at 10:21 AM, Harsha Manjula Mallikarjun (RBEI/ECF3)
>> >  wrote:
>> >>
>> >> Hi Matheus,
>> >>
>> >> >From: Matheus Santana [mailto:e...@cin.ufpe.br]
>> >> >Sent: Friday, June 22, 2018 8:33 PM
>> >> >To: Harsha Manjula Mallikarjun (RBEI/ECF3)
>> >> > 
>> >> >Cc: wayland-devel@lists.freedesktop.org
>> >> >Subject: Re: [PATCH 0/5] Implement support for drm properties
>> >> > "GAMMA_LUT"
>> >> > and "CTM"
>> >> >
>> >> >Hi Harsha,
>> >> >I am unable to run the tests you introduced. Tests execution gets
>> >> > stuck
>> >> > after reporting success for surface-global-test.
>> >>
>> >> Surface-global-test terminates the compositor. May be this is the
>> >> reason.
>> >> I do not see a stuck test rather a terminated compositor.
>> >>
>> >> For testing I modified Weston.ini as follows:
>> >> modules=ivi-controller.so,
>> >> surface-global-test.so,gamma-test.so,ctm-test.so
>> >>
>> >> Are you running tests in an another way?
>> >
>> >
>> > I'm running them by just issuing `make check` after building weston. I
>> > basically execute three commands (within weston's root dir):
>> >
>> > $ ./autogen.sh --prefix=$WLD
>> > $ make
>> > $ make check
>> >
>> > The output for `autogen.sh` (which is the same regardless patches
>> > application) is attached.
>> > All tests in suite run fine (24 passed, 1 skipped) when running these
>> > commands without the paches.
>> >
>> > I'm applying the patches by downloading the mbox and `git am
>> > patches.mbox`.
>> >
>> > Are you able to run all tests in suite by just `make check` after
>> > building
>> > the project?
>> >
>> Matheus your assumption is correct. make check should pass, without
>> any local changes.
>>
>> Quick look points the following:
>>  - the drm (compositor-drm) backend supports the new functionality
>>  - the default backend (see tests/weston-tests-env) is headless
>> (compositor-headless)
>
>
> So we shouldn't run drm-specific tests with `make check`, maybe?
>
Personally I would try some of the following:
 a) see if a test specific ini file (see [0] and draw inspiration from
existing ini files) won't help
 b) enhance the testing infra to allow selecting the backend

Then again, might be better to see what more experienced developers prefer.

>>
>>  - xwayland is used - not sure if the xwayland codebase (which lives
>> in the Xserver repo) needs updates
>
>
> Would you please point out what does indicate that xwayland is in use?
>
This line [1] says "all tests with .la extension, will be run via
weston-tests-env". While this hunk [2] does the execution and you can
--xwayland in there.

HTH
Emil

[0] 
https://gitlab.freedesktop.org/wayland/weston/blob/78a42116ae92f93a01539a785ce95cc478189608/tests/weston-tests-env#L41
[1] 
https://gitlab.freedesktop.org/wayland/weston/blob/78a42116ae92f93a01539a785ce95cc478189608/Makefile.am#L1264
[2] 
https://gitlab.freedesktop.org/wayland/weston/blob/78a42116ae92f93a01539a785ce95cc478189608/tests/weston-tests-env#L67
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston] parse_modeline: Ignore case of {h,v}sync flags

2018-06-26 Thread Guido Günther
Some modeline generators put out e.g. +HSync instead of +hsync. Accept
that too since it's not ambigous.

Signed-off-by: Guido Günther 
---
 libweston/compositor-drm.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 8b1ea66d..1c9b7134 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -4341,16 +4341,16 @@ parse_modeline(const char *s, drmModeModeInfo *mode)
return -1;
 
mode->clock = fclock * 1000;
-   if (strcmp(hsync, "+hsync") == 0)
+   if (strcasecmp(hsync, "+hsync") == 0)
mode->flags |= DRM_MODE_FLAG_PHSYNC;
-   else if (strcmp(hsync, "-hsync") == 0)
+   else if (strcasecmp(hsync, "-hsync") == 0)
mode->flags |= DRM_MODE_FLAG_NHSYNC;
else
return -1;
 
-   if (strcmp(vsync, "+vsync") == 0)
+   if (strcasecmp(vsync, "+vsync") == 0)
mode->flags |= DRM_MODE_FLAG_PVSYNC;
-   else if (strcmp(vsync, "-vsync") == 0)
+   else if (strcasecmp(vsync, "-vsync") == 0)
mode->flags |= DRM_MODE_FLAG_NVSYNC;
else
return -1;
-- 
2.17.1
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: client: remove definition of wl_global

2018-06-26 Thread Markus Ongyerth
Hi,

I once again seem to be missing the original message for some reason, so if I 
failed to properly fix up my headers again, I'm refering to [1]

Reviewed-By: Markus Ongyerth 

[1] https://patchwork.freedesktop.org/patch/204915/

Cheers,
ongy


signature.asc
Description: PGP signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH wayland-web] testing: update references to button test

2018-06-26 Thread Matheus Santana
button-test was moved to pointer-test.

Signed-off-by: Matheus Santana 
---
 testing.html | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/testing.html b/testing.html
index e5781fe..987e888 100644
--- a/testing.html
+++ b/testing.html
@@ -90,7 +90,7 @@ test "float_difference_same":exit status 0, pass.
 using the tests/weston-tests-env shell script, which you can
 use to run individual tests, thusly:
 
-$ abs_builddir=$PWD tests/weston-tests-env  button.weston
+$ abs_builddir=$PWD tests/weston-tests-env pointer.weston
 
 
 Test Results
@@ -103,17 +103,17 @@ server and another for the test itself.
 Example output:
 
 
-test-client: got global pointer 100 100
-test-client: got keyboard keymap
-test-client: got surface enter output 0x202d600
+$ tail logs/pointer-log.txt
 test-client: got keyboard modifiers 0 0 0 0
-test-client: got pointer enter 0 0, surface 0x202d500
-test-client: got pointer motion 50 50
-test-client: got global pointer 150 150
-test-client: got pointer button 272 1
-test-client: got pointer button 272 0
-test "simple_button_test":exit status 0, pass.
-1 tests, 1 pass, 0 skip, 0 fail
+test-client: got pointer enter 0 0, surface 0x55c836a14500
+test-client: got pointer frame
+test-client: got pointer motion 0 0
+test-client: got global pointer 46 76
+test-client: got pointer leave, surface 0x55c836a14500
+test-client: got pointer frame
+test-client: got global pointer 45 75
+test "test_pointer_top_left":   exit status 0, pass.
+14 tests, 14 pass, 0 skip, 0 fail
 
 
 Writing Tests
@@ -181,7 +181,7 @@ for interacting with the compositor (e.g. emit input 
events, query surface data,
 There is also a client helper API (tests/weston-test-client-helper.h,c), that
 simplifies client setup and wl_test interface usage.  Probably the most 
effective
 way to learn how to leverage these API's is to study some of the existing tests
-(e.g. tests/button-test.c).
+(e.g. tests/pointer-test.c).
 
 
 
-- 
2.1.4

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


Re: [PATCH 0/5] Implement support for drm properties "GAMMA_LUT" and "CTM"

2018-06-26 Thread Matheus Santana
On Tue, Jun 26, 2018 at 11:51 AM, Emil Velikov 
wrote:

> On 25 June 2018 at 19:48, Matheus Santana  wrote:
> > Hi Harsha,
> >
> >> Weston needs to be rebuilt. But, no new library versions dependencies.
> >
> >
> > All right.
> >
> > On Mon, Jun 25, 2018 at 10:21 AM, Harsha Manjula Mallikarjun (RBEI/ECF3)
> >  wrote:
> >>
> >> Hi Matheus,
> >>
> >> >From: Matheus Santana [mailto:e...@cin.ufpe.br]
> >> >Sent: Friday, June 22, 2018 8:33 PM
> >> >To: Harsha Manjula Mallikarjun (RBEI/ECF3)
> >> > 
> >> >Cc: wayland-devel@lists.freedesktop.org
> >> >Subject: Re: [PATCH 0/5] Implement support for drm properties
> "GAMMA_LUT"
> >> > and "CTM"
> >> >
> >> >Hi Harsha,
> >> >I am unable to run the tests you introduced. Tests execution gets stuck
> >> > after reporting success for surface-global-test.
> >>
> >> Surface-global-test terminates the compositor. May be this is the
> reason.
> >> I do not see a stuck test rather a terminated compositor.
> >>
> >> For testing I modified Weston.ini as follows:
> >> modules=ivi-controller.so,
> >> surface-global-test.so,gamma-test.so,ctm-test.so
> >>
> >> Are you running tests in an another way?
> >
> >
> > I'm running them by just issuing `make check` after building weston. I
> > basically execute three commands (within weston's root dir):
> >
> > $ ./autogen.sh --prefix=$WLD
> > $ make
> > $ make check
> >
> > The output for `autogen.sh` (which is the same regardless patches
> > application) is attached.
> > All tests in suite run fine (24 passed, 1 skipped) when running these
> > commands without the paches.
> >
> > I'm applying the patches by downloading the mbox and `git am
> patches.mbox`.
> >
> > Are you able to run all tests in suite by just `make check` after
> building
> > the project?
> >
> Matheus your assumption is correct. make check should pass, without
> any local changes.
>
> Quick look points the following:
>  - the drm (compositor-drm) backend supports the new functionality
>  - the default backend (see tests/weston-tests-env) is headless
> (compositor-headless)
>

So we shouldn't run drm-specific tests with `make check`, maybe?


>  - xwayland is used - not sure if the xwayland codebase (which lives
> in the Xserver repo) needs updates
>

Would you please point out what does indicate that xwayland is in use?


>
> HTH
> Emil
>


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


Re: [PATCH 0/5] Implement support for drm properties "GAMMA_LUT" and "CTM"

2018-06-26 Thread Emil Velikov
On 25 June 2018 at 19:48, Matheus Santana  wrote:
> Hi Harsha,
>
>> Weston needs to be rebuilt. But, no new library versions dependencies.
>
>
> All right.
>
> On Mon, Jun 25, 2018 at 10:21 AM, Harsha Manjula Mallikarjun (RBEI/ECF3)
>  wrote:
>>
>> Hi Matheus,
>>
>> >From: Matheus Santana [mailto:e...@cin.ufpe.br]
>> >Sent: Friday, June 22, 2018 8:33 PM
>> >To: Harsha Manjula Mallikarjun (RBEI/ECF3)
>> > 
>> >Cc: wayland-devel@lists.freedesktop.org
>> >Subject: Re: [PATCH 0/5] Implement support for drm properties "GAMMA_LUT"
>> > and "CTM"
>> >
>> >Hi Harsha,
>> >I am unable to run the tests you introduced. Tests execution gets stuck
>> > after reporting success for surface-global-test.
>>
>> Surface-global-test terminates the compositor. May be this is the reason.
>> I do not see a stuck test rather a terminated compositor.
>>
>> For testing I modified Weston.ini as follows:
>> modules=ivi-controller.so,
>> surface-global-test.so,gamma-test.so,ctm-test.so
>>
>> Are you running tests in an another way?
>
>
> I'm running them by just issuing `make check` after building weston. I
> basically execute three commands (within weston's root dir):
>
> $ ./autogen.sh --prefix=$WLD
> $ make
> $ make check
>
> The output for `autogen.sh` (which is the same regardless patches
> application) is attached.
> All tests in suite run fine (24 passed, 1 skipped) when running these
> commands without the paches.
>
> I'm applying the patches by downloading the mbox and `git am patches.mbox`.
>
> Are you able to run all tests in suite by just `make check` after building
> the project?
>
Matheus your assumption is correct. make check should pass, without
any local changes.

Quick look points the following:
 - the drm (compositor-drm) backend supports the new functionality
 - the default backend (see tests/weston-tests-env) is headless
(compositor-headless)
 - xwayland is used - not sure if the xwayland codebase (which lives
in the Xserver repo) needs updates

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


Re: [PATCH weston] man: remove redundant word in weston.ini(5)

2018-06-26 Thread Emil Velikov
On 22 June 2018 at 22:00, Matheus Santana  wrote:
> Signed-off-by: Matheus Santana 
> ---
>  man/weston.ini.man | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/weston.ini.man b/man/weston.ini.man
> index 027eae0..02c9b03 100644
> --- a/man/weston.ini.man
> +++ b/man/weston.ini.man
> @@ -468,7 +468,7 @@ denoting the scaling multiplier for the output.
>  .RE
>  .TP 7
>  .BI "seat=" name
> -The logical seat name that that this output should be associated with. If 
> this
> +The logical seat name that this output should be associated with. If this
>  is set then the seat's input will be confined to the output that has the seat
>  set on it. The expectation is that this functionality will be used in a
>  multiheaded environment with a single compositor for multiple output and 
> input

Nice catch.

Reviewed-by: Emil Velikov 

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


Re: [PATCH libinput] tools: fake-build the measure touch-pressure/size sources

2018-06-26 Thread Emil Velikov
On 21 June 2018 at 05:56, Peter Hutterer  wrote:
> This way we can make them execute the list-quirks from the builddir.
>
> Signed-off-by: Peter Hutterer 
> ---
> If anyone has any good ideas for how to do something similar for C source
> file, I'd appreciate it.
>
Here is the approach used by git (with git-foo as an example)

a) stat `dirname git`../git-core/git-foo
b) stat (for each in $PATH)/git-foo
c) $(pwd)/git-foo

With the first one found, being executed.
So when installed a) kicks in (99% of the time), and while in builddir c) does.

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


Re: [PATCH v6 1/6] libweston: set the seat automatically based on the XDG_SEAT environment variable

2018-06-26 Thread Pekka Paalanen
On Tue, 26 Jun 2018 07:56:19 -0400
nerdopolis  wrote:

> On Tuesday, June 12, 2018 7:23:19 AM EDT Pekka Paalanen wrote:
> > On Tue, 23 Jan 2018 22:15:43 -0500
> > nerdopolis  wrote:
> >   
> > > This will allow the seat to be set by the environment as pam_systemd 
> > > typically
> > > sets the XDG_SEAT variable
> > > ---
> > >  compositor/main.c  | 2 +-
> > >  libweston/compositor-drm.c | 5 +
> > >  man/weston-drm.man | 7 +--
> > >  3 files changed, 11 insertions(+), 3 deletions(-)
> > >   
> > 
> > Hi,
> > 
> > this looks like a good addition. Mostly cosmetic nitpicks below.
> >   
> > > diff --git a/compositor/main.c b/compositor/main.c
> > > index 7feb4cb0..72ae14b9 100644
> > > --- a/compositor/main.c
> > > +++ b/compositor/main.c
> > > @@ -563,7 +563,7 @@ usage(int error_code)
> > >  #if defined(BUILD_DRM_COMPOSITOR)
> > >   fprintf(stderr,
> > >   "Options for drm-backend.so:\n\n"
> > > - "  --seat=SEAT\t\tThe seat that weston should run on\n"
> > > + "  --seat=SEAT\t\tThe seat that weston should run on, instead 
> > > of the seat defined in XDG_SEAT\n"
> > >   "  --tty=TTY\t\tThe tty to use\n"
> > >   "  --drm-device=CARD\tThe DRM device to use, e.g. \"card0\".\n"
> > >   "  --use-pixman\t\tUse the pixman (CPU) renderer\n"
> > > diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> > > index 3eda70f3..5585944e 100644
> > > --- a/libweston/compositor-drm.c
> > > +++ b/libweston/compositor-drm.c
> > > @@ -4036,8 +4036,13 @@ drm_backend_create(struct weston_compositor 
> > > *compositor,
> > >   struct udev_device *drm_device;
> > >   struct wl_event_loop *loop;
> > >   const char *seat_id = default_seat;
> > > + const char *session_seat;
> > >   int ret;
> > >  
> > > + session_seat = getenv("XDG_SEAT");
> > > + if (session_seat)
> > > + seat_id = session_seat;
> > > +  
> > 
> > It would be good to move the config->seat_id handling here as well so
> > they are all in the same place.
> > 
> > In compositor-drm.h the seat_id member's comments need updating too.
> >   
> > >   weston_log("initializing drm backend\n");
> > >  
> > >   b = zalloc(sizeof *b);
> > > diff --git a/man/weston-drm.man b/man/weston-drm.man
> > > index 75d79021..883395f2 100644
> > > --- a/man/weston-drm.man
> > > +++ b/man/weston-drm.man
> > > @@ -101,8 +101,8 @@ status. For example, use
> > >  \fB\-\-seat\fR=\fIseatid\fR
> > >  Use graphics and input devices designated for seat
> > >  .I seatid
> > > -instead of the default seat
> > > -.BR seat0 .
> > > +instead of the seat defined in the environment variable
> > > +. BR XDG_SEAT " , and If neither is specifed, seat0 will be assumed."  
> > 
> > I'd format that like this:
> > . BR XDG_SEAT ". If neither is specifed, seat0 will be assumed."
> >   
> > >  .TP
> > >  \fB\-\-tty\fR=\fIx\fR
> > >  Launch Weston on tty
> > > @@ -124,6 +124,9 @@ The file descriptor (integer) where
> > >  .B weston-launch
> > >  is listening. Automatically set by
> > >  .BR weston-launch .
> > > +.TP
> > > +.B XDG_SEAT
> > > +The seat that Weston will start on.  
> > 
> > The default seat, since we have the command line option to override it.  
> I think I was sure on your other requested changes, and made them. I guess
> I will have to figure out the new way to submit this... ...however this is 
> the one thing I have a remaining question on Should it say 
> "The default seat Weston will start on"?
> or should it say
> "The default seat if the --seat command line option is not specified"

Hi,

maybe something like "The seat Weston will start on, unless overridden
on the command line."?

Your latter sentence is good too although "default" is perhaps
redundant then.

Our patch submission has not changed yet, it is still the same
git-send-email to the mailing list routine.


Thanks,
pq


pgpYsEY1Yz67W.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH wayland-web 2/3] building: use enable-llvm option

2018-06-26 Thread Emil Velikov
On 21 June 2018 at 19:54, Matheus Santana  wrote:
> Fix
>
> error: --enable-llvm is required when building r300
>
Fwiw, this error is strictly for performance reasons. If having a
LLVM-free driver is more important than performance, one can remove
the check.
That aside, the series is

Reviewed-by: Emil Velikov 

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


Re: [PATCH v6 1/6] libweston: set the seat automatically based on the XDG_SEAT environment variable

2018-06-26 Thread nerdopolis
On Tuesday, June 12, 2018 7:23:19 AM EDT Pekka Paalanen wrote:
> On Tue, 23 Jan 2018 22:15:43 -0500
> nerdopolis  wrote:
> 
> > This will allow the seat to be set by the environment as pam_systemd 
> > typically
> > sets the XDG_SEAT variable
> > ---
> >  compositor/main.c  | 2 +-
> >  libweston/compositor-drm.c | 5 +
> >  man/weston-drm.man | 7 +--
> >  3 files changed, 11 insertions(+), 3 deletions(-)
> > 
> 
> Hi,
> 
> this looks like a good addition. Mostly cosmetic nitpicks below.
> 
> > diff --git a/compositor/main.c b/compositor/main.c
> > index 7feb4cb0..72ae14b9 100644
> > --- a/compositor/main.c
> > +++ b/compositor/main.c
> > @@ -563,7 +563,7 @@ usage(int error_code)
> >  #if defined(BUILD_DRM_COMPOSITOR)
> > fprintf(stderr,
> > "Options for drm-backend.so:\n\n"
> > -   "  --seat=SEAT\t\tThe seat that weston should run on\n"
> > +   "  --seat=SEAT\t\tThe seat that weston should run on, instead 
> > of the seat defined in XDG_SEAT\n"
> > "  --tty=TTY\t\tThe tty to use\n"
> > "  --drm-device=CARD\tThe DRM device to use, e.g. \"card0\".\n"
> > "  --use-pixman\t\tUse the pixman (CPU) renderer\n"
> > diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> > index 3eda70f3..5585944e 100644
> > --- a/libweston/compositor-drm.c
> > +++ b/libweston/compositor-drm.c
> > @@ -4036,8 +4036,13 @@ drm_backend_create(struct weston_compositor 
> > *compositor,
> > struct udev_device *drm_device;
> > struct wl_event_loop *loop;
> > const char *seat_id = default_seat;
> > +   const char *session_seat;
> > int ret;
> >  
> > +   session_seat = getenv("XDG_SEAT");
> > +   if (session_seat)
> > +   seat_id = session_seat;
> > +
> 
> It would be good to move the config->seat_id handling here as well so
> they are all in the same place.
> 
> In compositor-drm.h the seat_id member's comments need updating too.
> 
> > weston_log("initializing drm backend\n");
> >  
> > b = zalloc(sizeof *b);
> > diff --git a/man/weston-drm.man b/man/weston-drm.man
> > index 75d79021..883395f2 100644
> > --- a/man/weston-drm.man
> > +++ b/man/weston-drm.man
> > @@ -101,8 +101,8 @@ status. For example, use
> >  \fB\-\-seat\fR=\fIseatid\fR
> >  Use graphics and input devices designated for seat
> >  .I seatid
> > -instead of the default seat
> > -.BR seat0 .
> > +instead of the seat defined in the environment variable
> > +. BR XDG_SEAT " , and If neither is specifed, seat0 will be assumed."
> 
> I'd format that like this:
> . BR XDG_SEAT ". If neither is specifed, seat0 will be assumed."
> 
> >  .TP
> >  \fB\-\-tty\fR=\fIx\fR
> >  Launch Weston on tty
> > @@ -124,6 +124,9 @@ The file descriptor (integer) where
> >  .B weston-launch
> >  is listening. Automatically set by
> >  .BR weston-launch .
> > +.TP
> > +.B XDG_SEAT
> > +The seat that Weston will start on.
> 
> The default seat, since we have the command line option to override it.
I think I was sure on your other requested changes, and made them. I guess
I will have to figure out the new way to submit this... ...however this is 
the one thing I have a remaining question on Should it say 
"The default seat Weston will start on"?
or should it say
"The default seat if the --seat command line option is not specified"

Thanks
> 
> >  .
> >  .\" ***
> >  .SH "SEE ALSO"
> 
> 
> Thanks,
> pq




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


Re: [PATCH weston 1/2] desktop-shell: fix output removal for background/panel

2018-06-26 Thread Marius-cristian Vlad
On Thu, 2018-06-21 at 15:53 +0300, Pekka Paalanen wrote:
> From: Pekka Paalanen 
> 
> When the compositor has multiple outputs (not clones) and one of them
> is
> removed, the ones remaining to the right will be moved to close the
> gap.
> Because reflowing the remaining outputs happens before removing the
> wl_output global, we get the new output x,y before the removal. This
> causes us to consider the remaining output immediately to the right
> of
> the removed output to be a clone of the removed output whose x,y
> don't
> get updated. That will then hit the two assertions this patch
> removes.
> 
> The reason the assertions were not actually hit is because of a
> compositor bug which moved the remaining outputs in the wrong
> direction.
> The next patch will fix the reflow, so we need this patch first to
> avoid
> the asserts.
> 
> Remove the assertions and hand over the background and panel if the
> "clone" does not already have them. If the clone already has them, we
> destroy the unnecessary background and panel.
> 
> Signed-off-by: Pekka Paalanen 
> ---
>  clients/desktop-shell.c | 37 -
>  1 file changed, 24 insertions(+), 13 deletions(-)
> 
> diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
> index 6d19d029..fcc0b657 100644
> --- a/clients/desktop-shell.c
> +++ b/clients/desktop-shell.c
> @@ -1337,19 +1337,30 @@ output_remove(struct desktop *desktop, struct
> output *output)
>   }
>  
>   if (rep) {
> - /* If found, hand over the background and panel so
> they don't
> -  * get destroyed. */
> - assert(!rep->background);
> - assert(!rep->panel);
> -
> - rep->background = output->background;
> - output->background = NULL;
> - rep->background->owner = rep;
> -
> - rep->panel = output->panel;
> - output->panel = NULL;
> - if (rep->panel)
> - rep->panel->owner = rep;
> + /* If found and it does not already have a
> background or panel,
> +  * hand over the background and panel so they don't
> get
> +  * destroyed.
> +  *
> +  * We never create multiple backgrounds or panels
> for clones,
> +  * but if the compositor moves outputs, a pair of
> wl_outputs
> +  * might become "clones". This may happen
> temporarily when
> +  * an output is about to be removed and the rest are
> reflowed.
> +  * In this case it is correct to let the
> background/panel be
> +  * destroyed.
> +  */
> +
> + if (!rep->background) {
> + rep->background = output->background;
> + output->background = NULL;
> + rep->background->owner = rep;
> + }
> +
> + if (!rep->panel) {
> + rep->panel = output->panel;
> + output->panel = NULL;
> + if (rep->panel)
Guess copy-pasta from above, but is the test necessary? 

Reviewed-by: Marius Vlad 

> + rep->panel->owner = rep;
> + }
>   }
>  
>   output_destroy(output);
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH wayland 0/2] Document review and commit access requirements

2018-06-26 Thread Marius-cristian Vlad
On Mon, 2018-06-18 at 16:42 +0300, Pekka Paalanen wrote:
> From: Pekka Paalanen 
> 
> Hi,
> 
> for years we have relied on unwritten traditions on how to review
> patches. Gaining commit access has been a secret rite no-one really
> knew
> what was required for to ask or grant it. I would dare claim that
> this
> has been partially the reason for why there are so few people who
> routinely review and land patches. At least I hope so, because
> "unwritten" is something we can fix.
> 
> Let's try to write down the existing conventions and criteria we use
> to
> review patches. These will not be rules to be followed to the letter
> but
> to the spirit.
> 
> Once we have documented guidelines for quality assurance on patch
> review, we can set up rules for granting commit rights. The movement
> to
> document commit rights requirements started in the kernel DRM
> commmunity
> as a tool to give out commits rights to more people and get more
> people
> involved and reviewing patches. I believe we would certainly want
> more
> people involved with Wayland and Weston, but it won't work if we
> don't
> also get more reviewers and committers.
> 
> So here goes. Documenting what is expected from reviewers and commmit
> rights holders should make everyone's lives easier. These patches are
> my
> first take on it, and build on others' as referenced. I want to
> ensure
> that I am replaceable. That everyone is.

And now the bus factor will considerably diminish :-).

> 
> The guidelines will not be perfect from the start. They should we
> honed
> over time.
> 
> 
> Thanks,
> pq
> 
> 
> Pekka Paalanen (2):
>   contributing: add review guidelines
>   contributing: commit rights
> 
>  CONTRIBUTING.md | 82
> +
>  1 file changed, 82 insertions(+)
> 
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel