Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Simone Caronni
613a1efed0 Rebuild for updated FreeRDP 2020-05-22 21:38:54 +02:00
Simone Caronni
460e28a63a Fix build on armv7hl 2020-02-08 17:13:59 +01:00
Simone Caronni
811b98743c Fix build with libinput 1.14 and recent FreeRDP snapshots 2020-02-08 17:02:39 +01:00
Simone Caronni
00eb27dbc1 Rebuild for updated FreeRDP 2020-02-08 14:02:49 +01:00
2 changed files with 139 additions and 1 deletions

View file

@ -0,0 +1,124 @@
diff -Naur wlroots-0.6.0.old/backend/libinput/tablet_tool.c wlroots-0.6.0/backend/libinput/tablet_tool.c
--- wlroots-0.6.0.old/backend/libinput/tablet_tool.c 2020-02-08 16:51:47.555101247 +0100
+++ wlroots-0.6.0/backend/libinput/tablet_tool.c 2020-02-08 16:52:34.262877577 +0100
@@ -113,6 +113,10 @@
return WLR_TABLET_TOOL_TYPE_MOUSE;
case LIBINPUT_TABLET_TOOL_TYPE_LENS:
return WLR_TABLET_TOOL_TYPE_LENS;
+#if LIBINPUT_MINOR >= 14
+ case LIBINPUT_TABLET_TOOL_TYPE_TOTEM:
+ return WLR_TABLET_TOOL_TYPE_TOTEM;
+#endif
}
assert(false && "UNREACHABLE");
diff -Naur wlroots-0.6.0.old/backend/rdp/peer.c wlroots-0.6.0/backend/rdp/peer.c
--- wlroots-0.6.0.old/backend/rdp/peer.c 2020-02-08 16:51:47.557101280 +0100
+++ wlroots-0.6.0/backend/rdp/peer.c 2020-02-08 16:52:04.006374684 +0100
@@ -253,7 +253,7 @@
return false;
}
- nsc_context_set_pixel_format(context->nsc_context, PIXEL_FORMAT_BGRA32);
+ return nsc_context_set_parameters(context->nsc_context, NSC_COLOR_FORMAT, PIXEL_FORMAT_BGRA32);
context->encode_stream = Stream_New(NULL, 65536);
if (!context->encode_stream) {
diff -Naur wlroots-0.6.0.old/include/wlr/types/wlr_tablet_tool.h wlroots-0.6.0/include/wlr/types/wlr_tablet_tool.h
--- wlroots-0.6.0.old/include/wlr/types/wlr_tablet_tool.h 2020-02-08 16:51:47.582101695 +0100
+++ wlroots-0.6.0/include/wlr/types/wlr_tablet_tool.h 2020-02-08 16:52:34.263877593 +0100
@@ -19,14 +19,23 @@
* tablet-unstable-v2 headers, so we can't include them
*/
enum wlr_tablet_tool_type {
- WLR_TABLET_TOOL_TYPE_PEN = 1, /**< A generic pen */
- WLR_TABLET_TOOL_TYPE_ERASER, /**< Eraser */
- WLR_TABLET_TOOL_TYPE_BRUSH, /**< A paintbrush-like tool */
- WLR_TABLET_TOOL_TYPE_PENCIL, /**< Physical drawing tool, e.g.
- Wacom Inking Pen */
- WLR_TABLET_TOOL_TYPE_AIRBRUSH, /**< An airbrush-like tool */
- WLR_TABLET_TOOL_TYPE_MOUSE, /**< A mouse bound to the tablet */
- WLR_TABLET_TOOL_TYPE_LENS, /**< A mouse tool with a lens */
+ /** A generic pen */
+ WLR_TABLET_TOOL_TYPE_PEN = 1,
+ /** Eraser */
+ WLR_TABLET_TOOL_TYPE_ERASER,
+ /** A paintbrush-like tool */
+ WLR_TABLET_TOOL_TYPE_BRUSH,
+ /** Physical drawing tool, e.g. Wacom Inking Pen */
+ WLR_TABLET_TOOL_TYPE_PENCIL,
+ /** An airbrush-like tool */
+ WLR_TABLET_TOOL_TYPE_AIRBRUSH,
+ /** A mouse bound to the tablet */
+ WLR_TABLET_TOOL_TYPE_MOUSE,
+ /** A mouse tool with a lens */
+ WLR_TABLET_TOOL_TYPE_LENS,
+ /** A rotary device with positional and rotation data */
+ WLR_TABLET_TOOL_TYPE_TOTEM,
+
};
struct wlr_tablet_tool {
diff -Naur wlroots-0.6.0.old/meson.build wlroots-0.6.0/meson.build
--- wlroots-0.6.0.old/meson.build 2020-02-08 16:51:47.584101729 +0100
+++ wlroots-0.6.0/meson.build 2020-02-08 16:52:34.263877593 +0100
@@ -95,6 +95,15 @@
wlr_deps += logind
endif
+if libinput.found()
+ ver = libinput.version().split('.')
+ add_project_arguments([
+ '-DLIBINPUT_MAJOR=' + ver[0],
+ '-DLIBINPUT_MINOR=' + ver[1],
+ '-DLIBINPUT_PATCH=' + ver[2],
+ ], language: 'c')
+endif
+
subdir('protocol')
subdir('render')
diff -Naur wlroots-0.6.0.old/types/tablet_v2/wlr_tablet_v2_tool.c wlroots-0.6.0/types/tablet_v2/wlr_tablet_v2_tool.c
--- wlroots-0.6.0.old/types/tablet_v2/wlr_tablet_v2_tool.c 2020-02-08 16:51:47.589101812 +0100
+++ wlroots-0.6.0/types/tablet_v2/wlr_tablet_v2_tool.c 2020-02-08 16:52:34.264877610 +0100
@@ -42,7 +42,7 @@
.hotspot_x = hotspot_x,
.hotspot_y = hotspot_y,
.seat_client = tool->seat->seat_client,
- };
+ };
wl_signal_emit(&tool->tool->events.set_cursor, &evt);
}
@@ -73,6 +73,9 @@
return ZWP_TABLET_TOOL_V2_TYPE_MOUSE;
case WLR_TABLET_TOOL_TYPE_LENS:
return ZWP_TABLET_TOOL_V2_TYPE_LENS;
+ default:
+ /* We skip these devices earlier on */
+ assert(false && "Unreachable");
}
assert(false && "Unreachable");
@@ -196,6 +199,21 @@
struct wlr_tablet_manager_v2 *manager,
struct wlr_seat *wlr_seat,
struct wlr_tablet_tool *wlr_tool) {
+ switch (wlr_tool->type) {
+ case WLR_TABLET_TOOL_TYPE_PEN:
+ case WLR_TABLET_TOOL_TYPE_ERASER:
+ case WLR_TABLET_TOOL_TYPE_BRUSH:
+ case WLR_TABLET_TOOL_TYPE_PENCIL:
+ case WLR_TABLET_TOOL_TYPE_AIRBRUSH:
+ case WLR_TABLET_TOOL_TYPE_MOUSE:
+ case WLR_TABLET_TOOL_TYPE_LENS:
+ /* supported */
+ break;
+ default:
+ /* Unsupported */
+ return NULL;
+ }
+
struct wlr_tablet_seat_v2 *seat = get_or_create_tablet_seat(manager, wlr_seat);
if (!seat) {
return NULL;

View file

@ -13,7 +13,7 @@
Name: wlroots
Version: 0.6.0
Release: 2%{?gitrel}%{?dist}
Release: 4%{?gitrel}%{?dist}
Summary: A modular Wayland compositor library
# Source files/overall project licensed as MIT, but
@ -33,7 +33,12 @@ Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{version}%{?gitver}.ta
# - only has targets for examples known to compile well (cf. "examples) global)
Source1: examples.meson.build
# https://github.com/swaywm/wlroots/issues/1796
# https://github.com/swaywm/wlroots/issues/1941
Patch0: %{name}-%{version}-fix-build.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: meson >= 0.48.0
# patch application
#BuildRequires: git
@ -112,6 +117,7 @@ Development files for %{name}.
%prep
%setup -q -n %{name}-%{commit}
%patch0 -p1
#global __scm git_am
#__scm_setup_git
#autopatch -p1
@ -155,6 +161,14 @@ examples=$(for e in %{examples}; do echo examples/$e.[ch]; done)
%changelog
* Fri May 22 2020 Simone Caronni <negativo17@gmail.com> - 0.6.0-4
- Rebuild for updated FreeRDP.
* Sat Feb 08 2020 Simone Caronni <negativo17@gmail.com> - 0.6.0-3
- Rebuild for updated FreeRDP.
- Add patch to fix build with more recent FreeRDP releases and to allow
building with libinput 1.14 (that is already in Fedora 31).
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild