Hello community, here is the log from the commit of package wlc for openSUSE:Factory checked in at 2017-12-14 10:56:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wlc (Old) and /work/SRC/openSUSE:Factory/.wlc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wlc" Thu Dec 14 10:56:00 2017 rev:12 rq:555785 version:0.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/wlc/wlc.changes 2017-11-09 13:57:24.839953604 +0100 +++ /work/SRC/openSUSE:Factory/.wlc.new/wlc.changes 2017-12-14 10:56:32.906322398 +0100 @@ -1,0 +2,15 @@ +Thu Nov 9 18:27:14 UTC 2017 - aavind...@gmail.com + +- bump to 0.0.11 + - Increment version to 3 for data_(offer|source|device) too + - Add support for wl_data_(offer|source).set_actions + - Add support for wl_data_offer.finish + - Make wl_data_device_manager version 3 + - Fix xwm selection release + In case xwayland terminates before compositor xwm activated, + xwm selection listener link is invalid. This causes crash in + `wlc_xwm_selection_release`. + - Add elogind support +- cldeanup with spec-cleaner + +------------------------------------------------------------------- Old: ---- wlc-0.0.10.tar.bz2 wlc-0.0.10.tar.bz2.sig New: ---- wlc-0.0.11.tar.bz2 wlc-0.0.11.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wlc.spec ++++++ --- /var/tmp/diff_new_pack.Lxp2IO/_old 2017-12-14 10:56:34.538243618 +0100 +++ /var/tmp/diff_new_pack.Lxp2IO/_new 2017-12-14 10:56:34.542243425 +0100 @@ -17,21 +17,20 @@ %define wayland_minimal 1.7 - Name: wlc -Version: 0.0.10 +Version: 0.0.11 Release: 0 Summary: A Wayland Compositor Library License: MIT Group: Development/Libraries/C and C++ Url: https://github.com/Cloudef/wlc Source0: https://github.com/Cloudef/wlc/releases/download/v%{version}/%{name}-%{version}.tar.bz2 -Source1: https://github.com/Cloudef/wlc/releases/download/v%{version}/%{name}-%{version}.tar.bz2.sig +Source1: https://github.com/Cloudef/wlc/releases/download/v%{version}/%{name}-%{version}.tar.bz2.asc Source2: %{name}.keyring BuildRequires: Mesa-devel BuildRequires: chck-devel BuildRequires: cmake -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(dri) BuildRequires: pkgconfig(libinput) @@ -119,11 +118,9 @@ %files -n libwlc0 %doc LICENSE README.rst -%defattr(-,root,root) %{_libdir}/libwlc.so.* %files devel -%defattr(-,root,root) %{_libdir}/libwlc.so %{_libdir}/pkgconfig/wlc.pc %{_includedir}/wlc/ ++++++ wlc-0.0.10.tar.bz2 -> wlc-0.0.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/CMake/FindElogind.cmake new/wlc-0.0.11/CMake/FindElogind.cmake --- old/wlc-0.0.10/CMake/FindElogind.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/wlc-0.0.11/CMake/FindElogind.cmake 2017-10-14 20:29:48.000000000 +0200 @@ -0,0 +1,40 @@ +#.rst: +# FindElogind +# ------- +# +# Find Elogind library +# +# Try to find Elogind library on UNIX systems. The following values are defined +# +# :: +# +# ELOGIND_FOUND - True if Elogind is available +# ELOGIND_INCLUDE_DIRS - Include directories for Elogind +# ELOGIND_LIBRARIES - List of libraries for Elogind +# ELOGIND_DEFINITIONS - List of definitions for Elogind +# +#============================================================================= +# Copyright (c) 2015 Jari Vetoniemi +# +# Distributed under the OSI-approved BSD License (the "License"); +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= + +include(FeatureSummary) +set_package_properties(Elogind PROPERTIES + URL "https://github.com/elogind/elogind" + DESCRIPTION "Elogind User, Seat and Session Manager") + +find_package(PkgConfig) +pkg_check_modules(PC_ELOGIND QUIET libelogind) +find_library(ELOGIND_LIBRARIES NAMES elogind ${PC_ELOGIND_LIBRARY_DIRS}) +find_path(ELOGIND_INCLUDE_DIRS elogind/sd-login.h HINTS ${PC_ELOGIND_INCLUDE_DIRS}) + +set(ELOGIND_DEFINITIONS ${PC_ELOGIND_CFLAGS_OTHER}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(ELOGIND DEFAULT_MSG ELOGIND_INCLUDE_DIRS ELOGIND_LIBRARIES) +mark_as_advanced(ELOGIND_INCLUDE_DIRS ELOGIND_LIBRARIES ELOGIND_DEFINITIONS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/CMakeLists.txt new/wlc-0.0.11/CMakeLists.txt --- old/wlc-0.0.10/CMakeLists.txt 2017-07-27 01:24:12.000000000 +0200 +++ new/wlc-0.0.11/CMakeLists.txt 2017-10-14 20:29:48.000000000 +0200 @@ -1,5 +1,5 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1) -PROJECT(wlc VERSION 0.0.9 LANGUAGES C) +PROJECT(wlc VERSION 0.0.10 LANGUAGES C) set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/CMake") # Subprojects @@ -81,7 +81,9 @@ set_package_properties(Dbus PROPERTIES TYPE RECOMMENDED PURPOSE "Enables logind support") find_package(Systemd) set_package_properties(Systemd PROPERTIES TYPE RECOMMENDED PURPOSE "Enables logind support") -endif() + find_package(Elogind) + set_package_properties(Elogind PROPERTIES TYPE RECOMMENDED PURPOSE "Enables logind support") +endif () if (NOT WLC_BUILD_STATIC) set(BUILD_SHARED_LIBS ON) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/example/example.c new/wlc-0.0.11/example/example.c --- old/wlc-0.0.10/example/example.c 2017-07-27 01:24:12.000000000 +0200 +++ new/wlc-0.0.11/example/example.c 2017-10-14 20:29:48.000000000 +0200 @@ -319,13 +319,13 @@ } static bool -pointer_motion(wlc_handle handle, uint32_t time, const struct wlc_point *position) +pointer_motion(wlc_handle handle, uint32_t time, double x, double y) { (void)handle, (void)time; if (compositor.action.view) { - const int32_t dx = position->x - compositor.action.grab.x; - const int32_t dy = position->y - compositor.action.grab.y; + const int32_t dx = x - compositor.action.grab.x; + const int32_t dy = y - compositor.action.grab.y; struct wlc_geometry g = *wlc_view_get_geometry(compositor.action.view); if (compositor.action.edges) { @@ -363,12 +363,13 @@ wlc_view_set_geometry(compositor.action.view, 0, &g); } - compositor.action.grab = *position; + compositor.action.grab.x = x; + compositor.action.grab.y = y; } // In order to give the compositor control of the pointer placement it needs // to be explicitly set after receiving the motion event: - wlc_pointer_set_position(position); + wlc_pointer_set_position_v2(x, y); return (compositor.action.view ? true : false); } @@ -402,7 +403,7 @@ wlc_set_view_request_geometry_cb(view_request_geometry); wlc_set_keyboard_key_cb(keyboard_key); wlc_set_pointer_button_cb(pointer_button); - wlc_set_pointer_motion_cb(pointer_motion); + wlc_set_pointer_motion_cb_v2(pointer_motion); if (!wlc_init()) return EXIT_FAILURE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/lib/chck/.git new/wlc-0.0.11/lib/chck/.git --- old/wlc-0.0.10/lib/chck/.git 2016-07-29 23:54:01.000000000 +0200 +++ new/wlc-0.0.11/lib/chck/.git 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -gitdir: ../../.git/modules/lib/chck diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/protos/wayland-protocols/.git new/wlc-0.0.11/protos/wayland-protocols/.git --- old/wlc-0.0.10/protos/wayland-protocols/.git 2016-07-29 23:54:04.000000000 +0200 +++ new/wlc-0.0.11/protos/wayland-protocols/.git 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -gitdir: ../../.git/modules/protos/wayland-protocols diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/src/CMakeLists.txt new/wlc-0.0.11/src/CMakeLists.txt --- old/wlc-0.0.10/src/CMakeLists.txt 2017-07-27 01:24:12.000000000 +0200 +++ new/wlc-0.0.11/src/CMakeLists.txt 2017-10-14 20:29:48.000000000 +0200 @@ -100,6 +100,19 @@ endif () endif () +if (ELOGIND_FOUND) + add_definitions(${ELOGIND_DEFINITIONS}) + include_directories(${ELOGIND_INCLUDE_DIRS}) + + if (DBUS_FOUND) + add_definitions(-DHAS_LOGIND) + list(APPEND sources session/logind.c) + list(APPEND libs ${ELOGIND_LIBRARIES}) + else () + message("Dbus was not found, so logind is disabled") + endif () +endif () + if (WLC_WAYLAND_BACKEND_SUPPORT) add_definitions(-DENABLE_WAYLAND_BACKEND) include_directories(${WAYLAND_CLIENT_INCLUDE_DIRS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/src/compositor/seat/data.c new/wlc-0.0.11/src/compositor/seat/data.c --- old/wlc-0.0.10/src/compositor/seat/data.c 2017-07-27 01:24:12.000000000 +0200 +++ new/wlc-0.0.11/src/compositor/seat/data.c 2017-10-14 20:29:48.000000000 +0200 @@ -37,10 +37,37 @@ source->impl->send(source, type, fd); } +static void +wl_cb_data_offer_set_actions(struct wl_client *client, struct wl_resource *resource, uint32_t dnd_actions, uint32_t preferred_action) +{ + (void)client; + + struct wlc_data_source *source; + if (!(source = (struct wlc_data_source*)wl_resource_get_user_data(resource))) + return; + + source->dst_dnd_actions = dnd_actions; + source->prf_dnd_action = preferred_action; +} + +static void +wl_cb_data_offer_finish(struct wl_client *client, struct wl_resource *resource) +{ + (void)client; + + struct wlc_data_source *source; + if (!(source = (struct wlc_data_source*)wl_resource_get_user_data(resource))) + return; + + source->impl->dnd_finished(source); +} + static struct wl_data_offer_interface wl_data_offer_implementation = { - .accept = wl_cb_data_offer_accept, - .receive = wl_cb_data_offer_receive, - .destroy = wlc_cb_resource_destructor + .accept = wl_cb_data_offer_accept, + .receive = wl_cb_data_offer_receive, + .set_actions = wl_cb_data_offer_set_actions, + .finish = wl_cb_data_offer_finish, + .destroy = wlc_cb_resource_destructor, }; static void @@ -65,16 +92,24 @@ wl_data_source_send_cancelled(res); } +static void +data_source_client_dnd_finished(struct wlc_data_source *data_source) +{ + struct wl_resource *res = convert_to_wl_resource(data_source, "data-source"); + wl_data_source_send_dnd_finished(res); +} + static struct wlc_data_source_impl data_source_client_impl = { - .accept = data_source_client_accept, - .send = data_source_client_send, - .cancel = data_source_client_cancel, + .accept = data_source_client_accept, + .send = data_source_client_send, + .cancel = data_source_client_cancel, + .dnd_finished = data_source_client_dnd_finished, }; static void wl_cb_data_source_offer(struct wl_client *client, struct wl_resource *resource, const char *type) { - (void)client, (void)resource, (void)type; + (void)client; struct wlc_data_source *source; if (!(source = convert_from_wl_resource(resource, "data-source"))) @@ -97,9 +132,22 @@ wlc_cb_resource_destructor(client, resource); } +static void +wl_cb_data_source_set_actions(struct wl_client *client, struct wl_resource *resource, uint32_t dnd_actions) +{ + (void)client; + + struct wlc_data_source *source; + if (!(source = convert_from_wl_resource(resource, "data-source"))) + return; + + source->src_dnd_actions = dnd_actions; +} + static struct wl_data_source_interface wl_data_source_implementation = { - .offer = wl_cb_data_source_offer, - .destroy = wl_cb_data_source_destroy + .offer = wl_cb_data_source_offer, + .destroy = wl_cb_data_source_destroy, + .set_actions = wl_cb_data_source_set_actions }; static void @@ -110,7 +158,7 @@ return; wlc_resource r; - if (!(r = wlc_resource_create(&manager->sources, client, &wl_data_source_interface, wl_resource_get_version(resource), 2, id))) + if (!(r = wlc_resource_create(&manager->sources, client, &wl_data_source_interface, wl_resource_get_version(resource), 3, id))) return; struct wlc_data_source *source = convert_from_wlc_resource(r, "data-source"); @@ -156,7 +204,7 @@ return; wlc_resource r; - if (!(r = wlc_resource_create(&seat->manager.devices, client, &wl_data_device_interface, wl_resource_get_version(resource), 2, id))) + if (!(r = wlc_resource_create(&seat->manager.devices, client, &wl_data_device_interface, wl_resource_get_version(resource), 3, id))) return; wlc_resource_implement(r, &wl_data_device_implementation, &seat->manager); @@ -171,7 +219,7 @@ wl_data_device_manager_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { struct wl_resource *resource; - if (!(resource = wl_resource_create_checked(client, &wl_data_device_manager_interface, version, 2, id))) + if (!(resource = wl_resource_create_checked(client, &wl_data_device_manager_interface, version, 3, id))) return; wl_resource_set_implementation(resource, &wl_data_device_manager_implementation, data, NULL); @@ -189,7 +237,7 @@ struct wlc_data_source *source = manager->source; wlc_resource offer = 0; - if (source && !(offer = wlc_resource_create(&manager->offers, client, &wl_data_offer_interface, wl_resource_get_version(resource), 2, 0))) + if (source && !(offer = wlc_resource_create(&manager->offers, client, &wl_data_offer_interface, wl_resource_get_version(resource), 3, 0))) return; if (offer) { @@ -232,7 +280,7 @@ memset(manager, 0, sizeof(struct wlc_data_device_manager)); manager->seat = seat; - if (!(manager->wl.manager = wl_global_create(wlc_display(), &wl_data_device_manager_interface, 2, manager, wl_data_device_manager_bind))) + if (!(manager->wl.manager = wl_global_create(wlc_display(), &wl_data_device_manager_interface, 3, manager, wl_data_device_manager_bind))) goto manager_interface_fail; if (!wlc_source(&manager->sources, "data-source", wlc_data_source, wlc_data_source_release, 32, sizeof(struct wlc_data_source)) || diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/src/resources/types/data-source.h new/wlc-0.0.11/src/resources/types/data-source.h --- old/wlc-0.0.10/src/resources/types/data-source.h 2017-07-05 13:17:31.000000000 +0200 +++ new/wlc-0.0.11/src/resources/types/data-source.h 2017-10-14 20:29:48.000000000 +0200 @@ -9,10 +9,14 @@ void (*send)(struct wlc_data_source *data_source, const char *type, int fd); void (*accept)(struct wlc_data_source *data_source, const char *type); void (*cancel)(struct wlc_data_source *data_source); + void (*dnd_finished)(struct wlc_data_source *data_source); }; struct wlc_data_source { struct chck_iter_pool types; + uint32_t prf_dnd_action; // preferred + uint32_t dst_dnd_actions; + uint32_t src_dnd_actions; const struct wlc_data_source_impl *impl; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/src/session/logind.c new/wlc-0.0.11/src/session/logind.c --- old/wlc-0.0.10/src/session/logind.c 2017-02-27 18:26:48.000000000 +0100 +++ new/wlc-0.0.11/src/session/logind.c 2017-10-14 20:29:48.000000000 +0200 @@ -6,8 +6,14 @@ #include <fcntl.h> #include <sys/stat.h> #include <sys/sysmacros.h> -#include <systemd/sd-login.h> #include <chck/string/string.h> + +#if SYSTEMD_FOUND + #include <systemd/sd-login.h> +#elif ELOGIND_FOUND + #include <elogind/sd-login.h> +#endif + #include "internal.h" #include "dbus.h" #include "logind.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlc-0.0.10/src/xwayland/selection.c new/wlc-0.0.11/src/xwayland/selection.c --- old/wlc-0.0.10/src/xwayland/selection.c 2017-07-27 01:24:12.000000000 +0200 +++ new/wlc-0.0.11/src/xwayland/selection.c 2017-10-14 20:29:48.000000000 +0200 @@ -457,7 +457,9 @@ wl_event_source_remove(xwm->selection.data_event_source); wlc_data_source_release(&xwm->selection.data_source); - wl_list_remove(&xwm->selection.listener.link); + + if (xwm->selection.listener.notify) + wl_list_remove(&xwm->selection.listener.link); } bool wlc_xwm_selection_init(struct wlc_xwm *xwm)