From a31064cd7f09b3c243069e35c5dd9eb33ff81bc7 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 9 Jul 2020 02:24:07 +0000 Subject: [PATCH 01/61] Add source verification and update build dependencies --- .gitignore | 1 + gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg | Bin 0 -> 2376 bytes wlroots.spec | 21 +++++++++++++++---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg diff --git a/.gitignore b/.gitignore index 3d8297c..d9f0c39 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /wlroots-*.tar.gz +/wlroots-*.tar.gz.sig diff --git a/gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg b/gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg new file mode 100644 index 0000000000000000000000000000000000000000..089e4f92ef417c96323b30bbe3c4cb49c0b4badd GIT binary patch literal 2376 zcmajfc{me}1IO{rwXs~ewJ*cIVP=slk!xcZp~#VPZHbk0CXq-)uAC+2K87Smv|Mux zqY$M;D*aIASgJ)d->2{Q_kDiH^Lw7(zn?!p&--~50EPKZeLd6$1Opb>5rn{2v(I%9 z`WYxMMqg&bFOYEIMRXy*Q$LxGnm&wv} zFw~QZ!qonZnMWn%vxqxrwO51r_QcZf`e73eC#Z}hfy)H?o&Byck}BMP207~-OXuwgY*k+DkDSa$?(e#7nSV_BCOl4TAn0T`AU+tXrSsVhE#VB zZst?&z9gsX&cXE>EZ0*#E-S~P!zwC-F5Ty1Eje1ysr6xaI6xc-0Jdsj!U&Nt4B?bd z#03&eEj-dE3KkyV9~2Pe4;BAvb(bk(=K5oai`3&RXx-7lO;Un4N{-xWe8gheIvi?cHt7%?afq{RZow$@az;Tu0Tm$Q^#g?wa<&S2jvZfAKF`PTaL|I zm}AE+8G4G=#r}c4wPJ6vS~h9Lt3q8Os3W2Y;dBV@oPVo6C@ z2|{XmMbXEehQy0Di`jaTZ`hElzeSqO!SmqpUjpwO=_`%(qW!DA(tV&Gny{C_iFQrB z8n~OzFOR}X?(DDbjuVE)SWr?z->%E1m?}NB%>~Gko;GDDuAqjn6Y`FOWP_ z!B#wu>rC_W0>t^>xkAE36U*WhvHFmMjWly+ZJo6HndCT73@1zp+C8%4_hb@X@9F#L ztP^*pmzY%Yjk9%Mv2l%;o^H$sb>r;}P^D35ed^q=ho3PUCTSs0K{DQ2sMR{W>gdu~oIX+PtANN$ z=xw4dvFO!qD>bU6M(x?aen8e!k(*>A;xqHBgJZpLf>@<*FDh=uJ&VgblizxEO4ZHsYUuErp{oGTw)q|MPY zH8>M{%NF-ezA+A^iBqJ>WibbIU%gQnhx$cc9>6?3JX9%-=ZQ0tM(^dw?w_R&jw_;j`~%k4)poVn==)+19phJzRC z@87UX;J?MWiK(r*minkG34K_)x_{b>KT1NSkiIROb;Td#@lpI!)--I)s2XstzOa-; zsiw$xbfGYFuhtOoqgFP6s-=jtwNt?ZqytcmRCUjUDCAxR_Uw4j~uwSynzynb7N~c8^50 z&4OkV>NDk~P-m7c(eugZck<_!&<)i(G3weZe0+|9Xh+A#kI?f=uI5a&8-X93sQE4; zhb#Wl3i=;f8HWdi{co9mo%VlZiXO@Z2?DSqkXg{4f3YgvaP&s_{zq|O>snK^4bwzYrqPS+HMClOGj7B)!>rJr8it704U4o?34JZXBtjB-heC3#khwc2f zf}zYnMe7je#CMQsx8VeBw3{}oMR;6N#(9?V;|woy&Dp(|=cNh0{AiwojH^8&V*4e? zqD$SdTny=M`ZS7UUlnS^$`(~9{uXP)XcYM=(OrzywQ%TN!>M!XhUP5M!t&|g#cE5Y z2PRkZPTDS-u-BwJx*5dd`@R=lm>%*^0jd3x>7Si3f;~r2`c7d%oJc2z?RKJl8eS`O_dX5D84VzngMB)50A^F0^MScZ8RXWbSh*)F!THv?l7rLc?-dCTd1e%jDgADUq^!i!IGH`*|su#fwY z&wQv=a_FYpCWE%zRCN@VbBUT9w6_9!&Y!y3rvTwL{;mO|E0R o>=7=yN7Jp$Mhe-?J~aysT@S+V_AesaC1;B^V&_(vO03~O0AfBxbpQYW literal 0 HcmV?d00001 diff --git a/wlroots.spec b/wlroots.spec index 6771207..9fc6c21 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -17,10 +17,17 @@ Summary: A modular Wayland compositor library License: MIT URL: https://github.com/swaywm/%{name} Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz +Source1: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz.sig +# 7BC79407090047CA: Drew DeVault +# https://drewdevault.com/publickey.txt +# 52CB6609B22DA89A: Drew DeVault (sway signing key) +# Imported from http://pgp.mit.edu/pks/lookup?op=vindex&search=0x52CB6609B22DA89A +Source2: gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg + # this file is a modification of examples/meson.build so as to: # - make it self-contained # - only has targets for examples known to compile well (cf. "examples) global) -Source1: examples.meson.build +Source3: examples.meson.build # Fix build with GCC 10 (-fno-common); upstreamed in next release Patch: https://github.com/swaywm/wlroots/commit/f2943bdf61afe0a3ad2227d72fcbcac8b3088b1a.patch @@ -30,6 +37,7 @@ Patch: https://github.com/swaywm/wlroots/commit/f2943bdf61afe0a3ad2227d Patch: wlroots.combined-modeset-and-enable-pr2167.patch BuildRequires: gcc +BuildRequires: gnupg2 BuildRequires: meson >= 0.51.2 # FIXME: wlroots require `pkgconfig(egl)`, but assumes mesa provides it # (and uses it's extension header `). @@ -41,16 +49,20 @@ BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(libcap) BuildRequires: pkgconfig(libdrm) >= 2.4.95 BuildRequires: pkgconfig(libinput) >= 1.9.0 +BuildRequires: pkgconfig(libsystemd) >= 237 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) >= 1.17 +BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(wayland-server) >= 1.16 +BuildRequires: pkgconfig(x11-xcb) +BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xkbcommon) -# only select examples are supported for being readily compilable (see SOURCE1) +# only select examples are supported for being readily compilable (see SOURCE3) %global examples \ cat multi-pointer output-layout pointer rotation screencopy simple tablet touch @@ -67,7 +79,7 @@ Requires: mesa-libEGL-devel Recommends: pkgconfig(xcb-icccm) # for examples Suggests: gcc -Suggests: meson >= 0.48.0 +Suggests: meson >= 0.51.2 Suggests: pkgconfig(libpng) %description devel @@ -75,6 +87,7 @@ Development files for %{name}. %prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -p1 @@ -101,7 +114,7 @@ EXAMPLES=( %{examples} ) # Normalize whitespace by creating an array for example in "${EXAMPLES[@]}"; do install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/"${example}".[ch] done -install -pm0644 -D '%{SOURCE1}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build' +install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build' %check From d95a381cb9937243d6cfd6506460c57e271cf7b5 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 9 Jul 2020 02:24:19 +0000 Subject: [PATCH 02/61] Updated to version 0.11.0 --- ...3bdf61afe0a3ad2227d72fcbcac8b3088b1a.patch | 26 ---------------- sources | 3 +- ...s.combined-modeset-and-enable-pr2167.patch | 31 ------------------- wlroots.spec | 28 ++++++++--------- 4 files changed, 15 insertions(+), 73 deletions(-) delete mode 100644 f2943bdf61afe0a3ad2227d72fcbcac8b3088b1a.patch delete mode 100644 wlroots.combined-modeset-and-enable-pr2167.patch diff --git a/f2943bdf61afe0a3ad2227d72fcbcac8b3088b1a.patch b/f2943bdf61afe0a3ad2227d72fcbcac8b3088b1a.patch deleted file mode 100644 index 7bd0c34..0000000 --- a/f2943bdf61afe0a3ad2227d72fcbcac8b3088b1a.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f2943bdf61afe0a3ad2227d72fcbcac8b3088b1a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= -Date: Tue, 28 Jan 2020 15:27:24 +0100 -Subject: [PATCH] Declare wlr_seat globals as extern - ---- - include/types/wlr_seat.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/types/wlr_seat.h b/include/types/wlr_seat.h -index 0ccb33455..2a3cd69bb 100644 ---- a/include/types/wlr_seat.h -+++ b/include/types/wlr_seat.h -@@ -4,9 +4,9 @@ - #include - #include - --const struct wlr_pointer_grab_interface default_pointer_grab_impl; --const struct wlr_keyboard_grab_interface default_keyboard_grab_impl; --const struct wlr_touch_grab_interface default_touch_grab_impl; -+extern const struct wlr_pointer_grab_interface default_pointer_grab_impl; -+extern const struct wlr_keyboard_grab_interface default_keyboard_grab_impl; -+extern const struct wlr_touch_grab_interface default_touch_grab_impl; - - void seat_client_create_pointer(struct wlr_seat_client *seat_client, - uint32_t version, uint32_t id); diff --git a/sources b/sources index 3c74977..fe3ae5f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (wlroots-0.10.1.tar.gz) = e1af5a5b6484b5f4060090e13d22d699d5aaa6926e1a6b1043d2b900f88a002ed67dacf8498f23ed3008bf8a35500f415f95b3dbcf50de5da354f309f9161d58 +SHA512 (wlroots-0.11.0.tar.gz) = a8a0c498d10664ff0a5aab8ad1a4fd034179542eff38b058e1da7e4653c42136e4a3586634f3d0a25a985aa7f4c5d17260117d9f4a70a7f8060494c04456f575 +SHA512 (wlroots-0.11.0.tar.gz.sig) = eca87b05860b861cdd7bd16cefd80e9c8c023e1f9216b286c5438d52def5e722d509803cb69fb894b1bb18a86bab227cb1d19362813e1f278b9ac8713be4b4e1 diff --git a/wlroots.combined-modeset-and-enable-pr2167.patch b/wlroots.combined-modeset-and-enable-pr2167.patch deleted file mode 100644 index 053f9c8..0000000 --- a/wlroots.combined-modeset-and-enable-pr2167.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d73e0cdb47cd6950baa1651f8af63dcee1ee8690 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Thu, 7 May 2020 11:30:28 +0200 -Subject: [PATCH] backend/drm: fix combined modeset+enable commits - -When an output is enabled and modeset at the same time, -drm_connector_commit would first try to modeset then try to commit. This -won't work because both will trigger a page-flip. KMS will reject that. - -Change the logic to only enable an output if no modeset has been -requested. The logic in wlr_output already checks that the user isn't -doing a modeset and disabling the output at the same time. ---- - backend/drm/drm.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index f06b0600b..ebaaa8795 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -529,9 +529,7 @@ static bool drm_connector_commit(struct wlr_output *output) { - } - break; - } -- } -- -- if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) { -+ } else if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) { - if (!enable_drm_connector(output, output->pending.enabled)) { - return false; - } diff --git a/wlroots.spec b/wlroots.spec index 9fc6c21..efc57cc 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,9 +1,9 @@ # Version of the .so library -%global abi_ver 5 +%global abi_ver 6 Name: wlroots -Version: 0.10.1 -Release: 2%{?dist} +Version: 0.11.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -29,24 +29,17 @@ Source2: gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build -# Fix build with GCC 10 (-fno-common); upstreamed in next release -Patch: https://github.com/swaywm/wlroots/commit/f2943bdf61afe0a3ad2227d72fcbcac8b3088b1a.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1829212 -# https://github.com/swaywm/wlroots/pull/2167 -Patch: wlroots.combined-modeset-and-enable-pr2167.patch - BuildRequires: gcc BuildRequires: gnupg2 -BuildRequires: meson >= 0.51.2 +BuildRequires: meson >= 0.54.0 # FIXME: wlroots require `pkgconfig(egl)`, but assumes mesa provides it # (and uses it's extension header `). # Upstream is working on not needing that: https://github.com/swaywm/wlroots/issues/1899 # Until it is fixed, pull mesa-libEGL-devel manually -BuildRequires: pkgconfig(egl) mesa-libEGL-devel +BuildRequires: (mesa-libEGL-devel if libglvnd-devel < 1:1.3.2) +BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) -BuildRequires: pkgconfig(libcap) BuildRequires: pkgconfig(libdrm) >= 2.4.95 BuildRequires: pkgconfig(libinput) >= 1.9.0 BuildRequires: pkgconfig(libsystemd) >= 237 @@ -56,7 +49,7 @@ BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) >= 1.17 BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-server) >= 1.16 +BuildRequires: pkgconfig(wayland-server) >= 1.18 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-icccm) @@ -74,7 +67,7 @@ BuildRequires: pkgconfig(xkbcommon) Summary: Development files for %{name} Requires: %{name}%{?_isa} == %{version}-%{release} # FIXME: See the rationale above for this require; remove when no longer needed -Requires: mesa-libEGL-devel +Requires: (mesa-libEGL-devel if libglvnd-devel < 1:1.3.2) # not required per se, so not picked up automatically by RPM Recommends: pkgconfig(xcb-icccm) # for examples @@ -96,6 +89,8 @@ MESON_OPTIONS=( # Disable options requiring extra/unpackaged dependencies -Dexamples=false -Dxcb-errors=disabled + # select systemd logind provider + -Dlogind-provider=systemd %ifarch s390x # Disable -Werror on s390x: https://github.com/swaywm/wlroots/issues/2018 @@ -136,6 +131,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Jul 15 2020 Aleksei Bavshin - 0.11.0-1 +- Updated to version 0.11.0 + * Sat May 09 2020 Till Hofmann - 0.10.1-2 - Add patch from upstream #2167 to fix #1829212 From 7acdd30c661ea6cded0e19e95a94b4f9101a7816 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 14:14:01 +0000 Subject: [PATCH 03/61] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index efc57cc..6c2b10d 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -131,6 +131,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 0.11.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 15 2020 Aleksei Bavshin - 0.11.0-1 - Updated to version 0.11.0 From b71becc897f2484b47a7e89f71ad2b4be5a8020c Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 8 Nov 2020 18:12:37 +0000 Subject: [PATCH 04/61] Updated to version 0.12.0 --- gpgkey-0FDE7BE0E88F5E48.gpg | Bin 0 -> 2263 bytes gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg | Bin 2376 -> 0 bytes sources | 4 ++-- wlroots.spec | 17 +++++++++-------- 4 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 gpgkey-0FDE7BE0E88F5E48.gpg delete mode 100644 gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg diff --git a/gpgkey-0FDE7BE0E88F5E48.gpg b/gpgkey-0FDE7BE0E88F5E48.gpg new file mode 100644 index 0000000000000000000000000000000000000000..c8c4240f016527562ab1d7da936084f6b784143d GIT binary patch literal 2263 zcmaLX`8yL10|4-Cq_MFHlTGBl7IMs;x$pC3OEX7NVkjf`s2Rx_mgY$Aq}(C*73CTd zk|G%?;_FHY-{*aw=li_xPw%gvKj72fZNrW`TF(H&0fRxp&siWy`?ci5{g+b5jz;SR ziv*`Nb$`edrqs9p4=QK%o^baS_Tt@7c5PM12~h6yd)N6XdtOD=kpk9t=iR@o#0V1W zW47fUDyY;oq;5JCk}jL5ND6X8)-J`RVRsd+rz;g8hOZq8h}ZzxuO53(GX@W-WnS-2 z1EvaoO?g7moq+%rM6SW7pMT`$4!kGov%2u(!rsJ>z_4plP8`;@F{twOGJB>`0ihqA zAvafOP*NtHE@~&BXPe^<0c>&C@@9-$1LJmn%u}!|Fhwo((I7)uu`y&(`hJQ=0@-nV z!R%-VS;9$0x{u+$s_t~zz~l5ZnA+BTLeI3*BHH;sc4)co5Aixox;R%Cl?E-pNaMp1 zxs!8{UC%92G~VQ)i!#nJ^TUlj+9TIs` zX6dag&6^e^$zMQ6W`6W$_7D5ncM($aFSc!q2==9i{Oa5^RVQ|B-*H22BC>f>j!Wm2 zpJK^Ihk3s`45{|!w|}#xB&rwcy_U{h1x~XN^bJY4t22XY|c5w;z zDRSX!nw$9vkehon#|chOgPt7#7bpB5H`s*(itruug~|j}zwG_6CN+s16CPq=m{&4o zc?6@@f}KnLs@Mt)PLf#LGD`gZKHpO3s3KDp-yL>d!b5dfj={^kyen*z#jvBqR`<&Y z!ihrT0%wTT$#|1fbS?N;_$HjG zdC=!9jgd%II;wRte~=X;GHgfh) zIgX}Aa#zc308n-POI8}WYL+}^l$t2L#Pq;>+Y)xECO_)7#$)fv)`Uo zOr{|c=q|-PDH`(pmouXg)the&GE`4nge5) zy0W-wS^PvQh&~}b=Jz>}C-HD*ZMdPuc+n%&^vr8vNhx8?xbmjk#8}HxBed-KGu(aN zO#oi*7TCaqw*QeX#%{Ro7r5JR4?6KZs<)UTTSjr z@C5}zL%;L+|SGG z5z;@j@VIq$SJk1{WgnT;r;#v#Zf;01;=8z3*iN_GS{D?S8MqiHAoSb_XC2JS3Y_*Q zifRdPRekc&X0G{3Pl6S~NB{fKt3%gJt8L%YzPi^L0K)}@&{D^$;UfAA%w{>D-S8Sq zrNU9zKGKJ6U3rWAwDL~f!O#MEH%Y5ZfDGO=7lDwRP0_W=upQ=41ijDHEbP|&xwUI6 z5f{n@j2k+08dutI<6%QXKkXu4FgVA|;y}%HJi0PVAe5kyRyyHYFR4DZNN;ty*c;$3 zA9h_{i5iE!3}@Afw~%x8Yz-fxE$ zf#}^CSDD3Fq(wXY-ff@t&FEOPZbdBU-O_y3?PMs+pcKAy(K2E{t#eejyylr~{r$$2 z#=_bmLQ`79dxXQ~56s^nS(y6@243HJ-lb(N%Sx2p`)72A`Z@zDOA8HWgVp5o{cASW z#hn_{3QaMP0%sJij@;=UwdO>R&rDmCXE?$C91NuCpNMj`JkZa5`I*w@p6N~**HQox z-iN6lhmFLQM;Sgi#pjudhsDctj1ch4`|)og^h;b8@YG8&P(mfruvE`EbnfoS!)E@a zFeYtkkAO<}#5bs;MhJ)(Qk};6AyjBPVs1*65@ZC*?d!*r_-P5Mjxw|BTWZt0?))=f zIEh+QCe!#>p$-q9vN!u>lU|K&3a|Q_Mc=&p$UvPdmKIM)7(j-hFSi>WQ}Y&)^>;6Y(K|mw;7GiWrDMm*wvSQBv8GJ#!uIz*anS)u-jH{xRt5+8$tQg zuidrjmg50-?MYI@QR2NU^2sm#orqc_}B8gQT zG~--8~~e*mKWJ^7OK^haD_*E%dlTl_-Fq&U%M0|0% z+5iwb&A{54YZNS!Z-zD$?JHG;Wd8YLcJ;Ff;voqCmpW0!>~?DHGk)fyHf`!mqyI(2 z39n9rHP#%iu&PM8cHOMdXwhvB&!3)DlMHn(fdDHm6muji4;5EL#n0VbM#^EPbjs)j zKr$)OD5kwe%%j!x1KeptU+@TUH0XTkNz)dYMvMKDB5`$yByRRgUJ;x1a@Zi+ZU7YZ gQMp-fzAlhaQ5qV!1o`MTG|b0;cz_w?4t2mk;8 literal 0 HcmV?d00001 diff --git a/gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg b/gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg deleted file mode 100644 index 089e4f92ef417c96323b30bbe3c4cb49c0b4badd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2376 zcmajfc{me}1IO{rwXs~ewJ*cIVP=slk!xcZp~#VPZHbk0CXq-)uAC+2K87Smv|Mux zqY$M;D*aIASgJ)d->2{Q_kDiH^Lw7(zn?!p&--~50EPKZeLd6$1Opb>5rn{2v(I%9 z`WYxMMqg&bFOYEIMRXy*Q$LxGnm&wv} zFw~QZ!qonZnMWn%vxqxrwO51r_QcZf`e73eC#Z}hfy)H?o&Byck}BMP207~-OXuwgY*k+DkDSa$?(e#7nSV_BCOl4TAn0T`AU+tXrSsVhE#VB zZst?&z9gsX&cXE>EZ0*#E-S~P!zwC-F5Ty1Eje1ysr6xaI6xc-0Jdsj!U&Nt4B?bd z#03&eEj-dE3KkyV9~2Pe4;BAvb(bk(=K5oai`3&RXx-7lO;Un4N{-xWe8gheIvi?cHt7%?afq{RZow$@az;Tu0Tm$Q^#g?wa<&S2jvZfAKF`PTaL|I zm}AE+8G4G=#r}c4wPJ6vS~h9Lt3q8Os3W2Y;dBV@oPVo6C@ z2|{XmMbXEehQy0Di`jaTZ`hElzeSqO!SmqpUjpwO=_`%(qW!DA(tV&Gny{C_iFQrB z8n~OzFOR}X?(DDbjuVE)SWr?z->%E1m?}NB%>~Gko;GDDuAqjn6Y`FOWP_ z!B#wu>rC_W0>t^>xkAE36U*WhvHFmMjWly+ZJo6HndCT73@1zp+C8%4_hb@X@9F#L ztP^*pmzY%Yjk9%Mv2l%;o^H$sb>r;}P^D35ed^q=ho3PUCTSs0K{DQ2sMR{W>gdu~oIX+PtANN$ z=xw4dvFO!qD>bU6M(x?aen8e!k(*>A;xqHBgJZpLf>@<*FDh=uJ&VgblizxEO4ZHsYUuErp{oGTw)q|MPY zH8>M{%NF-ezA+A^iBqJ>WibbIU%gQnhx$cc9>6?3JX9%-=ZQ0tM(^dw?w_R&jw_;j`~%k4)poVn==)+19phJzRC z@87UX;J?MWiK(r*minkG34K_)x_{b>KT1NSkiIROb;Td#@lpI!)--I)s2XstzOa-; zsiw$xbfGYFuhtOoqgFP6s-=jtwNt?ZqytcmRCUjUDCAxR_Uw4j~uwSynzynb7N~c8^50 z&4OkV>NDk~P-m7c(eugZck<_!&<)i(G3weZe0+|9Xh+A#kI?f=uI5a&8-X93sQE4; zhb#Wl3i=;f8HWdi{co9mo%VlZiXO@Z2?DSqkXg{4f3YgvaP&s_{zq|O>snK^4bwzYrqPS+HMClOGj7B)!>rJr8it704U4o?34JZXBtjB-heC3#khwc2f zf}zYnMe7je#CMQsx8VeBw3{}oMR;6N#(9?V;|woy&Dp(|=cNh0{AiwojH^8&V*4e? zqD$SdTny=M`ZS7UUlnS^$`(~9{uXP)XcYM=(OrzywQ%TN!>M!XhUP5M!t&|g#cE5Y z2PRkZPTDS-u-BwJx*5dd`@R=lm>%*^0jd3x>7Si3f;~r2`c7d%oJc2z?RKJl8eS`O_dX5D84VzngMB)50A^F0^MScZ8RXWbSh*)F!THv?l7rLc?-dCTd1e%jDgADUq^!i!IGH`*|su#fwY z&wQv=a_FYpCWE%zRCN@VbBUT9w6_9!&Y!y3rvTwL{;mO|E0R o>=7=yN7Jp$Mhe-?J~aysT@S+V_AesaC1;B^V&_(vO03~O0AfBxbpQYW diff --git a/sources b/sources index fe3ae5f..76a4dd1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.11.0.tar.gz) = a8a0c498d10664ff0a5aab8ad1a4fd034179542eff38b058e1da7e4653c42136e4a3586634f3d0a25a985aa7f4c5d17260117d9f4a70a7f8060494c04456f575 -SHA512 (wlroots-0.11.0.tar.gz.sig) = eca87b05860b861cdd7bd16cefd80e9c8c023e1f9216b286c5438d52def5e722d509803cb69fb894b1bb18a86bab227cb1d19362813e1f278b9ac8713be4b4e1 +SHA512 (wlroots-0.12.0.tar.gz) = 560eae30932b777c1f07fb44592d5601c5d10ef74b31b6b9e4166a14caadab2bfa88d39282f159785d4c7f22f78d204f9bb7fab65d58afaf14b72a8486f9b415 +SHA512 (wlroots-0.12.0.tar.gz.sig) = 04ce4cbb014938b19b8dd1f5923d373db2add78765be15bfb3d8889efeed1a2f1ac93581f75262f0ade754a894e755aef6172e7daf8528ba72a0dda450b3967c diff --git a/wlroots.spec b/wlroots.spec index 6c2b10d..b30c7ad 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,9 +1,9 @@ # Version of the .so library -%global abi_ver 6 +%global abi_ver 7 Name: wlroots -Version: 0.11.0 -Release: 2%{?dist} +Version: 0.12.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -18,11 +18,8 @@ License: MIT URL: https://github.com/swaywm/%{name} Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz Source1: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz.sig -# 7BC79407090047CA: Drew DeVault -# https://drewdevault.com/publickey.txt -# 52CB6609B22DA89A: Drew DeVault (sway signing key) -# Imported from http://pgp.mit.edu/pks/lookup?op=vindex&search=0x52CB6609B22DA89A -Source2: gpgkey-7BC79407090047CA-52CB6609B22DA89A.gpg +# 0FDE7BE0E88F5E48: emersion +Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rkjfnghbjxug6b19#/gpgkey-0FDE7BE0E88F5E48.gpg # this file is a modification of examples/meson.build so as to: # - make it self-contained @@ -89,6 +86,7 @@ MESON_OPTIONS=( # Disable options requiring extra/unpackaged dependencies -Dexamples=false -Dxcb-errors=disabled + -Dlibseat=disabled # select systemd logind provider -Dlogind-provider=systemd @@ -131,6 +129,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Nov 08 2020 Aleksei Bavshin - 0.12.0-1 +- Updated to version 0.12.0 + * Wed Jul 29 2020 Fedora Release Engineering - 0.11.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From e0af634394fd077ad8eec5900f03b8bbe4e4fa3d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:35:08 +0000 Subject: [PATCH 05/61] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index b30c7ad..71e1181 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.12.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -129,6 +129,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 0.12.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sun Nov 08 2020 Aleksei Bavshin - 0.12.0-1 - Updated to version 0.12.0 From 3f0980914cf0e22355de6c52dcac91716c1501d0 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 8 Apr 2021 02:59:49 +0000 Subject: [PATCH 06/61] Update to 0.13.0 --- sources | 4 ++-- wlroots.spec | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/sources b/sources index 76a4dd1..749c526 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.12.0.tar.gz) = 560eae30932b777c1f07fb44592d5601c5d10ef74b31b6b9e4166a14caadab2bfa88d39282f159785d4c7f22f78d204f9bb7fab65d58afaf14b72a8486f9b415 -SHA512 (wlroots-0.12.0.tar.gz.sig) = 04ce4cbb014938b19b8dd1f5923d373db2add78765be15bfb3d8889efeed1a2f1ac93581f75262f0ade754a894e755aef6172e7daf8528ba72a0dda450b3967c +SHA512 (wlroots-0.13.0.tar.gz) = 1c942a6b8a628383e2b68cd9096d3525021347c5c363a8239a3b4fb0d5736ffcd3e2c1333fdd7d95ecf214dd04bf01062b4f1b4fbbcd88d1d086a55261ca0c82 +SHA512 (wlroots-0.13.0.tar.gz.sig) = 85cb0ac339ea00d328171b6a7266797a662020815ffff150d593ed997b5e256d7f3839bcaedc37c0fc098f101671fc863fe15ad1054537799456fc7878a5ef38 diff --git a/wlroots.spec b/wlroots.spec index 71e1181..de19b93 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,9 +1,9 @@ # Version of the .so library -%global abi_ver 7 +%global abi_ver 8 Name: wlroots -Version: 0.12.0 -Release: 2%{?dist} +Version: 0.13.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -28,29 +28,27 @@ Source3: examples.meson.build BuildRequires: gcc BuildRequires: gnupg2 -BuildRequires: meson >= 0.54.0 -# FIXME: wlroots require `pkgconfig(egl)`, but assumes mesa provides it -# (and uses it's extension header `). -# Upstream is working on not needing that: https://github.com/swaywm/wlroots/issues/1899 -# Until it is fixed, pull mesa-libEGL-devel manually -BuildRequires: (mesa-libEGL-devel if libglvnd-devel < 1:1.3.2) +BuildRequires: meson >= 0.56.0 BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(libdrm) >= 2.4.95 -BuildRequires: pkgconfig(libinput) >= 1.9.0 +BuildRequires: pkgconfig(libinput) >= 1.14.0 BuildRequires: pkgconfig(libsystemd) >= 237 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) >= 1.17 BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-server) >= 1.18 +BuildRequires: pkgconfig(wayland-server) >= 1.19 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-icccm) +BuildRequires: pkgconfig(xcb-renderutil) BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(xwayland) # only select examples are supported for being readily compilable (see SOURCE3) %global examples \ @@ -63,8 +61,6 @@ BuildRequires: pkgconfig(xkbcommon) %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} == %{version}-%{release} -# FIXME: See the rationale above for this require; remove when no longer needed -Requires: (mesa-libEGL-devel if libglvnd-devel < 1:1.3.2) # not required per se, so not picked up automatically by RPM Recommends: pkgconfig(xcb-icccm) # for examples @@ -129,6 +125,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Apr 07 2021 Aleksei Bavshin - 0.13.0-1 +- Update to 0.13.0 (#1947218) + * Wed Jan 27 2021 Fedora Release Engineering - 0.12.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 78482a2e9bb26c2bed38a24514e8e223d713e7c8 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Wed, 2 Jun 2021 04:23:58 +0000 Subject: [PATCH 07/61] Enable libseat session backend --- wlroots.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wlroots.spec b/wlroots.spec index de19b93..3c583db 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.13.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -34,6 +34,7 @@ BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(libdrm) >= 2.4.95 BuildRequires: pkgconfig(libinput) >= 1.14.0 +BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libsystemd) >= 237 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) @@ -82,7 +83,6 @@ MESON_OPTIONS=( # Disable options requiring extra/unpackaged dependencies -Dexamples=false -Dxcb-errors=disabled - -Dlibseat=disabled # select systemd logind provider -Dlogind-provider=systemd @@ -125,6 +125,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Tue Jun 01 2021 Aleksei Bavshin - 0.13.0-2 +- Enable libseat session backend + * Wed Apr 07 2021 Aleksei Bavshin - 0.13.0-1 - Update to 0.13.0 (#1947218) From 73a757baf6905d7a7872f064f4fc7be971737910 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Wed, 23 Jun 2021 12:52:17 +0000 Subject: [PATCH 08/61] Update upstream gpg key. Verified key from . --- gpgkey-0FDE7BE0E88F5E48.gpg | Bin 2263 -> 8249 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gpgkey-0FDE7BE0E88F5E48.gpg b/gpgkey-0FDE7BE0E88F5E48.gpg index c8c4240f016527562ab1d7da936084f6b784143d..3530f3229196c6dd248e9ce5be9473a8990d4b63 100644 GIT binary patch delta 6930 zcmbW*WltOogSO#eaCc{LC{Wy;DKfabySo-EgS)%CQ>;jlV#OT_6n7}a-EDI}$(!77 zcK6Hvha)+!T#MN4VAw1mdLt}45T-c=8%Ti|1=NJYg#o7U0r{W?HEHkg$cS;PrvMaW zEX)nRt-lFIGK)=^??#({aUA2RQ?7qe@B2BIy~r7&n+&PFec|awK2wq6EIOT<;w(1` zdP3|TFE{%hey@Bj{$)jUit%RwmG?5Y9No+)jGtjIA3qU(r-G*aIHb#ouN~`zK^9Of zlqSp!Liy@YVLAtGkb|>CAr1lOvj$p?{OTg5$Yk_JRc^)k-Eu^BVld z(KkST8qrFd7Yk3|rW*l!`GRAk4&tSOo1ts)To3OciFtlS&A81PLlSwXlxFbhJ`c@T zS^ROF?P1ldK}0F{l$4K1TL5aDbr5z9YKdNLOiXKjM>#YJVcJIPR~?w((~Avk`SVvb z1m&eln&Kv5EeBuH>gzWnnZCSG{{%;o|4GO{5s38&h8KR z=9$7>j4;qc2Ldij9yQF8aEOYu?OmP3h5WRAF`go<=rYutp9BIaeRL0gUO4P8g2})fgv?%g>c|bZjBUf|IJF8lA98X92E1`_%PP%{Gw9_ycIxW?Eg&1!j@DmgG>*|r zph?_fT0f+5+7?UuDAoAcKmdz+(C?GSVvlpdkU4boURv!i=Uv=xlbkR%q_n+YOrmp{ z-KG5Ho@z8Q^o|C`6h81zc z6%yt+dM1S|NFXSLp5Tl4z&79gUeLNbr(g~i>Q?4eGvL8B)b*x| zJ?-Xd6Z`LAhKXB$!%DR1Bkw3{wzJ74lF^Y}UAq|j>1;zsgJmQ)s@>%lxyxeM)#IJj z8u_(OeD?v|<}>X&ak|yLrDxj{6R9$^WQ^;T#06i$0n?_-Cf1SohWDLSP9^q*VpRly zj)S|AB1hGexQVdwdnN)cTh!KUH%ySUQ;pnfMo@h?3imD zS_o64VG(sp3zxm5h~C-*TU^u;xn*#1_!GYFlZJDRV_S7KrSrloqn zFm|zJGJl$u9TjaPDHm)`evaAc|8OTj_2sy|5D#vG5n|n*XYq{Ah&IyHR%K_6tN-D0 zo?$)n&(g6hY)jRf`$<{LE(?Rhrj%>ZKMLal=)tljnJS1sku+lE&!NIzv_Q8$b`;|JF-6KM z%-l!1u2?VoK|*pGJQ^aOV0+_@@!x9I_e+AR2w*PXmuKY`=L+`G4(Z*gM9^8CDN`f zA!q@=fFGv0g`3~8eQ&vbhpO9mgVGv?S@-vD5A-P_;@UUi#Z9btJK^f~@^lqW{a|ft z5J&VvH`vqGc&ma=s;bz7_PD}Ifkcs^s@Fi~B(4jr(^Dk_*8KBkkFRO^F3q|`>6F_b zPkHSIU69KG2FffHJb*sYBodGI&Z@X=ynADuqxDqq`yc0rQWG(q?MR;0+_|d@?t4E> zd?y2r-zd*~U6)7c)#ItNm>)f({3}12@RldAoCGUXi=+9RzO?*;i#L=p;z|@2VkF(=p#i)kIg|6;rLajjS=O7{nWu9A~YrVP4alZ*G)8*>sh^P~i-cI9U7xyj1U zy`I>fj#^?|&tw8D6GR0|cZrIAAxE!Z)7|-vPl!PmmXVtp6Ej@7Hp?b!JHu~d;)^cv zYb)VBD@?4T>EiV1ArNpb^u>rmtOPX06|EN*juhnZxq_%YMmpdNFF5l87M}vv2q~($ zr1|$Vj;?*$fTl>0Ku-_39G`(`i26uBj)u{EC1&n}x@E_F+1`3!Xdb$;m}xg^uWDO~ znr6cX+&S4!+xT`peLVzOBqE*=0iDIb{M|P;6TEMY2W~_?(~dTqgE$U0X;o(!l=9H} z1U`N(yzi11Yy((z(oV$lOl0=m649R4e46vz`+iENB;lMte_9@?lHP^7(ru=@I)r^A z@0szSDO|v%N}_RZCJnN{KTBMsDf`;U#@R&NOux+m!2I_{(b=LmfJcV?=^*!SDWkVo zfJ(Ww4}VhF0>Zmc*wn;)%ZAEC8?cZ@-?6L0u5JNe$JpU@5UomW=u0jd(;a~CTrR!W)t?#7yM3ma{0;myLFeM6ptTnjQa0I}@06cCLLp@y8R&#df>R-G)2Ahxz}0I@ zWf0=KFlUJ+rq>!8bWk?>J&`8M)=d{Tl5=CvRpQb{D}#%%5CMJ*$LTVqgHFe>TnQD;%~)f$yLhJEaQ!yl{JoSz+<)(K0a7mP>L!^- ze0K@{5QH}oipF!YmGt5nSF7m zUlHG{bVY>3FT7A6ApYaGrkn45x_#=a2~h zyukG^{p_D&`DSXjj`j_eDFhUP?u0zD51dSi>Me}U+DNq-Zn%A5A&4255KE{4Lb0>>JFVvWXY-N)@rh70`K5VbMN^Bd>A$7u z{gjl0M}{wr=Kr@8Z#~QxH*yv(0G*u7u)O2fg<{G&!J&zeXUHd8!y3Fd$ zvg$l9covL{R4PwWcj#4zgFk!H{;2Viy;>tgy{zVs@vE7PTB%~$>gKTxAzWsW2+RkN zg1KsT9bku{sLa4(>iCS7mNCHYQ!aO3dvYcILNd<{7ndly#-t8QLH|J@sl4WQ*RsH@ zB=`M(@+w=r*h)8#EPH|S%{14*JQc;>oLNqNC1PbZBM=x4t$+fUu^_5XJ` zWqT1niP{-VBEs!$GSgn}9~p8`ScFZ3*i4B%n7ANNhTmLqj8kOztr$cm@kfKIv?Zh1 zF1JPGy%y>o95gw@ov>n+`Gj5M2CYv%`Gx?!@w0^MXO2JkLG!eoqa2Rz=pCb+mjNVX z5^sKBh|2Fzus>>yN$2#!D&zUHp)qBumy6kLULYPp#T>Z<*e^=X4y(%e$1uVo_OvPZ z2p4^2td*Pue~=HPYnD@XQSKxr^TmeVri&_1KMPypv(lN(PNnD-(DXS=4m8}(0JZkC zT6Oo6Am=3QNG5E%|CVA9R^J7WjA(sZ^KU76Em(l~<%3u1dsK2CiO~Mr49#xvq0njB zPq@#(q{gRKyoBm}zBIr2i0Le;rjy^1p>+xRsS1L){M{h89yZ9HEb;OgY>@n${M=dx9jJ>ePp?y9FOtCG}>GD|j!7Gi!w;pNxBM;Razs+OI z@^<{i!#&lBjMZ@Xk?417<+Y-kl*8dvS{lfOq&ZBXU_cat*Xjas^BcBe5w%Lu$oM?? zG_|x}MPM+q5iXsUirR(VO~e;0)Ba6{3aa#&;!I23&@1DDDv-c^sD&woEv_@r1uL{M z@m+@}8VS>%!fF`tK#!y?KeKw`yk<+R>(WWt=kEsy#3 zK^+E^;^3MDmw@|=5jt(`x5fJb#y<+Iossm~>Bo&+%`1ZN%l`NC(TJ2chC5EYP<+hg z{_Fd4;k_gwjp~cdl7HICgA!gc0b{F%Q4ZKlIE59qk=R{seesQNS6V59<@Ya=9B5yZ zRK;ysav@?QiZQ+PIND%B8VE85!p=XO{RImVMJG+H?^s`f&6ZX5C{Tf_p&Idx%V6S1 z_sMszs+h&{(JEcB*J4aXd|q}<0mdonq^X2_Zk?xWMW6Dz-NgBVH25%JUvRL8?%?k; z*Otd}ks8uDRSl7Cp^`vTZpFeyf|7Y47}IQrD?8<|_UuW>;tm$#yUuZ7CN2RkPXkNY zuabi4|8o8k_`x*$TLe4(REwwDL%r>CrDSIRtK>X#3|SV!6%WHcH+Ls;cvC~FB4Z(^ z2iI- zJS!p;EH`PfDXp7{HKV{$M<_G%`w|yZpbz2jvFhwdBKH0l#jR;5sSf$y3q@sxSp|7Z zXBSH+7i$+=i;o`8_Lfe9U>gq)7k5E6HjmG?9v+r%tme*+Y?h9eZtk|uPR3SlZ0;VW z9-i)Oe7t;ITwFYyoa{V2?7RZJ0=!W`ML1j-6aXI_Dl!rx5FZ6d0EGb(1AzH3z#Lct zDmd=vFBL!LBI zo@4Noe;REgJB=D@uZp5naAdM9=@0{67%~zVEvA01Lf1XsU@mRC>+Ozrg7YT-$gQNS zd{SutSZ&r2@pukXdf9J00t)yAJbf=ybbfKvj~Ku;dpWU*(5#&)l09o`d9@}?E{GvK zS1<(ijV*pJD7D@Y%^{A}hU${FMiT4^^^;P>+tA&$+;gQzc~$xkDxU2hH=*d*Eq(FTG6NCD#Mi3f z1}JFL)}~z_<7e|e8~1ZJ-gT(FDzO(let3oZ9vrz_u6y4(ufB<81wGy=xj7^qnpJqQ z27rC|9nuALLg;V5*TpG|1?*^LYjaFnE@HeC82_1avoV~^e?;pa&`mDLFD7W2pDJ}Z z;q@s#ZaA9(N7^pYOZkf;XiuZMu=?HIGPjsEPRVZL?0RF+WZibQtf?r}TI zZ7c+;lgqfwFz{vQL2d0BC;Y3b9IAzae2ntKwJOH_(rY5EI<-Ao6Rot!>>sSgmb6Y&^~WKc;MarUJYI z{G4V`0e)_Ner_vvUT!{fbACP!D>HK*K2v`7|H112nQD&*<|~%(NBI`Sh|wchNRlZC z&shJxf9?sW1LYl}cs(BU5riNQkY(t`w>RotEFze8v#k3%pbe=N-;wvRveB%bIA5-H zbR{w5jz7U2)QMNX+hF+#j`}=!;-q_9Ox!)R6r7hw=0*q)&nTXh3`u3*POmo<8d?pE zSl}I&a8sd@ZLKX~iboJ9it59%!YuRxIX78fD0zI)$lOv8DT4SV*Z;=$W@NXb{KKI4 z!i6cx4h>gYG;@!Q@)ooXdYA0r8DoyhcZvdO?B&91lTJCW%KFSaeRD^oMygFi`6AQF5WF>sKOCWEt@KG3YGf6-yFg_O_O}YVdd0zg+3o-hHV7_ zIHS^$3(H>w=L^i5Vt~;Z1m+ST{Q495gFluV&2B%N<8?fLEO5dln4jt;i0_i@7xx*Q z&~;%=9DuzfrEX6OQrgRN5?QW~IhtxksuD^!*+X7Q|JDvfhx_LqfWZO`z8a*+U)vEi z<-ondAVvX&;fP>>DFq1R|J>D=|GBF-{~hF{e9Sjq14-gsKtsXPW$KL4{swTLAZ7RC zGu!pnhlD0p0i)UXejm*JFSS?XX<<<80MN~O7^F?fh}c9wMg8wLbYEivy#hnOLmSH7 z4?ddK$#} z!+mv!KeB|q#au6N1s(eiYk?mQh6J3+70(KX2_=SoWf-1gF$9TfJbYi#Ee51a)?vc6 z+*kNnN*KI&{Gxnj1)z`2UsRRdos6_v@=;zhKlFLNIs26470G;=gyQb_GF2V!!PYWD z4@8o34!1*T0tt)t!sI^@=r(=x|9Rs&0nRC$K25Xbg_kPZv^n+twryXaMT@6ZKAz=6 z^*2~$u=QhbqDsnh(nHXoHD^#gRMamaz@+lmlAnioOfduSw;dYGz?~)KtgfQyr_V`I z;|yf(B!@;*t}hMYlCSS-Mok}Lw=||(_uEF1^iYTo%A+%mV+{(s*}<@Qz=)d zd|JvWuEN#U$qYa!cEJ}HiuPZ=&2{j6Z}W7G0t%<(AW;7^+f@J4M6rJ>am>a7^mnzO zOCn;2=nJ7vk;S`=kdjHu9B0n&{u!b>)8eh}bt!)JJ!q-~Pk4H~{}E+vK^jV^iM@r6fXXN^g&a>1>d>6WN%Em(yb^rE%L({uCpM~( zPR~)=Y#pl~<4{Z~%^VwG<$mz$zxNt0BcNqL{!V$Z@CUB-5m9J!?b~nGL;KV5;5r4I ze3p$VAy&9a%{iMnsytZ^Bu$C~4N+Jh+6>v5zYK~R*ug7wl)a@Gch%5*w3$6o&mS;u z#`$32$K#AH-BDVeFg;y2|>d20162Z z58iv==#O4VLG=&-qF26^;H!rl#wd|^w=^S~MGjq|cw~%z=FK)Vx|q5hbme7+tHPC-Y&_wz@;u_u2yVP&W?KxuPN^U8?wga zOE;S|N)AVUuzWpe6ga zVOw^C09G({a;Ti3AQf!UblReFio{j_2a=N~5SHa+T61 z&}-pu4vGEP?98;fMB-p~Mjgl;Bqba;gr~QGU4TlZLo6sU9Sy`~w*V0hx(~wLqbekiM54~CR?8#JWvRd5S9v=dz;&!vk$FY|feD_eT05GX%w zZ&wUA`^FtCC;bwIdH2_Thce_mgGQUwVKLBl`*3JDMo-h1Hak6uXk-Vgx3 zIkA!#w6DxzrQocES9_+`2_js*cJ?}}u{?#dX4Kc|sWgrFJ<}Gp`t3fZn|`ht7SoIj zNU=2UtH%6w?!zGUxNHSC_m)(A<*c>!?*j2LY!U@iTb($Hi)`)@9|C5aZdi!L8HRJ|om(?AuP!22u%Lu_eWFISsm9`ZGAnQYJ; z()p_&u#%=ppU$15LtV9EuR#EJ*O@?0NH?G2b8&aHqWCYVb(8$#M`qzge-@YmSMfDn zGDm@qv8)u&p1eAP*tTt0LegZvLG0z+R-vw7jEy|5u*yGGj(RPR3*{s8{URa&UG@^giSfa8rL yX3K0MNBJr)K$N-6L48lh9s+#bFt|P6vTvEGrFU=S3*BDJ%o7y-`!>oAceyqr-x^2& From cce4bb6f049a89e20efc13132a1b30b8f964989e Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Wed, 23 Jun 2021 13:10:01 +0000 Subject: [PATCH 09/61] Update to 0.14.0 --- sources | 4 ++-- wlroots.spec | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sources b/sources index 749c526..8710f49 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.13.0.tar.gz) = 1c942a6b8a628383e2b68cd9096d3525021347c5c363a8239a3b4fb0d5736ffcd3e2c1333fdd7d95ecf214dd04bf01062b4f1b4fbbcd88d1d086a55261ca0c82 -SHA512 (wlroots-0.13.0.tar.gz.sig) = 85cb0ac339ea00d328171b6a7266797a662020815ffff150d593ed997b5e256d7f3839bcaedc37c0fc098f101671fc863fe15ad1054537799456fc7878a5ef38 +SHA512 (wlroots-0.14.0.tar.gz) = 83f001133cb4b11a72bb9532b7321655428826662848f67de8e3220a33d9dff4d37c859602bdc319929949d387d014a257b0347039a6649944d7b084c76bb611 +SHA512 (wlroots-0.14.0.tar.gz.sig) = bf329b0a70fd71c0183416d0ffd58b1433ff9b7a0494ce65fd6211085cb71fae44cb0ca2397e53f735e62f48f6fee8f7590f240845b76aa1b56a790ca3b9a7f0 diff --git a/wlroots.spec b/wlroots.spec index 3c583db..c7c78d0 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,9 +1,9 @@ # Version of the .so library -%global abi_ver 8 +%global abi_ver 9 Name: wlroots -Version: 0.13.0 -Release: 2%{?dist} +Version: 0.14.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -32,16 +32,15 @@ BuildRequires: meson >= 0.56.0 BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) -BuildRequires: pkgconfig(libdrm) >= 2.4.95 +BuildRequires: pkgconfig(libdrm) >= 2.4.105 BuildRequires: pkgconfig(libinput) >= 1.14.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libsystemd) >= 237 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) -BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-egl) -BuildRequires: pkgconfig(wayland-protocols) >= 1.17 +BuildRequires: pkgconfig(wayland-protocols) >= 1.21 BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(wayland-server) >= 1.19 BuildRequires: pkgconfig(x11-xcb) @@ -83,9 +82,6 @@ MESON_OPTIONS=( # Disable options requiring extra/unpackaged dependencies -Dexamples=false -Dxcb-errors=disabled - # select systemd logind provider - -Dlogind-provider=systemd - %ifarch s390x # Disable -Werror on s390x: https://github.com/swaywm/wlroots/issues/2018 -Dwerror=false @@ -125,6 +121,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Jun 23 2021 Aleksei Bavshin - 0.14.0-1 +- Update to 0.14.0 + * Tue Jun 01 2021 Aleksei Bavshin - 0.13.0-2 - Enable libseat session backend From 951089d0636bc83c0a3d4b5b4e2254d2821d52df Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 2 Jul 2021 19:30:26 -0700 Subject: [PATCH 10/61] Add upstream patch for cursor issues on scaled outputs --- ...ommits-with-buffer-size-not-divisibl.patch | 57 +++++++++++++++++++ wlroots.spec | 3 + 2 files changed, 60 insertions(+) create mode 100644 wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch diff --git a/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch b/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch new file mode 100644 index 0000000..acea2c5 --- /dev/null +++ b/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch @@ -0,0 +1,57 @@ +From 1c4b5bcab3aa1ca7b2c40fd64f77f90b8dde11d7 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Wed, 30 Jun 2021 09:48:31 +0200 +Subject: [PATCH] surface: accept commits with buffer size not divisible by + scale + +There are still many situations where the buffer scale is not +divisible by scale. The fix will require a tad more work, so +let's just log the client error for now and continue handling +the surface commit as usual. + +Closes: https://github.com/swaywm/sway/issues/6352 +--- + types/wlr_surface.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/types/wlr_surface.c b/types/wlr_surface.c +index 969645eba7..512449f239 100644 +--- a/types/wlr_surface.c ++++ b/types/wlr_surface.c +@@ -167,7 +167,7 @@ static void surface_state_viewport_src_size(struct wlr_surface_state *state, + } + } + +-static bool surface_state_finalize(struct wlr_surface *surface, ++static void surface_state_finalize(struct wlr_surface *surface, + struct wlr_surface_state *state) { + if ((state->committed & WLR_SURFACE_STATE_BUFFER)) { + if (state->buffer_resource != NULL) { +@@ -187,7 +187,6 @@ static bool surface_state_finalize(struct wlr_surface *surface, + wlr_log(WLR_DEBUG, "Client bug: submitted a buffer whose size (%dx%d) " + "is not divisible by scale (%d)", state->buffer_width, + state->buffer_height, state->scale); +- return false; + } + + if (state->viewport.has_dst) { +@@ -207,8 +206,6 @@ static bool surface_state_finalize(struct wlr_surface *surface, + pixman_region32_intersect_rect(&state->buffer_damage, + &state->buffer_damage, 0, 0, state->buffer_width, + state->buffer_height); +- +- return true; + } + + static void surface_update_damage(pixman_region32_t *buffer_damage, +@@ -470,9 +467,7 @@ static void surface_commit_state(struct wlr_surface *surface, + } + + static void surface_commit_pending(struct wlr_surface *surface) { +- if (!surface_state_finalize(surface, &surface->pending)) { +- return; +- } ++ surface_state_finalize(surface, &surface->pending); + + if (surface->role && surface->role->precommit) { + surface->role->precommit(surface); diff --git a/wlroots.spec b/wlroots.spec index c7c78d0..27f061a 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -25,6 +25,8 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - make it self-contained # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build +# Disappearing cursor on scaled outputs, swaywm/sway#6352 +Patch0: %{url}/commit/1c4b5bc.patch#/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch BuildRequires: gcc BuildRequires: gnupg2 @@ -123,6 +125,7 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog * Wed Jun 23 2021 Aleksei Bavshin - 0.14.0-1 - Update to 0.14.0 +- Add upstream patch for cursor issues on scaled outputs * Tue Jun 01 2021 Aleksei Bavshin - 0.13.0-2 - Enable libseat session backend From 308144da42576e31bc53a8a505466e8ef270b2b8 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 6 Jul 2021 20:51:13 -0700 Subject: [PATCH 11/61] Add patch for a few more issues with cursors, multi-GPUs and nouveau --- ...r-pending-cursor-FB-on-failed-commit.patch | 65 +++++++++++++++++++ wlroots.spec | 7 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch diff --git a/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch b/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch new file mode 100644 index 0000000..be8380d --- /dev/null +++ b/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch @@ -0,0 +1,65 @@ +From 28f738ed10bf67bdaf340f9438d7fac25a5d7f8f Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Mon, 5 Jul 2021 10:57:33 +0200 +Subject: [PATCH 1/2] Revert "backend/drm: populate cursor plane's current_fb" + +This reverts commit 6c3d080e25e56404228ad7704eed43e40fa0c623. + +Populating wlr_drm_plane.current_fb messes up the buffer's locking. +The previous buffer is released while it's still being displayed +on-screen. +--- + backend/drm/drm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 6cfdb64889..7700bd2d59 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -933,7 +933,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output, + local_buf = wlr_buffer_lock(buffer); + } + +- bool ok = drm_fb_import(&plane->current_fb, drm, local_buf, ++ bool ok = drm_fb_import(&plane->pending_fb, drm, local_buf, + &plane->formats); + wlr_buffer_unlock(local_buf); + if (!ok) { + +From fd21b0d4328fb4f4cc0aafe1ec8b2f3d6125011f Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Mon, 5 Jul 2021 11:04:02 +0200 +Subject: [PATCH 2/2] backend/drm: don't clear pending cursor FB on failed + commit + +The previous fix tried to side-step cursor->pending_fb completely. +However that messes up our buffer locking mechanism. + +Instead, stop clearing the pending cursor FB on a failed commit. The +pending cursor FB will remain for the next commit. + +Fixes: 6c3d080e25e5 ("backend/drm: populate cursor plane's current_fb") +--- + backend/drm/drm.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 7700bd2d59..b6b4baf6a2 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -355,9 +355,12 @@ static bool drm_crtc_commit(struct wlr_drm_connector *conn, + } + } else { + drm_fb_clear(&crtc->primary->pending_fb); +- if (crtc->cursor != NULL) { +- drm_fb_clear(&crtc->cursor->pending_fb); +- } ++ // The set_cursor() hook is a bit special: it's not really synchronized ++ // to commit() or test(). Once set_cursor() returns true, the new ++ // cursor is effectively committed. So don't roll it back here, or we ++ // risk ending up in a state where we don't have a cursor FB but ++ // wlr_drm_connector.cursor_enabled is true. ++ // TODO: fix our output interface to avoid this issue. + } + return ok; + } diff --git a/wlroots.spec b/wlroots.spec index 27f061a..78abd8c 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.14.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -27,6 +27,8 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Disappearing cursor on scaled outputs, swaywm/sway#6352 Patch0: %{url}/commit/1c4b5bc.patch#/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch +# Fixes multiple issues with cursors and multi-GPU setups +Patch1: %{url}/pull/3021.patch#/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch BuildRequires: gcc BuildRequires: gnupg2 @@ -123,6 +125,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Jul 07 2021 Aleksei Bavshin - 0.14.0-2 +- Add patch for a few more issues with cursors, multi-GPUs and nouveau + * Wed Jun 23 2021 Aleksei Bavshin - 0.14.0-1 - Update to 0.14.0 - Add upstream patch for cursor issues on scaled outputs From 56f85843828906bf283439177175ee8fbfd71f52 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 8 Jul 2021 08:26:31 -0700 Subject: [PATCH 12/61] Update to 0.14.1 --- sources | 4 +- ...r-pending-cursor-FB-on-failed-commit.patch | 65 ------------------- ...ommits-with-buffer-size-not-divisibl.patch | 57 ---------------- wlroots.spec | 11 ++-- 4 files changed, 7 insertions(+), 130 deletions(-) delete mode 100644 wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch delete mode 100644 wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch diff --git a/sources b/sources index 8710f49..1ea256b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.14.0.tar.gz) = 83f001133cb4b11a72bb9532b7321655428826662848f67de8e3220a33d9dff4d37c859602bdc319929949d387d014a257b0347039a6649944d7b084c76bb611 -SHA512 (wlroots-0.14.0.tar.gz.sig) = bf329b0a70fd71c0183416d0ffd58b1433ff9b7a0494ce65fd6211085cb71fae44cb0ca2397e53f735e62f48f6fee8f7590f240845b76aa1b56a790ca3b9a7f0 +SHA512 (wlroots-0.14.1.tar.gz) = 4f557c827f9673eccf208a3644954de80e7355b95cc374cc5e851a47087b227f196e0936c0913d21a6c776c29b74de2d028a100931264e41934c747568d8ebe0 +SHA512 (wlroots-0.14.1.tar.gz.sig) = 42b3942737db33de60a4d78df706a490c510ff462d8a15139c6d63c85cc9d1a85843654a3b17c32fb7ceffef160b17bac20a64b5ee8b37720f3c3748f971f2fd diff --git a/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch b/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch deleted file mode 100644 index be8380d..0000000 --- a/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 28f738ed10bf67bdaf340f9438d7fac25a5d7f8f Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Mon, 5 Jul 2021 10:57:33 +0200 -Subject: [PATCH 1/2] Revert "backend/drm: populate cursor plane's current_fb" - -This reverts commit 6c3d080e25e56404228ad7704eed43e40fa0c623. - -Populating wlr_drm_plane.current_fb messes up the buffer's locking. -The previous buffer is released while it's still being displayed -on-screen. ---- - backend/drm/drm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index 6cfdb64889..7700bd2d59 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -933,7 +933,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output, - local_buf = wlr_buffer_lock(buffer); - } - -- bool ok = drm_fb_import(&plane->current_fb, drm, local_buf, -+ bool ok = drm_fb_import(&plane->pending_fb, drm, local_buf, - &plane->formats); - wlr_buffer_unlock(local_buf); - if (!ok) { - -From fd21b0d4328fb4f4cc0aafe1ec8b2f3d6125011f Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Mon, 5 Jul 2021 11:04:02 +0200 -Subject: [PATCH 2/2] backend/drm: don't clear pending cursor FB on failed - commit - -The previous fix tried to side-step cursor->pending_fb completely. -However that messes up our buffer locking mechanism. - -Instead, stop clearing the pending cursor FB on a failed commit. The -pending cursor FB will remain for the next commit. - -Fixes: 6c3d080e25e5 ("backend/drm: populate cursor plane's current_fb") ---- - backend/drm/drm.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index 7700bd2d59..b6b4baf6a2 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -355,9 +355,12 @@ static bool drm_crtc_commit(struct wlr_drm_connector *conn, - } - } else { - drm_fb_clear(&crtc->primary->pending_fb); -- if (crtc->cursor != NULL) { -- drm_fb_clear(&crtc->cursor->pending_fb); -- } -+ // The set_cursor() hook is a bit special: it's not really synchronized -+ // to commit() or test(). Once set_cursor() returns true, the new -+ // cursor is effectively committed. So don't roll it back here, or we -+ // risk ending up in a state where we don't have a cursor FB but -+ // wlr_drm_connector.cursor_enabled is true. -+ // TODO: fix our output interface to avoid this issue. - } - return ok; - } diff --git a/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch b/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch deleted file mode 100644 index acea2c5..0000000 --- a/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 1c4b5bcab3aa1ca7b2c40fd64f77f90b8dde11d7 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Wed, 30 Jun 2021 09:48:31 +0200 -Subject: [PATCH] surface: accept commits with buffer size not divisible by - scale - -There are still many situations where the buffer scale is not -divisible by scale. The fix will require a tad more work, so -let's just log the client error for now and continue handling -the surface commit as usual. - -Closes: https://github.com/swaywm/sway/issues/6352 ---- - types/wlr_surface.c | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/types/wlr_surface.c b/types/wlr_surface.c -index 969645eba7..512449f239 100644 ---- a/types/wlr_surface.c -+++ b/types/wlr_surface.c -@@ -167,7 +167,7 @@ static void surface_state_viewport_src_size(struct wlr_surface_state *state, - } - } - --static bool surface_state_finalize(struct wlr_surface *surface, -+static void surface_state_finalize(struct wlr_surface *surface, - struct wlr_surface_state *state) { - if ((state->committed & WLR_SURFACE_STATE_BUFFER)) { - if (state->buffer_resource != NULL) { -@@ -187,7 +187,6 @@ static bool surface_state_finalize(struct wlr_surface *surface, - wlr_log(WLR_DEBUG, "Client bug: submitted a buffer whose size (%dx%d) " - "is not divisible by scale (%d)", state->buffer_width, - state->buffer_height, state->scale); -- return false; - } - - if (state->viewport.has_dst) { -@@ -207,8 +206,6 @@ static bool surface_state_finalize(struct wlr_surface *surface, - pixman_region32_intersect_rect(&state->buffer_damage, - &state->buffer_damage, 0, 0, state->buffer_width, - state->buffer_height); -- -- return true; - } - - static void surface_update_damage(pixman_region32_t *buffer_damage, -@@ -470,9 +467,7 @@ static void surface_commit_state(struct wlr_surface *surface, - } - - static void surface_commit_pending(struct wlr_surface *surface) { -- if (!surface_state_finalize(surface, &surface->pending)) { -- return; -- } -+ surface_state_finalize(surface, &surface->pending); - - if (surface->role && surface->role->precommit) { - surface->role->precommit(surface); diff --git a/wlroots.spec b/wlroots.spec index 78abd8c..9df2b6f 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,8 +2,8 @@ %global abi_ver 9 Name: wlroots -Version: 0.14.0 -Release: 2%{?dist} +Version: 0.14.1 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -25,10 +25,6 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - make it self-contained # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build -# Disappearing cursor on scaled outputs, swaywm/sway#6352 -Patch0: %{url}/commit/1c4b5bc.patch#/wlroots-0.14.0-surface-accept-commits-with-buffer-size-not-divisibl.patch -# Fixes multiple issues with cursors and multi-GPU setups -Patch1: %{url}/pull/3021.patch#/wlroots-0.14.0-backend-drm-dont-clear-pending-cursor-FB-on-failed-commit.patch BuildRequires: gcc BuildRequires: gnupg2 @@ -125,6 +121,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Thu Jul 08 2021 Aleksei Bavshin - 0.14.1-1 +- Update to wlroots 0.14.1 + * Wed Jul 07 2021 Aleksei Bavshin - 0.14.0-2 - Add patch for a few more issues with cursors, multi-GPUs and nouveau From efcd328a64e3042b327c2bd7ee736573a5875eca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 21:02:27 +0000 Subject: [PATCH 13/61] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 9df2b6f..15626a7 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.14.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -121,6 +121,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.14.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jul 08 2021 Aleksei Bavshin - 0.14.1-1 - Update to wlroots 0.14.1 From 6e6fd8595cff5cc6476d5c88060608a60976fc0d Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 12 Dec 2021 23:23:09 -0800 Subject: [PATCH 14/61] Add patch for disappearing cursor issue (#2027431) --- ...t-leave-dangling-cursor_front_buffer.patch | 111 ++++++++++++++++++ wlroots.spec | 7 +- 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 output-don-t-leave-dangling-cursor_front_buffer.patch diff --git a/output-don-t-leave-dangling-cursor_front_buffer.patch b/output-don-t-leave-dangling-cursor_front_buffer.patch new file mode 100644 index 0000000..c34af68 --- /dev/null +++ b/output-don-t-leave-dangling-cursor_front_buffer.patch @@ -0,0 +1,111 @@ +From d46870cf38db0c53eeb204191f44d18a66691493 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Tue, 30 Nov 2021 18:33:08 +0100 +Subject: [PATCH] output: don't leave dangling cursor_front_buffer + +Sometimes we were calling wlr_output_impl.set_cursor with a NULL +buffer, but we weren't clearing wlr_output.cursor_front_buffer. +Avoid leaving a dangling buffer behind. + +Introduce a helper function output_set_hardware_cursor which calls +wlr_output_impl.set_cursor and keeps cursor_front_buffer in sync. + +(cherry picked from commit 2540de494e66c6fa056e9608755bfa7474d4ee47) +--- + types/wlr_output.c | 43 +++++++++++++++++++++++++++---------------- + 1 file changed, 27 insertions(+), 16 deletions(-) + +diff --git a/types/wlr_output.c b/types/wlr_output.c +index c6676105..24258010 100644 +--- a/types/wlr_output.c ++++ b/types/wlr_output.c +@@ -961,6 +961,26 @@ void wlr_output_lock_attach_render(struct wlr_output *output, bool lock) { + output->attach_render_locks); + } + ++static bool output_set_hardware_cursor(struct wlr_output *output, ++ struct wlr_buffer *buffer, int hotspot_x, int hotspot_y) { ++ if (!output->impl->set_cursor) { ++ return false; ++ } ++ ++ if (!output->impl->set_cursor(output, buffer, hotspot_x, hotspot_y)) { ++ return false; ++ } ++ ++ wlr_buffer_unlock(output->cursor_front_buffer); ++ output->cursor_front_buffer = NULL; ++ ++ if (buffer != NULL) { ++ output->cursor_front_buffer = wlr_buffer_lock(buffer); ++ } ++ ++ return true; ++} ++ + static void output_cursor_damage_whole(struct wlr_output_cursor *cursor); + + void wlr_output_lock_software_cursors(struct wlr_output *output, bool lock) { +@@ -975,8 +995,7 @@ void wlr_output_lock_software_cursors(struct wlr_output *output, bool lock) { + output->software_cursor_locks); + + if (output->software_cursor_locks > 0 && output->hardware_cursor != NULL) { +- assert(output->impl->set_cursor); +- output->impl->set_cursor(output, NULL, 0, 0); ++ output_set_hardware_cursor(output, NULL, 0, 0); + output_cursor_damage_whole(output->hardware_cursor); + output->hardware_cursor = NULL; + } +@@ -1352,14 +1371,10 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) { + wlr_output_transform_invert(output->transform), + buffer ? buffer->width : 0, buffer ? buffer->height : 0); + +- bool ok = output->impl->set_cursor(cursor->output, buffer, +- hotspot.x, hotspot.y); ++ bool ok = output_set_hardware_cursor(cursor->output, buffer, hotspot.x, hotspot.y); ++ wlr_buffer_unlock(buffer); + if (ok) { +- wlr_buffer_unlock(output->cursor_front_buffer); +- output->cursor_front_buffer = buffer; + output->hardware_cursor = cursor; +- } else { +- wlr_buffer_unlock(buffer); + } + return ok; + } +@@ -1473,9 +1488,8 @@ void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor, + wlr_output_transform_invert(cursor->output->transform), + buffer ? buffer->width : 0, buffer ? buffer->height : 0); + +- assert(cursor->output->impl->set_cursor); +- cursor->output->impl->set_cursor(cursor->output, +- buffer, hotspot.x, hotspot.y); ++ output_set_hardware_cursor(cursor->output, buffer, ++ hotspot.x, hotspot.y); + } + return; + } +@@ -1498,8 +1512,7 @@ void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor, + cursor->height = 0; + + if (cursor->output->hardware_cursor == cursor) { +- assert(cursor->output->impl->set_cursor); +- cursor->output->impl->set_cursor(cursor->output, NULL, 0, 0); ++ output_set_hardware_cursor(cursor->output, NULL, 0, 0); + } + } + } +@@ -1560,9 +1573,7 @@ void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) { + wlr_signal_emit_safe(&cursor->events.destroy, cursor); + if (cursor->output->hardware_cursor == cursor) { + // If this cursor was the hardware cursor, disable it +- if (cursor->output->impl->set_cursor) { +- cursor->output->impl->set_cursor(cursor->output, NULL, 0, 0); +- } ++ output_set_hardware_cursor(cursor->output, NULL, 0, 0); + cursor->output->hardware_cursor = NULL; + } + wlr_texture_destroy(cursor->texture); +-- +2.33.1 + diff --git a/wlroots.spec b/wlroots.spec index 15626a7..c502dd0 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.14.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -25,6 +25,8 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - make it self-contained # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build +# https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3189 +Patch0: output-don-t-leave-dangling-cursor_front_buffer.patch BuildRequires: gcc BuildRequires: gnupg2 @@ -121,6 +123,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Mon Dec 13 2021 Aleksei Bavshin - 0.14.1-3 +- Add patch for disappearing cursor issue (#2027431) + * Fri Jul 23 2021 Fedora Release Engineering - 0.14.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From bb8828c42ed788d50676943d2822390e8a82a487 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 16 Jan 2022 12:10:47 -0800 Subject: [PATCH 15/61] Update to 0.15.0 (#2033651) Update upstream URL to gitlab.freedesktop.org Backport some patches from 0.15.1 milestone --- ...t-leave-dangling-cursor_front_buffer.patch | 111 ---------- sources | 4 +- wlroots-0.15-wayland-1.19-compat.patch | 192 ++++++++++++++++++ ...-t-constrain-shm-formats-to-ones-tha.patch | 88 ++++++++ ...5.0-vulkan-Fix-imported-image-layout.patch | 39 ++++ wlroots.spec | 37 ++-- 6 files changed, 346 insertions(+), 125 deletions(-) delete mode 100644 output-don-t-leave-dangling-cursor_front_buffer.patch create mode 100644 wlroots-0.15-wayland-1.19-compat.patch create mode 100644 wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch create mode 100644 wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch diff --git a/output-don-t-leave-dangling-cursor_front_buffer.patch b/output-don-t-leave-dangling-cursor_front_buffer.patch deleted file mode 100644 index c34af68..0000000 --- a/output-don-t-leave-dangling-cursor_front_buffer.patch +++ /dev/null @@ -1,111 +0,0 @@ -From d46870cf38db0c53eeb204191f44d18a66691493 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Tue, 30 Nov 2021 18:33:08 +0100 -Subject: [PATCH] output: don't leave dangling cursor_front_buffer - -Sometimes we were calling wlr_output_impl.set_cursor with a NULL -buffer, but we weren't clearing wlr_output.cursor_front_buffer. -Avoid leaving a dangling buffer behind. - -Introduce a helper function output_set_hardware_cursor which calls -wlr_output_impl.set_cursor and keeps cursor_front_buffer in sync. - -(cherry picked from commit 2540de494e66c6fa056e9608755bfa7474d4ee47) ---- - types/wlr_output.c | 43 +++++++++++++++++++++++++++---------------- - 1 file changed, 27 insertions(+), 16 deletions(-) - -diff --git a/types/wlr_output.c b/types/wlr_output.c -index c6676105..24258010 100644 ---- a/types/wlr_output.c -+++ b/types/wlr_output.c -@@ -961,6 +961,26 @@ void wlr_output_lock_attach_render(struct wlr_output *output, bool lock) { - output->attach_render_locks); - } - -+static bool output_set_hardware_cursor(struct wlr_output *output, -+ struct wlr_buffer *buffer, int hotspot_x, int hotspot_y) { -+ if (!output->impl->set_cursor) { -+ return false; -+ } -+ -+ if (!output->impl->set_cursor(output, buffer, hotspot_x, hotspot_y)) { -+ return false; -+ } -+ -+ wlr_buffer_unlock(output->cursor_front_buffer); -+ output->cursor_front_buffer = NULL; -+ -+ if (buffer != NULL) { -+ output->cursor_front_buffer = wlr_buffer_lock(buffer); -+ } -+ -+ return true; -+} -+ - static void output_cursor_damage_whole(struct wlr_output_cursor *cursor); - - void wlr_output_lock_software_cursors(struct wlr_output *output, bool lock) { -@@ -975,8 +995,7 @@ void wlr_output_lock_software_cursors(struct wlr_output *output, bool lock) { - output->software_cursor_locks); - - if (output->software_cursor_locks > 0 && output->hardware_cursor != NULL) { -- assert(output->impl->set_cursor); -- output->impl->set_cursor(output, NULL, 0, 0); -+ output_set_hardware_cursor(output, NULL, 0, 0); - output_cursor_damage_whole(output->hardware_cursor); - output->hardware_cursor = NULL; - } -@@ -1352,14 +1371,10 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) { - wlr_output_transform_invert(output->transform), - buffer ? buffer->width : 0, buffer ? buffer->height : 0); - -- bool ok = output->impl->set_cursor(cursor->output, buffer, -- hotspot.x, hotspot.y); -+ bool ok = output_set_hardware_cursor(cursor->output, buffer, hotspot.x, hotspot.y); -+ wlr_buffer_unlock(buffer); - if (ok) { -- wlr_buffer_unlock(output->cursor_front_buffer); -- output->cursor_front_buffer = buffer; - output->hardware_cursor = cursor; -- } else { -- wlr_buffer_unlock(buffer); - } - return ok; - } -@@ -1473,9 +1488,8 @@ void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor, - wlr_output_transform_invert(cursor->output->transform), - buffer ? buffer->width : 0, buffer ? buffer->height : 0); - -- assert(cursor->output->impl->set_cursor); -- cursor->output->impl->set_cursor(cursor->output, -- buffer, hotspot.x, hotspot.y); -+ output_set_hardware_cursor(cursor->output, buffer, -+ hotspot.x, hotspot.y); - } - return; - } -@@ -1498,8 +1512,7 @@ void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor, - cursor->height = 0; - - if (cursor->output->hardware_cursor == cursor) { -- assert(cursor->output->impl->set_cursor); -- cursor->output->impl->set_cursor(cursor->output, NULL, 0, 0); -+ output_set_hardware_cursor(cursor->output, NULL, 0, 0); - } - } - } -@@ -1560,9 +1573,7 @@ void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) { - wlr_signal_emit_safe(&cursor->events.destroy, cursor); - if (cursor->output->hardware_cursor == cursor) { - // If this cursor was the hardware cursor, disable it -- if (cursor->output->impl->set_cursor) { -- cursor->output->impl->set_cursor(cursor->output, NULL, 0, 0); -- } -+ output_set_hardware_cursor(cursor->output, NULL, 0, 0); - cursor->output->hardware_cursor = NULL; - } - wlr_texture_destroy(cursor->texture); --- -2.33.1 - diff --git a/sources b/sources index 1ea256b..b9e28fd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.14.1.tar.gz) = 4f557c827f9673eccf208a3644954de80e7355b95cc374cc5e851a47087b227f196e0936c0913d21a6c776c29b74de2d028a100931264e41934c747568d8ebe0 -SHA512 (wlroots-0.14.1.tar.gz.sig) = 42b3942737db33de60a4d78df706a490c510ff462d8a15139c6d63c85cc9d1a85843654a3b17c32fb7ceffef160b17bac20a64b5ee8b37720f3c3748f971f2fd +SHA512 (wlroots-0.15.0.tar.gz) = 730b1e0cf003dabae23101664c6d1993636bd3a8ecbdb3c165eef415a92811c4d5228f48e0275f75361d8528f118dfb8a2298cfb05dbf6364539224ceedca447 +SHA512 (wlroots-0.15.0.tar.gz.sig) = 7e8c9856499c79d95ce3fc881703d6e238e60d9b839122d1785e07ab1fe56858f5f1b7bfc3946aa678732d89da9cbb8b4bc468b6c8a144aad516dfd7e6f0e3b5 diff --git a/wlroots-0.15-wayland-1.19-compat.patch b/wlroots-0.15-wayland-1.19-compat.patch new file mode 100644 index 0000000..5df1f2f --- /dev/null +++ b/wlroots-0.15-wayland-1.19-compat.patch @@ -0,0 +1,192 @@ +From 6d2ad0b3e9b1b3b7d28417be3c1fbb8bfcf5b600 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Fri, 17 Dec 2021 06:45:20 -0800 +Subject: [PATCH 1/2] Revert "output: add support for protocol interface + version 4" + +This reverts commit e3fefda0235e548e4d23639adfe375edf380825c. +--- + meson.build | 2 +- + types/output/output.c | 32 +++++--------------------------- + 2 files changed, 6 insertions(+), 28 deletions(-) + +diff --git a/meson.build b/meson.build +index 681b07cc..531b34e4 100644 +--- a/meson.build ++++ b/meson.build +@@ -99,7 +99,7 @@ internal_features = { + + wayland_project_options = ['tests=false', 'documentation=false'] + wayland_server = dependency('wayland-server', +- version: '>=1.20', ++ version: '>=1.19', + fallback: ['wayland', 'wayland_server_dep'], + default_options: wayland_project_options, + ) +diff --git a/types/output/output.c b/types/output/output.c +index 85590ab6..2ed8c6f6 100644 +--- a/types/output/output.c ++++ b/types/output/output.c +@@ -13,7 +13,7 @@ + #include "util/global.h" + #include "util/signal.h" + +-#define OUTPUT_VERSION 4 ++#define OUTPUT_VERSION 3 + + static void send_geometry(struct wl_resource *resource) { + struct wlr_output *output = wlr_output_from_resource(resource); +@@ -43,23 +43,6 @@ static void send_scale(struct wl_resource *resource) { + } + } + +-static void send_name(struct wl_resource *resource) { +- struct wlr_output *output = wlr_output_from_resource(resource); +- uint32_t version = wl_resource_get_version(resource); +- if (version >= WL_OUTPUT_NAME_SINCE_VERSION) { +- wl_output_send_name(resource, output->name); +- } +-} +- +-static void send_description(struct wl_resource *resource) { +- struct wlr_output *output = wlr_output_from_resource(resource); +- uint32_t version = wl_resource_get_version(resource); +- if (output->description != NULL && +- version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION) { +- wl_output_send_description(resource, output->description); +- } +-} +- + static void send_done(struct wl_resource *resource) { + uint32_t version = wl_resource_get_version(resource); + if (version >= WL_OUTPUT_DONE_SINCE_VERSION) { +@@ -104,8 +87,6 @@ static void output_bind(struct wl_client *wl_client, void *data, + send_geometry(resource); + send_current_mode(resource); + send_scale(resource); +- send_name(resource); +- send_description(resource); + send_done(resource); + + struct wlr_output_event_bind evt = { +@@ -150,7 +131,10 @@ static void schedule_done_handle_idle_timer(void *data) { + + struct wl_resource *resource; + wl_resource_for_each(resource, &output->resources) { +- send_done(resource); ++ uint32_t version = wl_resource_get_version(resource); ++ if (version >= WL_OUTPUT_DONE_SINCE_VERSION) { ++ wl_output_send_done(resource); ++ } + } + } + +@@ -360,12 +344,6 @@ void wlr_output_set_description(struct wlr_output *output, const char *desc) { + output->description = NULL; + } + +- struct wl_resource *resource; +- wl_resource_for_each(resource, &output->resources) { +- send_description(resource); +- } +- wlr_output_schedule_done(output); +- + wlr_signal_emit_safe(&output->events.description, output); + } + +-- +2.33.1 + + +From 83e6d3cfb3e710b6c69eac8caaf8a000002eddea Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Fri, 17 Dec 2021 06:45:40 -0800 +Subject: [PATCH 2/2] Revert "util/global: remove wl_display arg from + wlr_global_destroy_safe" + +This reverts commit 4377b5529279aa9dab64256d22ad0f2e9009843c. +--- + include/util/global.h | 3 ++- + types/output/output.c | 2 +- + types/seat/wlr_seat.c | 2 +- + types/wlr_drm_lease_v1.c | 2 +- + util/global.c | 4 ++-- + 5 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/include/util/global.h b/include/util/global.h +index 1c979ab1..ea0fda83 100644 +--- a/include/util/global.h ++++ b/include/util/global.h +@@ -9,6 +9,7 @@ + * Globals that are created and destroyed on the fly need special handling to + * prevent race conditions with wl_registry. Use this function to destroy them. + */ +-void wlr_global_destroy_safe(struct wl_global *global); ++void wlr_global_destroy_safe(struct wl_global *global, ++ struct wl_display *display); + + #endif +diff --git a/types/output/output.c b/types/output/output.c +index 2ed8c6f6..91a45f13 100644 +--- a/types/output/output.c ++++ b/types/output/output.c +@@ -121,7 +121,7 @@ void wlr_output_destroy_global(struct wlr_output *output) { + wl_list_init(wl_resource_get_link(resource)); + } + +- wlr_global_destroy_safe(output->global); ++ wlr_global_destroy_safe(output->global, output->display); + output->global = NULL; + } + +diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c +index 4933133c..f9314744 100644 +--- a/types/seat/wlr_seat.c ++++ b/types/seat/wlr_seat.c +@@ -191,7 +191,7 @@ void wlr_seat_destroy(struct wlr_seat *seat) { + } + } + +- wlr_global_destroy_safe(seat->global); ++ wlr_global_destroy_safe(seat->global, seat->display); + free(seat->pointer_state.default_grab); + free(seat->keyboard_state.default_grab); + free(seat->touch_state.default_grab); +diff --git a/types/wlr_drm_lease_v1.c b/types/wlr_drm_lease_v1.c +index 7cb9974d..7063e0d3 100644 +--- a/types/wlr_drm_lease_v1.c ++++ b/types/wlr_drm_lease_v1.c +@@ -127,7 +127,7 @@ static void drm_lease_device_v1_destroy( + } + + wl_list_remove(&device->link); +- wlr_global_destroy_safe(device->global); ++ wlr_global_destroy_safe(device->global, device->manager->display); + + free(device); + } +diff --git a/util/global.c b/util/global.c +index fa99a994..a0d84ed3 100644 +--- a/util/global.c ++++ b/util/global.c +@@ -14,7 +14,8 @@ static int destroy_global(void *_data) { + return 0; + } + +-void wlr_global_destroy_safe(struct wl_global *global) { ++void wlr_global_destroy_safe(struct wl_global *global, ++ struct wl_display *display) { + // Don't destroy the global immediately. If the global has been created + // recently, clients might try to bind to it after we've destroyed it. + // Instead, remove the global so that clients stop seeing it and wait an +@@ -24,7 +25,6 @@ void wlr_global_destroy_safe(struct wl_global *global) { + wl_global_remove(global); + wl_global_set_user_data(global, NULL); // safety net + +- struct wl_display *display = wl_global_get_display(global); + struct wl_event_loop *event_loop = wl_display_get_event_loop(display); + struct destroy_global_data *data = calloc(1, sizeof(*data)); + if (data == NULL) { +-- +2.33.1 + diff --git a/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch b/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch new file mode 100644 index 0000000..95ca0be --- /dev/null +++ b/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch @@ -0,0 +1,88 @@ +From 59b9518f072527ac59593e51df7f5d5331a34f0e Mon Sep 17 00:00:00 2001 +From: Thomas Hebb +Date: Wed, 5 Jan 2022 00:16:59 -0800 +Subject: [PATCH] render/gles2: don't constrain shm formats to ones that + support reading + +commit 44e8451cd93e ("render/gles2: hide shm formats without GL +support") added the is_gles2_pixel_format_supported() function to +render/gles2/pixel_format.c, whose stated purpose is to "check whether +the renderer has the needed GL extensions to read a given pixel format." +It then used that function to filter the pixel formats returned by +get_gles2_shm_formats(). + +The result of this change is that RGB formats are no longer reported for +GL drivers that don't implement EXT_read_format_bgra, even when those +formats are supported for rendering (which they have to be for +wlr_gles2_renderer_create() to succeed). This is a pretty clear +regression, since wlr_renderer_init_wl_shm() fails when either of +WL_SHM_FORMAT_ARGB8888 or WL_SHM_FORMAT_XRGB8888 are missing. + +To fix the regression, change is_gles2_pixel_format_supported() to +accept all pixel formats that support rendering, regardless of whether +we can read them or not, and move the check for EXT_read_format_bgra +back into gles2_read_pixels(). (There's already a check for this +extension in gles2_preferred_read_format(), so we're not breaking any +abstraction that wasn't already broken.) + +Tested on the NVIDIA 495.46 proprietary driver, which doesn't support +EXT_read_format_bgra. + +Fixes: 44e8451cd93e ("render/gles2: hide shm formats without GL support") +--- + render/gles2/pixel_format.c | 14 ++++++++++---- + render/gles2/renderer.c | 6 ++++++ + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/render/gles2/pixel_format.c b/render/gles2/pixel_format.c +index 31bb3908..b155bbbe 100644 +--- a/render/gles2/pixel_format.c ++++ b/render/gles2/pixel_format.c +@@ -98,6 +98,10 @@ static const struct wlr_gles2_pixel_format formats[] = { + + // TODO: more pixel formats + ++/* ++ * Return true if supported for texturing, even if other operations like ++ * reading aren't supported. ++ */ + bool is_gles2_pixel_format_supported(const struct wlr_gles2_renderer *renderer, + const struct wlr_gles2_pixel_format *format) { + if (format->gl_type == GL_UNSIGNED_INT_2_10_10_10_REV_EXT +@@ -108,10 +112,12 @@ bool is_gles2_pixel_format_supported(const struct wlr_gles2_renderer *renderer, + && !renderer->exts.OES_texture_half_float_linear) { + return false; + } +- if (format->gl_format == GL_BGRA_EXT +- && !renderer->exts.EXT_read_format_bgra) { +- return false; +- } ++ /* ++ * Note that we don't need to check for GL_EXT_texture_format_BGRA8888 ++ * here, since we've already checked if we have it at renderer creation ++ * time and bailed out if not. We do the check there because Wayland ++ * requires all compositors to support SHM buffers in that format. ++ */ + return true; + } + +diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c +index 527d85bf..67b8ead4 100644 +--- a/render/gles2/renderer.c ++++ b/render/gles2/renderer.c +@@ -441,6 +441,12 @@ static bool gles2_read_pixels(struct wlr_renderer *wlr_renderer, + return false; + } + ++ if (fmt->gl_format == GL_BGRA_EXT && !renderer->exts.EXT_read_format_bgra) { ++ wlr_log(WLR_ERROR, ++ "Cannot read pixels: missing GL_EXT_read_format_bgra extension"); ++ return false; ++ } ++ + const struct wlr_pixel_format_info *drm_fmt = + drm_get_pixel_format_info(fmt->drm_format); + assert(drm_fmt); +-- +GitLab + diff --git a/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch b/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch new file mode 100644 index 0000000..2520642 --- /dev/null +++ b/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch @@ -0,0 +1,39 @@ +From 9988eb3378dbc3301059aa9b5e1ff476354cb92b Mon Sep 17 00:00:00 2001 +From: nyorain +Date: Sun, 26 Dec 2021 13:21:54 +0100 +Subject: [PATCH] vulkan: Fix imported image layout + +--- + render/vulkan/renderer.c | 2 +- + render/vulkan/texture.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c +index a1d8d41e..21b36bdd 100644 +--- a/render/vulkan/renderer.c ++++ b/render/vulkan/renderer.c +@@ -598,7 +598,7 @@ static void vulkan_end(struct wlr_renderer *wlr_renderer) { + wl_list_for_each_safe(texture, tmp_tex, &renderer->foreign_textures, foreign_link) { + VkImageLayout src_layout = VK_IMAGE_LAYOUT_GENERAL; + if (!texture->transitioned) { +- src_layout = VK_IMAGE_LAYOUT_PREINITIALIZED; ++ src_layout = VK_IMAGE_LAYOUT_UNDEFINED; + texture->transitioned = true; + } + +diff --git a/render/vulkan/texture.c b/render/vulkan/texture.c +index 76c37011..b705603c 100644 +--- a/render/vulkan/texture.c ++++ b/render/vulkan/texture.c +@@ -438,7 +438,7 @@ VkImage vulkan_import_dmabuf(struct wlr_vk_renderer *renderer, + img_info.arrayLayers = 1; + img_info.samples = VK_SAMPLE_COUNT_1_BIT; + img_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; +- img_info.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED; ++ img_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + img_info.extent = (VkExtent3D) { attribs->width, attribs->height, 1 }; + img_info.usage = for_render ? + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT : +-- +GitLab + diff --git a/wlroots.spec b/wlroots.spec index c502dd0..13f5d37 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,9 +1,9 @@ # Version of the .so library -%global abi_ver 9 +%global abi_ver 10 Name: wlroots -Version: 0.14.1 -Release: 3%{?dist} +Version: 0.15.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -15,9 +15,9 @@ Summary: A modular Wayland compositor library # the main license of the binaries linking with them by # the underlying licenses. License: MIT -URL: https://github.com/swaywm/%{name} -Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz -Source1: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz.sig +URL: https://gitlab.freedesktop.org/wlroots/wlroots +Source0: %{url}/-/releases/%{version}/downloads/%{name}-%{version}.tar.gz +Source1: %{url}/-/releases/%{version}/downloads/%{name}-%{version}.tar.gz.sig # 0FDE7BE0E88F5E48: emersion Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rkjfnghbjxug6b19#/gpgkey-0FDE7BE0E88F5E48.gpg @@ -25,24 +25,33 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - make it self-contained # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build -# https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3189 -Patch0: output-don-t-leave-dangling-cursor_front_buffer.patch +# Fix validation errors with Vulkan >= 1.2.197 +Patch0: %{url}/-/commit/9988eb33.patch#/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch +# Fix support for a certain proprietary driver +Patch1: %{url}/-/commit/59b9518f.patch#/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch +%if 0%{?fedora} < 36 +# Revert two commits that require wayland 1.20 +# Allows module builds on f34 and f35 +Patch100: wlroots-0.15-wayland-1.19-compat.patch +%endif BuildRequires: gcc +BuildRequires: glslang BuildRequires: gnupg2 -BuildRequires: meson >= 0.56.0 +BuildRequires: meson >= 0.58.1 BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) -BuildRequires: pkgconfig(libdrm) >= 2.4.105 +BuildRequires: pkgconfig(libdrm) >= 2.4.109 BuildRequires: pkgconfig(libinput) >= 1.14.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libsystemd) >= 237 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-egl) -BuildRequires: pkgconfig(wayland-protocols) >= 1.21 +BuildRequires: pkgconfig(wayland-protocols) >= 1.24 BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(wayland-server) >= 1.19 BuildRequires: pkgconfig(x11-xcb) @@ -111,7 +120,6 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %files %license LICENSE %doc README.md -%doc %dir %{_pkgdocdir} %{_libdir}/lib%{name}.so.%{abi_ver}* @@ -123,6 +131,11 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Jan 16 2022 Aleksei Bavshin - 0.15.0-1 +- Update to 0.15.0 (#2033651) +- Update upstream URL to gitlab.freedesktop.org +- Backport some patches from 0.15.1 milestone + * Mon Dec 13 2021 Aleksei Bavshin - 0.14.1-3 - Add patch for disappearing cursor issue (#2027431) From 1cfc160ee93fc9f808b3701ce735e07d2569698f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 04:34:11 +0000 Subject: [PATCH 16/61] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 13f5d37..6cd98a0 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.15.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -131,6 +131,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 0.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Sun Jan 16 2022 Aleksei Bavshin - 0.15.0-1 - Update to 0.15.0 (#2033651) - Update upstream URL to gitlab.freedesktop.org From 85be0c54f519e154c590fcc8acdc2b4f6876f5f8 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 25 Jan 2022 21:58:24 -0800 Subject: [PATCH 17/61] Backport fix for permission popups in Firefox --- ...k-cached-state-on-commit-if-desynced.patch | 41 +++++++++++++++++++ wlroots.spec | 8 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch diff --git a/wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch b/wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch new file mode 100644 index 0000000..0a89720 --- /dev/null +++ b/wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch @@ -0,0 +1,41 @@ +From e217d3214da3eb713a18e99b5e456f609606cddb Mon Sep 17 00:00:00 2001 +From: Kirill Primak +Date: Tue, 25 Jan 2022 22:30:36 +0300 +Subject: [PATCH] subsurface: unlock cached state on commit if desynced + +wl_subsurface::set_desync description states: "If cached state exists when +wl_surface.commit is called in desynchronized mode, the pending state is +added to the cached state, and applied as a whole." + +This commit reintroduces an implementation of said behavior, previously +removed in 7daf6da9ac05be2cb74c0983e3caee0b21db75d4. + +Strictly speaking, this logic isn't fully correct, as the cached state +and the pending state are applied individually instead, if the cached +state isn't locked by anything else. However, the end result is still +the same. + +This commit fixes the issue with Firefox permission popups. + +(cherry picked from commit 77951968dc9df7214c04c33f4905a9a7aa92f60c) +--- + types/wlr_surface.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/types/wlr_surface.c b/types/wlr_surface.c +index d5d49571..c51dbbc1 100644 +--- a/types/wlr_surface.c ++++ b/types/wlr_surface.c +@@ -530,6 +530,9 @@ static void subsurface_commit(struct wlr_subsurface *subsurface) { + } + subsurface->has_cache = true; + subsurface->cached_seq = wlr_surface_lock_pending(surface); ++ } else if (subsurface->has_cache) { ++ wlr_surface_unlock_cached(surface, subsurface->cached_seq); ++ subsurface->has_cache = false; + } + } + +-- +2.34.1 + diff --git a/wlroots.spec b/wlroots.spec index 6cd98a0..c86ea19 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.15.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -29,6 +29,9 @@ Source3: examples.meson.build Patch0: %{url}/-/commit/9988eb33.patch#/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch # Fix support for a certain proprietary driver Patch1: %{url}/-/commit/59b9518f.patch#/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch +# Fix permission popups in Firefox +# https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3436 +Patch2: wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch %if 0%{?fedora} < 36 # Revert two commits that require wayland 1.20 # Allows module builds on f34 and f35 @@ -131,6 +134,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Tue Jan 25 2022 Aleksei Bavshin - 0.15.0-3 +- Backport fix for permission popups in Firefox + * Sat Jan 22 2022 Fedora Release Engineering - 0.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From dd99a05c7cb6d36754ecacd2c9900d3b2ea732d2 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 5 Feb 2022 12:14:54 -0800 Subject: [PATCH 18/61] Update to 0.15.1 (#2050408) --- sources | 4 +- ...-t-constrain-shm-formats-to-ones-tha.patch | 88 ------------------- ...k-cached-state-on-commit-if-desynced.patch | 41 --------- ...5.0-vulkan-Fix-imported-image-layout.patch | 39 -------- wlroots.spec | 15 ++-- 5 files changed, 8 insertions(+), 179 deletions(-) delete mode 100644 wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch delete mode 100644 wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch delete mode 100644 wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch diff --git a/sources b/sources index b9e28fd..4500362 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.15.0.tar.gz) = 730b1e0cf003dabae23101664c6d1993636bd3a8ecbdb3c165eef415a92811c4d5228f48e0275f75361d8528f118dfb8a2298cfb05dbf6364539224ceedca447 -SHA512 (wlroots-0.15.0.tar.gz.sig) = 7e8c9856499c79d95ce3fc881703d6e238e60d9b839122d1785e07ab1fe56858f5f1b7bfc3946aa678732d89da9cbb8b4bc468b6c8a144aad516dfd7e6f0e3b5 +SHA512 (wlroots-0.15.1.tar.gz) = 6228160f2f350a406c612f1048d7075cf2f78206cc84bc16f889d5d0acd614f9e98845fffed03d7067cfdbd7558b77fcc5d8cedc3868d866e476523126a63677 +SHA512 (wlroots-0.15.1.tar.gz.sig) = c264274b132307276395648e7bfc2cd7d9061cd0f1bd4f5cb3a9acf859aeca536b1c57611adfaa9bf7334095e34df4e42253ba37fa30ae76a0df0a9e7091dfa3 diff --git a/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch b/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch deleted file mode 100644 index 95ca0be..0000000 --- a/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 59b9518f072527ac59593e51df7f5d5331a34f0e Mon Sep 17 00:00:00 2001 -From: Thomas Hebb -Date: Wed, 5 Jan 2022 00:16:59 -0800 -Subject: [PATCH] render/gles2: don't constrain shm formats to ones that - support reading - -commit 44e8451cd93e ("render/gles2: hide shm formats without GL -support") added the is_gles2_pixel_format_supported() function to -render/gles2/pixel_format.c, whose stated purpose is to "check whether -the renderer has the needed GL extensions to read a given pixel format." -It then used that function to filter the pixel formats returned by -get_gles2_shm_formats(). - -The result of this change is that RGB formats are no longer reported for -GL drivers that don't implement EXT_read_format_bgra, even when those -formats are supported for rendering (which they have to be for -wlr_gles2_renderer_create() to succeed). This is a pretty clear -regression, since wlr_renderer_init_wl_shm() fails when either of -WL_SHM_FORMAT_ARGB8888 or WL_SHM_FORMAT_XRGB8888 are missing. - -To fix the regression, change is_gles2_pixel_format_supported() to -accept all pixel formats that support rendering, regardless of whether -we can read them or not, and move the check for EXT_read_format_bgra -back into gles2_read_pixels(). (There's already a check for this -extension in gles2_preferred_read_format(), so we're not breaking any -abstraction that wasn't already broken.) - -Tested on the NVIDIA 495.46 proprietary driver, which doesn't support -EXT_read_format_bgra. - -Fixes: 44e8451cd93e ("render/gles2: hide shm formats without GL support") ---- - render/gles2/pixel_format.c | 14 ++++++++++---- - render/gles2/renderer.c | 6 ++++++ - 2 files changed, 16 insertions(+), 4 deletions(-) - -diff --git a/render/gles2/pixel_format.c b/render/gles2/pixel_format.c -index 31bb3908..b155bbbe 100644 ---- a/render/gles2/pixel_format.c -+++ b/render/gles2/pixel_format.c -@@ -98,6 +98,10 @@ static const struct wlr_gles2_pixel_format formats[] = { - - // TODO: more pixel formats - -+/* -+ * Return true if supported for texturing, even if other operations like -+ * reading aren't supported. -+ */ - bool is_gles2_pixel_format_supported(const struct wlr_gles2_renderer *renderer, - const struct wlr_gles2_pixel_format *format) { - if (format->gl_type == GL_UNSIGNED_INT_2_10_10_10_REV_EXT -@@ -108,10 +112,12 @@ bool is_gles2_pixel_format_supported(const struct wlr_gles2_renderer *renderer, - && !renderer->exts.OES_texture_half_float_linear) { - return false; - } -- if (format->gl_format == GL_BGRA_EXT -- && !renderer->exts.EXT_read_format_bgra) { -- return false; -- } -+ /* -+ * Note that we don't need to check for GL_EXT_texture_format_BGRA8888 -+ * here, since we've already checked if we have it at renderer creation -+ * time and bailed out if not. We do the check there because Wayland -+ * requires all compositors to support SHM buffers in that format. -+ */ - return true; - } - -diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c -index 527d85bf..67b8ead4 100644 ---- a/render/gles2/renderer.c -+++ b/render/gles2/renderer.c -@@ -441,6 +441,12 @@ static bool gles2_read_pixels(struct wlr_renderer *wlr_renderer, - return false; - } - -+ if (fmt->gl_format == GL_BGRA_EXT && !renderer->exts.EXT_read_format_bgra) { -+ wlr_log(WLR_ERROR, -+ "Cannot read pixels: missing GL_EXT_read_format_bgra extension"); -+ return false; -+ } -+ - const struct wlr_pixel_format_info *drm_fmt = - drm_get_pixel_format_info(fmt->drm_format); - assert(drm_fmt); --- -GitLab - diff --git a/wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch b/wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch deleted file mode 100644 index 0a89720..0000000 --- a/wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e217d3214da3eb713a18e99b5e456f609606cddb Mon Sep 17 00:00:00 2001 -From: Kirill Primak -Date: Tue, 25 Jan 2022 22:30:36 +0300 -Subject: [PATCH] subsurface: unlock cached state on commit if desynced - -wl_subsurface::set_desync description states: "If cached state exists when -wl_surface.commit is called in desynchronized mode, the pending state is -added to the cached state, and applied as a whole." - -This commit reintroduces an implementation of said behavior, previously -removed in 7daf6da9ac05be2cb74c0983e3caee0b21db75d4. - -Strictly speaking, this logic isn't fully correct, as the cached state -and the pending state are applied individually instead, if the cached -state isn't locked by anything else. However, the end result is still -the same. - -This commit fixes the issue with Firefox permission popups. - -(cherry picked from commit 77951968dc9df7214c04c33f4905a9a7aa92f60c) ---- - types/wlr_surface.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/types/wlr_surface.c b/types/wlr_surface.c -index d5d49571..c51dbbc1 100644 ---- a/types/wlr_surface.c -+++ b/types/wlr_surface.c -@@ -530,6 +530,9 @@ static void subsurface_commit(struct wlr_subsurface *subsurface) { - } - subsurface->has_cache = true; - subsurface->cached_seq = wlr_surface_lock_pending(surface); -+ } else if (subsurface->has_cache) { -+ wlr_surface_unlock_cached(surface, subsurface->cached_seq); -+ subsurface->has_cache = false; - } - } - --- -2.34.1 - diff --git a/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch b/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch deleted file mode 100644 index 2520642..0000000 --- a/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9988eb3378dbc3301059aa9b5e1ff476354cb92b Mon Sep 17 00:00:00 2001 -From: nyorain -Date: Sun, 26 Dec 2021 13:21:54 +0100 -Subject: [PATCH] vulkan: Fix imported image layout - ---- - render/vulkan/renderer.c | 2 +- - render/vulkan/texture.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c -index a1d8d41e..21b36bdd 100644 ---- a/render/vulkan/renderer.c -+++ b/render/vulkan/renderer.c -@@ -598,7 +598,7 @@ static void vulkan_end(struct wlr_renderer *wlr_renderer) { - wl_list_for_each_safe(texture, tmp_tex, &renderer->foreign_textures, foreign_link) { - VkImageLayout src_layout = VK_IMAGE_LAYOUT_GENERAL; - if (!texture->transitioned) { -- src_layout = VK_IMAGE_LAYOUT_PREINITIALIZED; -+ src_layout = VK_IMAGE_LAYOUT_UNDEFINED; - texture->transitioned = true; - } - -diff --git a/render/vulkan/texture.c b/render/vulkan/texture.c -index 76c37011..b705603c 100644 ---- a/render/vulkan/texture.c -+++ b/render/vulkan/texture.c -@@ -438,7 +438,7 @@ VkImage vulkan_import_dmabuf(struct wlr_vk_renderer *renderer, - img_info.arrayLayers = 1; - img_info.samples = VK_SAMPLE_COUNT_1_BIT; - img_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; -- img_info.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED; -+ img_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - img_info.extent = (VkExtent3D) { attribs->width, attribs->height, 1 }; - img_info.usage = for_render ? - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT : --- -GitLab - diff --git a/wlroots.spec b/wlroots.spec index c86ea19..8f6f637 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,8 +2,8 @@ %global abi_ver 10 Name: wlroots -Version: 0.15.0 -Release: 3%{?dist} +Version: 0.15.1 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -25,13 +25,7 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - make it self-contained # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build -# Fix validation errors with Vulkan >= 1.2.197 -Patch0: %{url}/-/commit/9988eb33.patch#/wlroots-0.15.0-vulkan-Fix-imported-image-layout.patch -# Fix support for a certain proprietary driver -Patch1: %{url}/-/commit/59b9518f.patch#/wlroots-0.15.0-render-gles2-don-t-constrain-shm-formats-to-ones-tha.patch -# Fix permission popups in Firefox -# https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3436 -Patch2: wlroots-0.15.0-subsurface-unlock-cached-state-on-commit-if-desynced.patch + %if 0%{?fedora} < 36 # Revert two commits that require wayland 1.20 # Allows module builds on f34 and f35 @@ -134,6 +128,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Feb 05 2022 Aleksei Bavshin - 0.15.1-1 +- Update to 0.15.1 (#2050408) + * Tue Jan 25 2022 Aleksei Bavshin - 0.15.0-3 - Backport fix for permission popups in Firefox From f6055261c4c091a3d7bd9d980c4ba4c69e664bea Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Wed, 1 Jun 2022 23:03:15 -0700 Subject: [PATCH 19/61] Drop patches for wayland 1.19 compatibility --- wlroots-0.15-wayland-1.19-compat.patch | 192 ------------------------- wlroots.spec | 11 +- 2 files changed, 4 insertions(+), 199 deletions(-) delete mode 100644 wlroots-0.15-wayland-1.19-compat.patch diff --git a/wlroots-0.15-wayland-1.19-compat.patch b/wlroots-0.15-wayland-1.19-compat.patch deleted file mode 100644 index 5df1f2f..0000000 --- a/wlroots-0.15-wayland-1.19-compat.patch +++ /dev/null @@ -1,192 +0,0 @@ -From 6d2ad0b3e9b1b3b7d28417be3c1fbb8bfcf5b600 Mon Sep 17 00:00:00 2001 -From: Aleksei Bavshin -Date: Fri, 17 Dec 2021 06:45:20 -0800 -Subject: [PATCH 1/2] Revert "output: add support for protocol interface - version 4" - -This reverts commit e3fefda0235e548e4d23639adfe375edf380825c. ---- - meson.build | 2 +- - types/output/output.c | 32 +++++--------------------------- - 2 files changed, 6 insertions(+), 28 deletions(-) - -diff --git a/meson.build b/meson.build -index 681b07cc..531b34e4 100644 ---- a/meson.build -+++ b/meson.build -@@ -99,7 +99,7 @@ internal_features = { - - wayland_project_options = ['tests=false', 'documentation=false'] - wayland_server = dependency('wayland-server', -- version: '>=1.20', -+ version: '>=1.19', - fallback: ['wayland', 'wayland_server_dep'], - default_options: wayland_project_options, - ) -diff --git a/types/output/output.c b/types/output/output.c -index 85590ab6..2ed8c6f6 100644 ---- a/types/output/output.c -+++ b/types/output/output.c -@@ -13,7 +13,7 @@ - #include "util/global.h" - #include "util/signal.h" - --#define OUTPUT_VERSION 4 -+#define OUTPUT_VERSION 3 - - static void send_geometry(struct wl_resource *resource) { - struct wlr_output *output = wlr_output_from_resource(resource); -@@ -43,23 +43,6 @@ static void send_scale(struct wl_resource *resource) { - } - } - --static void send_name(struct wl_resource *resource) { -- struct wlr_output *output = wlr_output_from_resource(resource); -- uint32_t version = wl_resource_get_version(resource); -- if (version >= WL_OUTPUT_NAME_SINCE_VERSION) { -- wl_output_send_name(resource, output->name); -- } --} -- --static void send_description(struct wl_resource *resource) { -- struct wlr_output *output = wlr_output_from_resource(resource); -- uint32_t version = wl_resource_get_version(resource); -- if (output->description != NULL && -- version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION) { -- wl_output_send_description(resource, output->description); -- } --} -- - static void send_done(struct wl_resource *resource) { - uint32_t version = wl_resource_get_version(resource); - if (version >= WL_OUTPUT_DONE_SINCE_VERSION) { -@@ -104,8 +87,6 @@ static void output_bind(struct wl_client *wl_client, void *data, - send_geometry(resource); - send_current_mode(resource); - send_scale(resource); -- send_name(resource); -- send_description(resource); - send_done(resource); - - struct wlr_output_event_bind evt = { -@@ -150,7 +131,10 @@ static void schedule_done_handle_idle_timer(void *data) { - - struct wl_resource *resource; - wl_resource_for_each(resource, &output->resources) { -- send_done(resource); -+ uint32_t version = wl_resource_get_version(resource); -+ if (version >= WL_OUTPUT_DONE_SINCE_VERSION) { -+ wl_output_send_done(resource); -+ } - } - } - -@@ -360,12 +344,6 @@ void wlr_output_set_description(struct wlr_output *output, const char *desc) { - output->description = NULL; - } - -- struct wl_resource *resource; -- wl_resource_for_each(resource, &output->resources) { -- send_description(resource); -- } -- wlr_output_schedule_done(output); -- - wlr_signal_emit_safe(&output->events.description, output); - } - --- -2.33.1 - - -From 83e6d3cfb3e710b6c69eac8caaf8a000002eddea Mon Sep 17 00:00:00 2001 -From: Aleksei Bavshin -Date: Fri, 17 Dec 2021 06:45:40 -0800 -Subject: [PATCH 2/2] Revert "util/global: remove wl_display arg from - wlr_global_destroy_safe" - -This reverts commit 4377b5529279aa9dab64256d22ad0f2e9009843c. ---- - include/util/global.h | 3 ++- - types/output/output.c | 2 +- - types/seat/wlr_seat.c | 2 +- - types/wlr_drm_lease_v1.c | 2 +- - util/global.c | 4 ++-- - 5 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/include/util/global.h b/include/util/global.h -index 1c979ab1..ea0fda83 100644 ---- a/include/util/global.h -+++ b/include/util/global.h -@@ -9,6 +9,7 @@ - * Globals that are created and destroyed on the fly need special handling to - * prevent race conditions with wl_registry. Use this function to destroy them. - */ --void wlr_global_destroy_safe(struct wl_global *global); -+void wlr_global_destroy_safe(struct wl_global *global, -+ struct wl_display *display); - - #endif -diff --git a/types/output/output.c b/types/output/output.c -index 2ed8c6f6..91a45f13 100644 ---- a/types/output/output.c -+++ b/types/output/output.c -@@ -121,7 +121,7 @@ void wlr_output_destroy_global(struct wlr_output *output) { - wl_list_init(wl_resource_get_link(resource)); - } - -- wlr_global_destroy_safe(output->global); -+ wlr_global_destroy_safe(output->global, output->display); - output->global = NULL; - } - -diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c -index 4933133c..f9314744 100644 ---- a/types/seat/wlr_seat.c -+++ b/types/seat/wlr_seat.c -@@ -191,7 +191,7 @@ void wlr_seat_destroy(struct wlr_seat *seat) { - } - } - -- wlr_global_destroy_safe(seat->global); -+ wlr_global_destroy_safe(seat->global, seat->display); - free(seat->pointer_state.default_grab); - free(seat->keyboard_state.default_grab); - free(seat->touch_state.default_grab); -diff --git a/types/wlr_drm_lease_v1.c b/types/wlr_drm_lease_v1.c -index 7cb9974d..7063e0d3 100644 ---- a/types/wlr_drm_lease_v1.c -+++ b/types/wlr_drm_lease_v1.c -@@ -127,7 +127,7 @@ static void drm_lease_device_v1_destroy( - } - - wl_list_remove(&device->link); -- wlr_global_destroy_safe(device->global); -+ wlr_global_destroy_safe(device->global, device->manager->display); - - free(device); - } -diff --git a/util/global.c b/util/global.c -index fa99a994..a0d84ed3 100644 ---- a/util/global.c -+++ b/util/global.c -@@ -14,7 +14,8 @@ static int destroy_global(void *_data) { - return 0; - } - --void wlr_global_destroy_safe(struct wl_global *global) { -+void wlr_global_destroy_safe(struct wl_global *global, -+ struct wl_display *display) { - // Don't destroy the global immediately. If the global has been created - // recently, clients might try to bind to it after we've destroyed it. - // Instead, remove the global so that clients stop seeing it and wait an -@@ -24,7 +25,6 @@ void wlr_global_destroy_safe(struct wl_global *global) { - wl_global_remove(global); - wl_global_set_user_data(global, NULL); // safety net - -- struct wl_display *display = wl_global_get_display(global); - struct wl_event_loop *event_loop = wl_display_get_event_loop(display); - struct destroy_global_data *data = calloc(1, sizeof(*data)); - if (data == NULL) { --- -2.33.1 - diff --git a/wlroots.spec b/wlroots.spec index 8f6f637..ff04d78 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.15.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -26,12 +26,6 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build -%if 0%{?fedora} < 36 -# Revert two commits that require wayland 1.20 -# Allows module builds on f34 and f35 -Patch100: wlroots-0.15-wayland-1.19-compat.patch -%endif - BuildRequires: gcc BuildRequires: glslang BuildRequires: gnupg2 @@ -128,6 +122,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Jun 01 2022 Aleksei Bavshin - 0.15.1-2 +- Drop patches for wayland 1.19 compatibility + * Sat Feb 05 2022 Aleksei Bavshin - 0.15.1-1 - Update to 0.15.1 (#2050408) From 7d27b16e6f2587289818136d07c597ec0c2d003a Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 25 Jun 2022 21:36:34 -0700 Subject: [PATCH 20/61] Add patches required for phoc 0.20 --- ...ll-error-on-0-dimension-without-anch.patch | 45 ++++++++ ...t_contains_point-handle-outputs-that.patch | 32 ++++++ ...tion-Deduplicate-token-creation-code.patch | 108 ++++++++++++++++++ wlroots.spec | 10 +- 4 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 Revert-layer-shell-error-on-0-dimension-without-anch.patch create mode 100644 wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch create mode 100644 wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch diff --git a/Revert-layer-shell-error-on-0-dimension-without-anch.patch b/Revert-layer-shell-error-on-0-dimension-without-anch.patch new file mode 100644 index 0000000..b993126 --- /dev/null +++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch @@ -0,0 +1,45 @@ +From d5599fca9bdc4580929f904e21b6bc89e3ce8120 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Sat, 25 Jun 2022 21:22:08 -0700 +Subject: [PATCH 1/3] Revert "layer-shell: error on 0 dimension without + anchors" + +This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3. +--- + types/wlr_layer_shell_v1.c | 20 -------------------- + 1 file changed, 20 deletions(-) + +diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c +index 456dbc0e..55a6cfb8 100644 +--- a/types/wlr_layer_shell_v1.c ++++ b/types/wlr_layer_shell_v1.c +@@ -328,26 +328,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { + return; + } + +- const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | +- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT; +- if (surface->pending.desired_width == 0 && +- (surface->pending.anchor & horiz) != horiz) { +- wl_resource_post_error(surface->resource, +- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, +- "width 0 requested without setting left and right anchors"); +- return; +- } +- +- const uint32_t vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | +- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM; +- if (surface->pending.desired_height == 0 && +- (surface->pending.anchor & vert) != vert) { +- wl_resource_post_error(surface->resource, +- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, +- "height 0 requested without setting top and bottom anchors"); +- return; +- } +- + surface->current = surface->pending; + surface->pending.committed = 0; + +-- +2.36.0 + diff --git a/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch b/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch new file mode 100644 index 0000000..8eb3f66 --- /dev/null +++ b/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch @@ -0,0 +1,32 @@ +From 637f12cefc0cd114d86402e793776526fdd66c2e Mon Sep 17 00:00:00 2001 +From: Sebastian Krzyszkowiak +Date: Sat, 5 Mar 2022 08:00:39 +0100 +Subject: [PATCH 2/3] wlr_output_layout_contains_point: handle outputs that + aren't in the layout + +Instead of crashing, return `false` when the specified output isn't part +of the layout, as we can be sure that it doesn't contain the specified +point. + +(cherry picked from commit 13fcdba75cf5f21cfd49c1a05f4fa62f77619b40) +--- + types/wlr_output_layout.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c +index eb672f06..f0f546da 100644 +--- a/types/wlr_output_layout.c ++++ b/types/wlr_output_layout.c +@@ -242,6 +242,9 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout *layout, + if (reference) { + struct wlr_output_layout_output *l_output = + wlr_output_layout_get(layout, reference); ++ if (!l_output) { ++ return false; ++ } + struct wlr_box *box = output_layout_output_get_box(l_output); + return wlr_box_contains_point(box, lx, ly); + } else { +-- +2.36.0 + diff --git a/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch b/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch new file mode 100644 index 0000000..3222c90 --- /dev/null +++ b/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch @@ -0,0 +1,108 @@ +From eed77e4735557eb829aebb82bb8cea9fa0631d6f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Fri, 25 Mar 2022 18:48:58 +0100 +Subject: [PATCH 3/3] xdg-activation: Deduplicate token creation code + +There were three places initializing a token: + +- wlr_xdg_activation_v1_add_token +- wlr_xdg_activation_token_v1_create +- activation_handle_get_activation_token + +The initialization of the token.destroy was missing in the first one. To +prevent these functions from getting out of sync move the token creation +into a common function. + +Fixes 4c59f7d4 ("xdg-activation: Allow to submit tokens") + +(cherry picked from commit dd03d839ab56c3e5d7c607a8d76e58e0b75edb85) +--- + types/wlr_xdg_activation_v1.c | 42 +++++++++++++++++------------------ + 1 file changed, 20 insertions(+), 22 deletions(-) + +diff --git a/types/wlr_xdg_activation_v1.c b/types/wlr_xdg_activation_v1.c +index 208ada28..b610fe17 100644 +--- a/types/wlr_xdg_activation_v1.c ++++ b/types/wlr_xdg_activation_v1.c +@@ -248,15 +248,11 @@ static void activation_handle_destroy(struct wl_client *client, + wl_resource_destroy(activation_resource); + } + +-static void activation_handle_get_activation_token(struct wl_client *client, +- struct wl_resource *activation_resource, uint32_t id) { +- struct wlr_xdg_activation_v1 *activation = +- activation_from_resource(activation_resource); +- ++static struct wlr_xdg_activation_token_v1 *activation_token_create( ++ struct wlr_xdg_activation_v1 *activation) { + struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); + if (token == NULL) { +- wl_client_post_no_memory(client); +- return; ++ return NULL; + } + wl_list_init(&token->link); + wl_list_init(&token->seat_destroy.link); +@@ -265,6 +261,20 @@ static void activation_handle_get_activation_token(struct wl_client *client, + + token->activation = activation; + ++ return token; ++} ++ ++static void activation_handle_get_activation_token(struct wl_client *client, ++ struct wl_resource *activation_resource, uint32_t id) { ++ struct wlr_xdg_activation_v1 *activation = ++ activation_from_resource(activation_resource); ++ ++ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); ++ if (token == NULL) { ++ wl_client_post_no_memory(client); ++ return; ++ } ++ + uint32_t version = wl_resource_get_version(activation_resource); + token->resource = wl_resource_create(client, + &xdg_activation_token_v1_interface, version, id); +@@ -371,19 +381,12 @@ struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create( + + struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_token_v1_create( + struct wlr_xdg_activation_v1 *activation) { +- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); ++ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); ++ + if (token == NULL) { + return NULL; + } + +- wl_list_init(&token->link); +- // Currently no way to set seat/surface +- wl_list_init(&token->seat_destroy.link); +- wl_list_init(&token->surface_destroy.link); +- wl_signal_init(&token->events.destroy); +- +- token->activation = activation; +- + if (!token_init(token)) { + wlr_xdg_activation_token_v1_destroy(token); + return NULL; +@@ -412,15 +415,10 @@ struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_v1_add_token( + struct wlr_xdg_activation_v1 *activation, const char *token_str) { + assert(token_str); + +- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); ++ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); + if (token == NULL) { + return NULL; + } +- wl_list_init(&token->link); +- wl_list_init(&token->seat_destroy.link); +- wl_list_init(&token->surface_destroy.link); +- +- token->activation = activation; + token->token = strdup(token_str); + + wl_list_insert(&activation->tokens, &token->link); +-- +2.36.0 + diff --git a/wlroots.spec b/wlroots.spec index ff04d78..02b4225 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.15.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -26,6 +26,11 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build +# Following 3 patches are required for phoc. +Patch0: Revert-layer-shell-error-on-0-dimension-without-anch.patch +Patch1: wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch +Patch2: wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch + BuildRequires: gcc BuildRequires: glslang BuildRequires: gnupg2 @@ -122,6 +127,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Jun 26 2022 Aleksei Bavshin - 0.15.1-3 +- Add patches required for phoc 0.20 + * Wed Jun 01 2022 Aleksei Bavshin - 0.15.1-2 - Drop patches for wayland 1.19 compatibility From 1a00ea28870d5fc705ebcb85e3439d65420afd97 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 12:31:39 +0000 Subject: [PATCH 21/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 02b4225..6b751e4 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.15.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -127,6 +127,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 0.15.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sun Jun 26 2022 Aleksei Bavshin - 0.15.1-3 - Add patches required for phoc 0.20 From b335d4dcb8ed19b89ee74f0c9295cfc3c8ef2418 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Mon, 14 Nov 2022 22:12:28 -0800 Subject: [PATCH 22/61] Backport upstream crash fix (#2142447) Convert license to SPDX --- ...t_state-Make-sure-to-clear-the-back-.patch | 30 +++++++++++++++++++ wlroots.spec | 18 +++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch diff --git a/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch b/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch new file mode 100644 index 0000000..427866b --- /dev/null +++ b/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch @@ -0,0 +1,30 @@ +From 55c4ffae659ccd15ba40ec9355fcdc2bb68c32b7 Mon Sep 17 00:00:00 2001 +From: Alexander Orzechowski +Date: Sat, 4 Jun 2022 18:18:02 -0400 +Subject: [PATCH] wlr_output_commit_state: Make sure to clear the back buffer + +Fixes: #3445 +--- + types/output/output.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/types/output/output.c b/types/output/output.c +index 85590ab6..4cf0fa8f 100644 +--- a/types/output/output.c ++++ b/types/output/output.c +@@ -654,10 +654,12 @@ bool wlr_output_test(struct wlr_output *output) { + bool wlr_output_commit(struct wlr_output *output) { + if (!output_basic_test(output)) { + wlr_log(WLR_ERROR, "Basic output test failed for %s", output->name); ++ output_clear_back_buffer(output); + return false; + } + + if (!output_ensure_buffer(output)) { ++ output_clear_back_buffer(output); + return false; + } + +-- +2.37.3 + diff --git a/wlroots.spec b/wlroots.spec index 6b751e4..bb3a645 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,11 +3,19 @@ Name: wlroots Version: 0.15.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but -# - LGPLv2.1+ +# - HPND-sell-variant +# * protocol/drm.xml +# * protocol/wlr-data-control-unstable-v1.xml +# * protocol/wlr-foreign-toplevel-management-unstable-v1.xml +# * protocol/wlr-gamma-control-unstable-v1.xml +# * protocol/wlr-input-inhibitor-unstable-v1.xml +# * protocol/wlr-layer-shell-unstable-v1.xml +# * protocol/wlr-output-management-unstable-v1.xml +# - LGPL-2.1-or-later # * protocol/idle.xml # * protocol/server-decoration.xml # Those files are processed to C-compilable files by the @@ -30,6 +38,8 @@ Source3: examples.meson.build Patch0: Revert-layer-shell-error-on-0-dimension-without-anch.patch Patch1: wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch Patch2: wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch +# wlroots/wlroots!3601 +Patch3: wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch BuildRequires: gcc BuildRequires: glslang @@ -127,6 +137,10 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Mon Nov 14 2022 Aleksei Bavshin - 0.15.1-5 +- Backport upstream crash fix (#2142447) +- Convert license to SPDX + * Sat Jul 23 2022 Fedora Release Engineering - 0.15.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 3993c57fb93fec57cecccb0371426df9ba84713a Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 2 Dec 2022 22:05:54 -0800 Subject: [PATCH 23/61] Update to 0.16.0 (#2142159) --- ...ll-error-on-0-dimension-without-anch.patch | 15 +- sources | 4 +- ...t_state-Make-sure-to-clear-the-back-.patch | 30 -- ...t_contains_point-handle-outputs-that.patch | 32 -- ...tion-Deduplicate-token-creation-code.patch | 108 ----- wlroots-0.16-backports.patch | 454 ++++++++++++++++++ wlroots.spec | 39 +- 7 files changed, 482 insertions(+), 200 deletions(-) delete mode 100644 wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch delete mode 100644 wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch delete mode 100644 wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch create mode 100644 wlroots-0.16-backports.patch diff --git a/Revert-layer-shell-error-on-0-dimension-without-anch.patch b/Revert-layer-shell-error-on-0-dimension-without-anch.patch index b993126..430fb55 100644 --- a/Revert-layer-shell-error-on-0-dimension-without-anch.patch +++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch @@ -1,8 +1,7 @@ -From d5599fca9bdc4580929f904e21b6bc89e3ce8120 Mon Sep 17 00:00:00 2001 +From 05a740206a73c6aab3762eb449b0733e5b9a4c7a Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 25 Jun 2022 21:22:08 -0700 -Subject: [PATCH 1/3] Revert "layer-shell: error on 0 dimension without - anchors" +Subject: [PATCH] Revert "layer-shell: error on 0 dimension without anchors" This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3. --- @@ -10,12 +9,12 @@ This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3. 1 file changed, 20 deletions(-) diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c -index 456dbc0e..55a6cfb8 100644 +index fa054d3c..062fa96d 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c -@@ -328,26 +328,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { - return; - } +@@ -316,26 +316,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { + struct wlr_layer_surface_v1 *surface = + wlr_layer_surface_v1_from_wlr_surface(wlr_surface); - const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | - ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT; @@ -41,5 +40,5 @@ index 456dbc0e..55a6cfb8 100644 surface->pending.committed = 0; -- -2.36.0 +2.37.3 diff --git a/sources b/sources index 4500362..12a60d6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.15.1.tar.gz) = 6228160f2f350a406c612f1048d7075cf2f78206cc84bc16f889d5d0acd614f9e98845fffed03d7067cfdbd7558b77fcc5d8cedc3868d866e476523126a63677 -SHA512 (wlroots-0.15.1.tar.gz.sig) = c264274b132307276395648e7bfc2cd7d9061cd0f1bd4f5cb3a9acf859aeca536b1c57611adfaa9bf7334095e34df4e42253ba37fa30ae76a0df0a9e7091dfa3 +SHA512 (wlroots-0.16.0.tar.gz) = f5a7ea444f77ec563a4cf40831c43fbe8593a61a31cc9e04f45abf0603d9dab11b90e0f7cda0cd65df40c36257377c101bbbd9e4cb9dd5cde0baa7abb558cc87 +SHA512 (wlroots-0.16.0.tar.gz.sig) = 98d0579f8a4b863f2c57cfcd9849811ac2bf5945b5b2511c7e1eb4f73e5db8af02265e9fa2e5b3330af141506b1d4e3c22a35cd8669ebd5633388e3c6bc5d2d3 diff --git a/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch b/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch deleted file mode 100644 index 427866b..0000000 --- a/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 55c4ffae659ccd15ba40ec9355fcdc2bb68c32b7 Mon Sep 17 00:00:00 2001 -From: Alexander Orzechowski -Date: Sat, 4 Jun 2022 18:18:02 -0400 -Subject: [PATCH] wlr_output_commit_state: Make sure to clear the back buffer - -Fixes: #3445 ---- - types/output/output.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/types/output/output.c b/types/output/output.c -index 85590ab6..4cf0fa8f 100644 ---- a/types/output/output.c -+++ b/types/output/output.c -@@ -654,10 +654,12 @@ bool wlr_output_test(struct wlr_output *output) { - bool wlr_output_commit(struct wlr_output *output) { - if (!output_basic_test(output)) { - wlr_log(WLR_ERROR, "Basic output test failed for %s", output->name); -+ output_clear_back_buffer(output); - return false; - } - - if (!output_ensure_buffer(output)) { -+ output_clear_back_buffer(output); - return false; - } - --- -2.37.3 - diff --git a/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch b/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch deleted file mode 100644 index 8eb3f66..0000000 --- a/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 637f12cefc0cd114d86402e793776526fdd66c2e Mon Sep 17 00:00:00 2001 -From: Sebastian Krzyszkowiak -Date: Sat, 5 Mar 2022 08:00:39 +0100 -Subject: [PATCH 2/3] wlr_output_layout_contains_point: handle outputs that - aren't in the layout - -Instead of crashing, return `false` when the specified output isn't part -of the layout, as we can be sure that it doesn't contain the specified -point. - -(cherry picked from commit 13fcdba75cf5f21cfd49c1a05f4fa62f77619b40) ---- - types/wlr_output_layout.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c -index eb672f06..f0f546da 100644 ---- a/types/wlr_output_layout.c -+++ b/types/wlr_output_layout.c -@@ -242,6 +242,9 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout *layout, - if (reference) { - struct wlr_output_layout_output *l_output = - wlr_output_layout_get(layout, reference); -+ if (!l_output) { -+ return false; -+ } - struct wlr_box *box = output_layout_output_get_box(l_output); - return wlr_box_contains_point(box, lx, ly); - } else { --- -2.36.0 - diff --git a/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch b/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch deleted file mode 100644 index 3222c90..0000000 --- a/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch +++ /dev/null @@ -1,108 +0,0 @@ -From eed77e4735557eb829aebb82bb8cea9fa0631d6f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Guido=20G=C3=BCnther?= -Date: Fri, 25 Mar 2022 18:48:58 +0100 -Subject: [PATCH 3/3] xdg-activation: Deduplicate token creation code - -There were three places initializing a token: - -- wlr_xdg_activation_v1_add_token -- wlr_xdg_activation_token_v1_create -- activation_handle_get_activation_token - -The initialization of the token.destroy was missing in the first one. To -prevent these functions from getting out of sync move the token creation -into a common function. - -Fixes 4c59f7d4 ("xdg-activation: Allow to submit tokens") - -(cherry picked from commit dd03d839ab56c3e5d7c607a8d76e58e0b75edb85) ---- - types/wlr_xdg_activation_v1.c | 42 +++++++++++++++++------------------ - 1 file changed, 20 insertions(+), 22 deletions(-) - -diff --git a/types/wlr_xdg_activation_v1.c b/types/wlr_xdg_activation_v1.c -index 208ada28..b610fe17 100644 ---- a/types/wlr_xdg_activation_v1.c -+++ b/types/wlr_xdg_activation_v1.c -@@ -248,15 +248,11 @@ static void activation_handle_destroy(struct wl_client *client, - wl_resource_destroy(activation_resource); - } - --static void activation_handle_get_activation_token(struct wl_client *client, -- struct wl_resource *activation_resource, uint32_t id) { -- struct wlr_xdg_activation_v1 *activation = -- activation_from_resource(activation_resource); -- -+static struct wlr_xdg_activation_token_v1 *activation_token_create( -+ struct wlr_xdg_activation_v1 *activation) { - struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); - if (token == NULL) { -- wl_client_post_no_memory(client); -- return; -+ return NULL; - } - wl_list_init(&token->link); - wl_list_init(&token->seat_destroy.link); -@@ -265,6 +261,20 @@ static void activation_handle_get_activation_token(struct wl_client *client, - - token->activation = activation; - -+ return token; -+} -+ -+static void activation_handle_get_activation_token(struct wl_client *client, -+ struct wl_resource *activation_resource, uint32_t id) { -+ struct wlr_xdg_activation_v1 *activation = -+ activation_from_resource(activation_resource); -+ -+ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); -+ if (token == NULL) { -+ wl_client_post_no_memory(client); -+ return; -+ } -+ - uint32_t version = wl_resource_get_version(activation_resource); - token->resource = wl_resource_create(client, - &xdg_activation_token_v1_interface, version, id); -@@ -371,19 +381,12 @@ struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create( - - struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_token_v1_create( - struct wlr_xdg_activation_v1 *activation) { -- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); -+ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); -+ - if (token == NULL) { - return NULL; - } - -- wl_list_init(&token->link); -- // Currently no way to set seat/surface -- wl_list_init(&token->seat_destroy.link); -- wl_list_init(&token->surface_destroy.link); -- wl_signal_init(&token->events.destroy); -- -- token->activation = activation; -- - if (!token_init(token)) { - wlr_xdg_activation_token_v1_destroy(token); - return NULL; -@@ -412,15 +415,10 @@ struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_v1_add_token( - struct wlr_xdg_activation_v1 *activation, const char *token_str) { - assert(token_str); - -- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); -+ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); - if (token == NULL) { - return NULL; - } -- wl_list_init(&token->link); -- wl_list_init(&token->seat_destroy.link); -- wl_list_init(&token->surface_destroy.link); -- -- token->activation = activation; - token->token = strdup(token_str); - - wl_list_insert(&activation->tokens, &token->link); --- -2.36.0 - diff --git a/wlroots-0.16-backports.patch b/wlroots-0.16-backports.patch new file mode 100644 index 0000000..ed9b7a9 --- /dev/null +++ b/wlroots-0.16-backports.patch @@ -0,0 +1,454 @@ +From bc6422115cf0dd0c065d3a6ec4d1ac363aad39fd Mon Sep 17 00:00:00 2001 +From: Simon Zeni +Date: Fri, 11 Nov 2022 14:52:24 -0500 +Subject: [PATCH 01/12] render/egl: fix uninitialized pointers in + init_dmabuf_formats + +`modifiers` and `external_only` are never initialized, and free'd later. This +commit explicitly initializes them to NULL to prevent segfaults on `free()` + +(cherry picked from commit ed71915742160f2b9157adbad79364e22ab7ebda) +--- + render/egl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/render/egl.c b/render/egl.c +index e3839c7d..0c25e036 100644 +--- a/render/egl.c ++++ b/render/egl.c +@@ -124,8 +124,8 @@ static void init_dmabuf_formats(struct wlr_egl *egl) { + for (int i = 0; i < formats_len; i++) { + uint32_t fmt = formats[i]; + +- uint64_t *modifiers; +- EGLBoolean *external_only; ++ uint64_t *modifiers = NULL; ++ EGLBoolean *external_only = NULL; + int modifiers_len = 0; + if (!no_modifiers) { + modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers, &external_only); +-- +2.38.1 + + +From a6ff023df291a770fb907a88ca39b9ee5b1cc89e Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Tue, 15 Nov 2022 10:55:38 +0100 +Subject: [PATCH 02/12] backend/drm: only request page-flip if active + +It doesn't make sense to request a page-flip for a disabled output. + +Fixes: 84e727daae67 ("backend/drm: request page-flip event on modeset") +Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3528 +(cherry picked from commit f863b93c05a73097ccddce1ed066f3f11bfb1c3e) +--- + backend/drm/drm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 04994c68..1f4e74c5 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -577,7 +577,7 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, + return false; + } + } +- if (pending.modeset) { ++ if (pending.modeset && pending.active) { + flags |= DRM_MODE_PAGE_FLIP_EVENT; + } + +-- +2.38.1 + + +From 990cba89662c5d892dd8e045e737b6ada2f6d1ae Mon Sep 17 00:00:00 2001 +From: bi4k8 +Date: Tue, 15 Nov 2022 01:00:27 +0000 +Subject: [PATCH 03/12] wlr_seat: clear `drag->seat_client` when destroyed + +This was previously a use-after-free in `wlr_drag.c`. + +(cherry picked from commit 8b12037cadb2422a10d948babc4fd77ce637f158) +--- + types/data_device/wlr_drag.c | 6 +++--- + types/seat/wlr_seat.c | 4 ++++ + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c +index d3cb979d..c1fa801b 100644 +--- a/types/data_device/wlr_drag.c ++++ b/types/data_device/wlr_drag.c +@@ -55,14 +55,14 @@ static void drag_set_focus(struct wlr_drag *drag, + goto out; + } + +- if (!drag->source && ++ if (!drag->source && drag->seat_client && + wl_resource_get_client(surface->resource) != + drag->seat_client->client) { + goto out; + } + + struct wlr_seat_client *focus_client = wlr_seat_client_for_wl_client( +- drag->seat_client->seat, wl_resource_get_client(surface->resource)); ++ drag->seat, wl_resource_get_client(surface->resource)); + if (!focus_client) { + goto out; + } +@@ -71,7 +71,7 @@ static void drag_set_focus(struct wlr_drag *drag, + drag->source->accepted = false; + + uint32_t serial = +- wl_display_next_serial(drag->seat_client->seat->display); ++ wl_display_next_serial(drag->seat->display); + + struct wl_resource *device_resource; + wl_resource_for_each(device_resource, &focus_client->data_devices) { +diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c +index 59b760ca..f83ccd6d 100644 +--- a/types/seat/wlr_seat.c ++++ b/types/seat/wlr_seat.c +@@ -75,6 +75,10 @@ static void seat_client_handle_resource_destroy( + client->seat->keyboard_state.focused_client = NULL; + } + ++ if (client->seat->drag && client == client->seat->drag->seat_client) { ++ client->seat->drag->seat_client = NULL; ++ } ++ + struct wl_resource *resource, *tmp; + wl_resource_for_each_safe(resource, tmp, &client->pointers) { + wl_resource_destroy(resource); +-- +2.38.1 + + +From b9b6334639bed442e039b61ec902692da557d4de Mon Sep 17 00:00:00 2001 +From: Kirill Primak +Date: Sun, 13 Nov 2022 01:30:22 +0300 +Subject: [PATCH 04/12] xwayland: fix wlr_xwayland_surface_from_wlr_surface() + docs + +32daa43a454bcea1306ad0976fd4161ce8c7e86f has removed the asymmetry in +the relationship of a wlr_surface and an unmapped wlr_xwayland_surface, +when wlr_surface.role_data wasn't NULL but wlr_xwayland_surface.surface +was. However, this also means that +wlr_xwayland_surface_from_wlr_surface() now returns NULL if the +wlr_surface is unmapped. Fix the documentation to reflect this. + +(cherry picked from commit 627a5c511278e67c3c308cdc6a639cbb490f48c3) +--- + include/wlr/xwayland/xwayland.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h +index fd161937..372ab9a8 100644 +--- a/include/wlr/xwayland/xwayland.h ++++ b/include/wlr/xwayland/xwayland.h +@@ -232,7 +232,7 @@ bool wlr_surface_is_xwayland_surface(struct wlr_surface *surface); + * Get a struct wlr_xwayland_surface from a struct wlr_surface. + * Asserts that the surface has the xwayland surface role. + * May return NULL even if the surface has the xwayland surface role if the +- * corresponding xwayland surface has been destroyed. ++ * corresponding xwayland surface has been unmapped or destroyed. + */ + struct wlr_xwayland_surface *wlr_xwayland_surface_from_wlr_surface( + struct wlr_surface *surface); +-- +2.38.1 + + +From e169ebb8cfbdb92f932b3f973e20ce79495bd983 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Thu, 10 Nov 2022 12:28:34 +0100 +Subject: [PATCH 05/12] backend/drm: log refresh rate in Hz + +(cherry picked from commit b3da33116ea9fb3ef948ae72425534b43c217579) +--- + backend/drm/drm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 1f4e74c5..55f95c91 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -1302,9 +1302,9 @@ static void connect_drm_connector(struct wlr_drm_connector *wlr_conn, + wlr_conn->crtc->mode_id = mode_id; + } + +- wlr_log(WLR_INFO, " %"PRId32"x%"PRId32"@%"PRId32" %s", ++ wlr_log(WLR_INFO, " %"PRId32"x%"PRId32" @ %.3f Hz %s", + mode->wlr_mode.width, mode->wlr_mode.height, +- mode->wlr_mode.refresh, ++ (float)mode->wlr_mode.refresh / 1000, + mode->wlr_mode.preferred ? "(preferred)" : ""); + + wl_list_insert(wlr_conn->output.modes.prev, &mode->wlr_mode.link); +-- +2.38.1 + + +From 356ac5eed90a2c8b899dbfaf8a7a17237868adeb Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Thu, 10 Nov 2022 12:28:53 +0100 +Subject: [PATCH 06/12] backend/drm: log modesetting commits + +(cherry picked from commit 65836ce357e4140d4e5250228a05ddd96119a883) +--- + backend/drm/drm.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 55f95c91..74265d4f 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -581,6 +581,12 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, + flags |= DRM_MODE_PAGE_FLIP_EVENT; + } + ++ if (pending.modeset) { ++ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", ++ pending.mode.hdisplay, pending.mode.vdisplay, ++ (float)calculate_refresh_rate(&pending.mode) / 1000); ++ } ++ + if (!drm_crtc_commit(conn, &pending, flags, false)) { + return false; + } +-- +2.38.1 + + +From 9c5445148235109b4fb986138c6294db4d0334d8 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Tue, 15 Nov 2022 10:06:23 +0100 +Subject: [PATCH 07/12] backend/drm: fix FPE when disabling output + +Fixes: 65836ce357e4 ("backend/drm: log modesetting commits") +Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3534 +(cherry picked from commit a40ba16a6414f72ae0224164bb08cd8479dc52ee) +--- + backend/drm/drm.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 74265d4f..a7ff585e 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -582,9 +582,13 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, + } + + if (pending.modeset) { +- wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", +- pending.mode.hdisplay, pending.mode.vdisplay, +- (float)calculate_refresh_rate(&pending.mode) / 1000); ++ if (pending.active) { ++ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", ++ pending.mode.hdisplay, pending.mode.vdisplay, ++ (float)calculate_refresh_rate(&pending.mode) / 1000); ++ } else { ++ wlr_drm_conn_log(conn, WLR_INFO, "Turning off"); ++ } + } + + if (!drm_crtc_commit(conn, &pending, flags, false)) { +-- +2.38.1 + + +From 724bc296f5a3dce3b619cf089b711cff3a8ece37 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Thu, 24 Nov 2022 22:38:29 +0100 +Subject: [PATCH 08/12] seat/pointer: Initialize low_res_value + +Fixes + + In file included from /usr/include/wayland-server-core.h:32, + from ../types/seat/wlr_seat_pointer.c:6: + In function 'wl_fixed_from_double', + inlined from 'wlr_seat_pointer_send_axis' at ../types/seat/wlr_seat_pointer.c:367:6: + /usr/include/wayland-util.h:641:17: error: 'low_res_value' may be used uninitialized [-Werror=maybe-uninitialized] + 641 | u.d = d + (3LL << (51 - 8)); + | ~~^~~~~~~~~~~~~~~~~~~ + ../types/seat/wlr_seat_pointer.c: In function 'wlr_seat_pointer_send_axis': + ../types/seat/wlr_seat_pointer.c:329:16: note: 'low_res_value' was declared here + 329 | double low_res_value; + | ^~~~~~~~~~~~~ +--- + types/seat/wlr_seat_pointer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c +index 8d6154b0..ffa706bd 100644 +--- a/types/seat/wlr_seat_pointer.c ++++ b/types/seat/wlr_seat_pointer.c +@@ -326,7 +326,7 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time, + send_source = true; + } + +- double low_res_value; ++ double low_res_value = 0.0; + int32_t low_res_value_discrete = 0; + update_value120_accumulators(client, orientation, value, value_discrete, + &low_res_value, &low_res_value_discrete); +-- +2.38.1 + + +From 4892082836399fda80dd55671c46b005f0451c5c Mon Sep 17 00:00:00 2001 +From: Johan Malm +Date: Sat, 26 Nov 2022 17:18:33 +0000 +Subject: [PATCH 09/12] scene/layer_shell_v1.c: set exclusive zone correctly + +...when only one edge is anchored. + +The layer-shell protocol specifies that a positive exclusive-zone value is +'meaningful' if the surface is anchored to either: + +1. one edge +2. one edge and both perpendicular edges. + +For example, if you wish to position a layer-shell client along the top +edge and make it exclusive, you should be able to either set anchor=TOP or +anchor=TOP|LEFT|RIGHT. It appears that many panels/bars use the latter +approach (anchor to an edge and also both perpendicular edges) which is +probably why this has not been reported previously. + +This patch adds support for the first case and thereby makes exclusive +zone behaviour consistent with the protocol and also with sway's extant +layer-shell implementation. + +(cherry picked from commit 8e80432a72b18a1ddbacdb08ff0c41645578f1ee) +--- + types/scene/layer_shell_v1.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c +index 22986983..e523d315 100644 +--- a/types/scene/layer_shell_v1.c ++++ b/types/scene/layer_shell_v1.c +@@ -39,6 +39,7 @@ static void layer_surface_exclusive_zone( + struct wlr_layer_surface_v1_state *state, + struct wlr_box *usable_area) { + switch (state->anchor) { ++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP: + case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | + ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | + ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): +@@ -46,12 +47,14 @@ static void layer_surface_exclusive_zone( + usable_area->y += state->exclusive_zone + state->margin.top; + usable_area->height -= state->exclusive_zone + state->margin.top; + break; ++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM: + case (ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | + ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | + ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): + // Anchor bottom + usable_area->height -= state->exclusive_zone + state->margin.bottom; + break; ++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT: + case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | + ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | + ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT): +@@ -59,6 +62,7 @@ static void layer_surface_exclusive_zone( + usable_area->x += state->exclusive_zone + state->margin.left; + usable_area->width -= state->exclusive_zone + state->margin.left; + break; ++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT: + case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | + ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | + ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right +-- +2.38.1 + + +From e0fe72ffdd66bcf2f43f728858d745171498d58d Mon Sep 17 00:00:00 2001 +From: Johan Malm +Date: Sat, 26 Nov 2022 17:23:51 +0000 +Subject: [PATCH 10/12] scene/layer_shell_v1.c: remove redundant comment + +(cherry picked from commit 338e0a3976f2bad5ec048b022648a671ed443b4f) +--- + types/scene/layer_shell_v1.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c +index e523d315..3ed616a9 100644 +--- a/types/scene/layer_shell_v1.c ++++ b/types/scene/layer_shell_v1.c +@@ -65,7 +65,7 @@ static void layer_surface_exclusive_zone( + case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT: + case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | + ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | +- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right ++ ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): + // Anchor right + usable_area->width -= state->exclusive_zone + state->margin.right; + break; +-- +2.38.1 + + +From de5e091996bfa58a0a93fac38a45235b7cb06488 Mon Sep 17 00:00:00 2001 +From: Simon Zeni +Date: Tue, 29 Nov 2022 15:21:18 -0500 +Subject: [PATCH 11/12] types/wlr_seat: finish keyboard_state during + wlr_seat_destroy + +(cherry picked from commit 0611c10909b17276bd633a4ee9a322995e9a3580) +--- + types/seat/wlr_seat.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c +index f83ccd6d..c2985824 100644 +--- a/types/seat/wlr_seat.c ++++ b/types/seat/wlr_seat.c +@@ -179,6 +179,8 @@ void wlr_seat_destroy(struct wlr_seat *seat) { + wlr_seat_pointer_clear_focus(seat); + wlr_seat_keyboard_clear_focus(seat); + ++ wlr_seat_set_keyboard(seat, NULL); ++ + struct wlr_touch_point *point; + wl_list_for_each(point, &seat->touch_state.touch_points, link) { + wlr_seat_touch_point_clear_focus(seat, 0, point->touch_id); +-- +2.38.1 + + +From f1bea43ccccd5824097d8660a2d20b5d0bf506be Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Wed, 30 Nov 2022 15:58:08 +0100 +Subject: [PATCH 12/12] Revert "compositor: enforce surface destruction order" + +This reverts commit c09d3450d494e21f065c12f199fa5ba8bfd946a9. + +This doesn't play well with the Xwayland surface role. +--- + types/wlr_compositor.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c +index 5e6de244..fa4a8aa5 100644 +--- a/types/wlr_compositor.c ++++ b/types/wlr_compositor.c +@@ -36,14 +36,6 @@ static int max(int fst, int snd) { + + static void surface_handle_destroy(struct wl_client *client, + struct wl_resource *resource) { +- struct wlr_surface *surface = wlr_surface_from_resource(resource); +- if (surface->role_data != NULL) { +- // TODO: send WL_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT +- // https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/278 +- wl_resource_post_error(resource, -1, +- "surface was destroyed before its role object"); +- return; +- } + wl_resource_destroy(resource); + } + +-- +2.38.1 + diff --git a/wlroots.spec b/wlroots.spec index bb3a645..d57bcc8 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,9 +1,9 @@ # Version of the .so library -%global abi_ver 10 +%global abi_ver 11 Name: wlroots -Version: 0.15.1 -Release: 5%{?dist} +Version: 0.16.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -34,32 +34,32 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk # - only has targets for examples known to compile well (cf. "examples) global) Source3: examples.meson.build -# Following 3 patches are required for phoc. -Patch0: Revert-layer-shell-error-on-0-dimension-without-anch.patch -Patch1: wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch -Patch2: wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch -# wlroots/wlroots!3601 -Patch3: wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch +# Upstream patches +# Backports for 0.16.1 bugfix release: git format-patch --stdout 0.16.0..0.16 +Patch0: wlroots-0.16-backports.patch + +# Fedora patches +# Following patch is required for phoc. +Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch BuildRequires: gcc BuildRequires: glslang BuildRequires: gnupg2 -BuildRequires: meson >= 0.58.1 +BuildRequires: meson >= 0.59.0 BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) -BuildRequires: pkgconfig(libdrm) >= 2.4.109 -BuildRequires: pkgconfig(libinput) >= 1.14.0 +BuildRequires: pkgconfig(hwdata) +BuildRequires: pkgconfig(libdrm) >= 2.4.113 +BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) -BuildRequires: pkgconfig(libsystemd) >= 237 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(wayland-client) -BuildRequires: pkgconfig(wayland-egl) -BuildRequires: pkgconfig(wayland-protocols) >= 1.24 +BuildRequires: pkgconfig(wayland-protocols) >= 1.27 BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-server) >= 1.19 +BuildRequires: pkgconfig(wayland-server) >= 1.21 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-icccm) @@ -99,10 +99,6 @@ MESON_OPTIONS=( # Disable options requiring extra/unpackaged dependencies -Dexamples=false -Dxcb-errors=disabled -%ifarch s390x - # Disable -Werror on s390x: https://github.com/swaywm/wlroots/issues/2018 - -Dwerror=false -%endif ) %{meson} "${MESON_OPTIONS[@]}" @@ -137,6 +133,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri Dec 02 2022 Aleksei Bavshin - 0.16.0-1 +- Update to 0.16.0 (#2142159) + * Mon Nov 14 2022 Aleksei Bavshin - 0.15.1-5 - Backport upstream crash fix (#2142447) - Convert license to SPDX From 83a52a28622c782b40ddd68d0ccf5ca39fe5c056 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 2 Dec 2022 22:06:59 -0800 Subject: [PATCH 24/61] Add patch for compatibility with older libdrm --- wlroots-0.16-libdrm-2.4.109-compat.patch | 241 +++++++++++++++++++++++ wlroots.spec | 14 +- 2 files changed, 253 insertions(+), 2 deletions(-) create mode 100644 wlroots-0.16-libdrm-2.4.109-compat.patch diff --git a/wlroots-0.16-libdrm-2.4.109-compat.patch b/wlroots-0.16-libdrm-2.4.109-compat.patch new file mode 100644 index 0000000..997cf49 --- /dev/null +++ b/wlroots-0.16-libdrm-2.4.109-compat.patch @@ -0,0 +1,241 @@ +From 05ec8d7a160aa5fb1a7fb47c6711e3e95348fbf7 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Tue, 8 Nov 2022 18:37:13 -0800 +Subject: [PATCH 1/2] Compatibility with libdrm 2.4.112 + +--- + meson.build | 2 +- + render/allocator/gbm.c | 7 ++----- + render/egl.c | 5 +---- + render/vulkan/pixel_format.c | 6 ++---- + types/output/render.c | 7 ++----- + 5 files changed, 8 insertions(+), 19 deletions(-) + +diff --git a/meson.build b/meson.build +index 5dd38e1a..b2fbcf33 100644 +--- a/meson.build ++++ b/meson.build +@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server', + ) + + drm = dependency('libdrm', +- version: '>=2.4.113', ++ version: '>=2.4.112', + fallback: 'libdrm', + default_options: [ + 'intel=disabled', +diff --git a/render/allocator/gbm.c b/render/allocator/gbm.c +index f77fedd8..805d80e3 100644 +--- a/render/allocator/gbm.c ++++ b/render/allocator/gbm.c +@@ -138,14 +138,11 @@ static struct wlr_gbm_buffer *create_buffer(struct wlr_gbm_allocator *alloc, + buffer->dmabuf.modifier = fallback_modifier; + } + +- char *format_name = drmGetFormatName(buffer->dmabuf.format); + char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier); + wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer " +- "with format %s (0x%08"PRIX32"), modifier %s (0x%016"PRIX64")", +- buffer->base.width, buffer->base.height, +- format_name ? format_name : "", buffer->dmabuf.format, ++ "with format 0x%08"PRIX32", modifier %s (0x%016"PRIX64")", ++ buffer->base.width, buffer->base.height, buffer->dmabuf.format, + modifier_name ? modifier_name : "", buffer->dmabuf.modifier); +- free(format_name); + free(modifier_name); + + return buffer; +diff --git a/render/egl.c b/render/egl.c +index e3839c7d..13068fe2 100644 +--- a/render/egl.c ++++ b/render/egl.c +@@ -161,10 +161,7 @@ static void init_dmabuf_formats(struct wlr_egl *egl) { + } + + if (wlr_log_get_verbosity() >= WLR_DEBUG) { +- char *fmt_name = drmGetFormatName(fmt); +- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")", +- fmt_name ? fmt_name : "", fmt); +- free(fmt_name); ++ wlr_log(WLR_DEBUG, " 0x%08"PRIX32"", fmt); + + log_modifier(DRM_FORMAT_MOD_INVALID, false); + if (modifiers_len == 0) { +diff --git a/render/vulkan/pixel_format.c b/render/vulkan/pixel_format.c +index f55063d7..d0008648 100644 +--- a/render/vulkan/pixel_format.c ++++ b/render/vulkan/pixel_format.c +@@ -234,10 +234,8 @@ void vulkan_format_props_query(struct wlr_vk_device *dev, + const struct wlr_vk_format *format) { + VkResult res; + +- char *format_name = drmGetFormatName(format->drm_format); +- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")", +- format_name ? format_name : "", format->drm_format); +- free(format_name); ++ wlr_log(WLR_DEBUG, " %.4s (0x08%"PRIx32")", ++ (const char *)&format->drm_format, format->drm_format); + + // get general features and modifiers + VkFormatProperties2 fmtp = {0}; +diff --git a/types/output/render.c b/types/output/render.c +index 13d714e1..862f67f5 100644 +--- a/types/output/render.c ++++ b/types/output/render.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include "backend/backend.h" + #include "render/allocator/allocator.h" + #include "render/drm_format_set.h" +@@ -71,10 +70,8 @@ static bool output_create_swapchain(struct wlr_output *output, + return true; + } + +- char *format_name = drmGetFormatName(format->format); +- wlr_log(WLR_DEBUG, "Choosing primary buffer format %s (0x%08"PRIX32") for output '%s'", +- format_name ? format_name : "", format->format, output->name); +- free(format_name); ++ wlr_log(WLR_DEBUG, "Choosing primary buffer format 0x%"PRIX32" for output '%s'", ++ format->format, output->name); + + if (!allow_modifiers && (format->len != 1 || format->modifiers[0] != DRM_FORMAT_MOD_LINEAR)) { + if (!wlr_drm_format_has(format, DRM_FORMAT_MOD_INVALID)) { +-- +2.37.3 + + +From 99798f45c7a407c2a97c7ac2883c348b8e71c8c1 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Tue, 8 Nov 2022 18:37:51 -0800 +Subject: [PATCH 2/2] Compatibility with libdrm 2.4.109 + +--- + backend/drm/drm.c | 29 ++++++++++++++++++++--------- + backend/drm/util.c | 31 +++++++++++++++++++++++++++++++ + include/backend/drm/util.h | 2 ++ + meson.build | 2 +- + 4 files changed, 54 insertions(+), 10 deletions(-) + +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 04994c68..9576de17 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -1141,6 +1141,23 @@ static struct wlr_drm_crtc *connector_get_current_crtc( + return NULL; + } + ++static uint32_t get_possible_crtcs(int fd, const drmModeConnector *conn) { ++ uint32_t possible_crtcs = 0; ++ ++ for (int i = 0; i < conn->count_encoders; ++i) { ++ drmModeEncoder *enc = drmModeGetEncoder(fd, conn->encoders[i]); ++ if (!enc) { ++ continue; ++ } ++ ++ possible_crtcs |= enc->possible_crtcs; ++ ++ drmModeFreeEncoder(enc); ++ } ++ ++ return possible_crtcs; ++} ++ + static struct wlr_drm_connector *create_drm_connector(struct wlr_drm_backend *drm, + const drmModeConnector *drm_conn) { + struct wlr_drm_connector *wlr_conn = calloc(1, sizeof(*wlr_conn)); +@@ -1153,17 +1170,11 @@ static struct wlr_drm_connector *create_drm_connector(struct wlr_drm_backend *dr + wlr_conn->status = DRM_MODE_DISCONNECTED; + wlr_conn->id = drm_conn->connector_id; + +- const char *conn_name = +- drmModeGetConnectorTypeName(drm_conn->connector_type); +- if (conn_name == NULL) { +- conn_name = "Unknown"; +- } +- + snprintf(wlr_conn->name, sizeof(wlr_conn->name), +- "%s-%"PRIu32, conn_name, drm_conn->connector_type_id); ++ "%s-%"PRIu32, conn_get_name(drm_conn->connector_type), ++ drm_conn->connector_type_id); + +- wlr_conn->possible_crtcs = +- drmModeConnectorGetPossibleCrtcs(drm->fd, drm_conn); ++ wlr_conn->possible_crtcs = get_possible_crtcs(drm->fd, drm_conn); + if (wlr_conn->possible_crtcs == 0) { + wlr_drm_conn_log(wlr_conn, WLR_ERROR, "No CRTC possible"); + } +diff --git a/backend/drm/util.c b/backend/drm/util.c +index 03c4b0b4..6e0df7c5 100644 +--- a/backend/drm/util.c ++++ b/backend/drm/util.c +@@ -119,6 +119,37 @@ void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data) + } + } + ++const char *conn_get_name(uint32_t type_id) { ++ switch (type_id) { ++ case DRM_MODE_CONNECTOR_Unknown: return "Unknown"; ++ case DRM_MODE_CONNECTOR_VGA: return "VGA"; ++ case DRM_MODE_CONNECTOR_DVII: return "DVI-I"; ++ case DRM_MODE_CONNECTOR_DVID: return "DVI-D"; ++ case DRM_MODE_CONNECTOR_DVIA: return "DVI-A"; ++ case DRM_MODE_CONNECTOR_Composite: return "Composite"; ++ case DRM_MODE_CONNECTOR_SVIDEO: return "SVIDEO"; ++ case DRM_MODE_CONNECTOR_LVDS: return "LVDS"; ++ case DRM_MODE_CONNECTOR_Component: return "Component"; ++ case DRM_MODE_CONNECTOR_9PinDIN: return "DIN"; ++ case DRM_MODE_CONNECTOR_DisplayPort: return "DP"; ++ case DRM_MODE_CONNECTOR_HDMIA: return "HDMI-A"; ++ case DRM_MODE_CONNECTOR_HDMIB: return "HDMI-B"; ++ case DRM_MODE_CONNECTOR_TV: return "TV"; ++ case DRM_MODE_CONNECTOR_eDP: return "eDP"; ++ case DRM_MODE_CONNECTOR_VIRTUAL: return "Virtual"; ++ case DRM_MODE_CONNECTOR_DSI: return "DSI"; ++ case DRM_MODE_CONNECTOR_DPI: return "DPI"; ++ case DRM_MODE_CONNECTOR_WRITEBACK: return "Writeback"; ++#ifdef DRM_MODE_CONNECTOR_SPI ++ case DRM_MODE_CONNECTOR_SPI: return "SPI"; ++#endif ++#ifdef DRM_MODE_CONNECTOR_USB ++ case DRM_MODE_CONNECTOR_USB: return "USB"; ++#endif ++ default: return "Unknown"; ++ } ++} ++ + static bool is_taken(size_t n, const uint32_t arr[static n], uint32_t key) { + for (size_t i = 0; i < n; ++i) { + if (arr[i] == key) { +diff --git a/include/backend/drm/util.h b/include/backend/drm/util.h +index 9bfe5f8a..4979d906 100644 +--- a/include/backend/drm/util.h ++++ b/include/backend/drm/util.h +@@ -14,6 +14,8 @@ enum wlr_output_mode_aspect_ratio get_picture_aspect_ratio(const drmModeModeInfo + const char *get_pnp_manufacturer(uint16_t code); + // Populates the make/model/phys_{width,height} of output from the edid data + void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data); ++// Returns the string representation of a DRM output type ++const char *conn_get_name(uint32_t type_id); + + // Part of match_obj + enum { +diff --git a/meson.build b/meson.build +index b2fbcf33..b673ab20 100644 +--- a/meson.build ++++ b/meson.build +@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server', + ) + + drm = dependency('libdrm', +- version: '>=2.4.112', ++ version: '>=2.4.109', + fallback: 'libdrm', + default_options: [ + 'intel=disabled', +-- +2.37.3 + diff --git a/wlroots.spec b/wlroots.spec index d57bcc8..453cb67 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -42,6 +42,9 @@ Patch0: wlroots-0.16-backports.patch # Following patch is required for phoc. Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch +# Patches for compatibility with older Fedora releases (module or copr builds) +Patch20: wlroots-0.16-libdrm-2.4.109-compat.patch + BuildRequires: gcc BuildRequires: glslang BuildRequires: gnupg2 @@ -50,7 +53,7 @@ BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(hwdata) -BuildRequires: pkgconfig(libdrm) >= 2.4.113 +BuildRequires: pkgconfig(libdrm) >= 2.4.109 %dnl # 2.4.113 without the compat patch BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libudev) @@ -91,7 +94,13 @@ Development files for %{name}. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -p1 +%autosetup -N +# apply unconditional patches +%autopatch -p1 -M19 +# apply conditional patches +%if 0%{?fedora} && 0%{?fedora} < 37 +%patch20 -p1 -b .libdrm +%endif %build @@ -135,6 +144,7 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog * Fri Dec 02 2022 Aleksei Bavshin - 0.16.0-1 - Update to 0.16.0 (#2142159) +- Add patch for compatibility with older libdrm * Mon Nov 14 2022 Aleksei Bavshin - 0.15.1-5 - Backport upstream crash fix (#2142447) From 4a23fc87a59dad2f1c5a0a93d64c1dcc03ea369b Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 2 Dec 2022 22:07:00 -0800 Subject: [PATCH 25/61] Sync examples.meson.build with upstream Include all available examples --- examples.meson.build | 283 +++++++++++++++++++++++++++++++++++++++---- wlroots.spec | 24 ++-- 2 files changed, 276 insertions(+), 31 deletions(-) diff --git a/examples.meson.build b/examples.meson.build index 41782c5..37b20e2 100644 --- a/examples.meson.build +++ b/examples.meson.build @@ -1,7 +1,7 @@ project( 'wlroots-examples', 'c', - meson_version: '>=0.51.2', + meson_version: '>=0.58.0', default_options: [ 'c_std=c11', 'warning_level=2', @@ -12,69 +12,304 @@ project( cc = meson.get_compiler('c') add_global_arguments('-DWLR_USE_UNSTABLE', language : 'c') -wlroots = dependency('wlroots') +math = cc.find_library('m') +rt = cc.find_library('rt') + +threads = dependency('threads') +wayland_egl = dependency('wayland-egl') +wayland_cursor = dependency('wayland-cursor') wayland_client = dependency('wayland-client') wayland_server = dependency('wayland-server') -glesv2 = dependency('glesv2') +wayland_protos = dependency('wayland-protocols', version: '>=1.27') +wayland_scanner_dep = dependency('wayland-scanner', native: true) +wayland_scanner = find_program( + wayland_scanner_dep.get_variable('wayland_scanner'), + native: true, +) +wlroots = dependency('wlroots') xkbcommon = dependency('xkbcommon') - -wlr_protos = dependency('wlroots') -rt = cc.find_library('rt') +libpng = dependency('libpng', required: false, disabler: true) +drm = dependency('libdrm') +egl = dependency('egl', required: false, disabler: true) +glesv2 = dependency('glesv2', required: false, disabler: true) +gbm = dependency('gbm', required: false, disabler: true) +# These versions correspond to ffmpeg 4.0 +libavutil = dependency('libavutil', version: '>=56.14.100', required: false, disabler: true) +libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false, disabler: true) +libavformat = dependency('libavformat', version: '>=58.12.100', required: false, disabler: true) +# Only needed for drm_fourcc.h +libdrm = dependency('libdrm').partial_dependency(compile_args: true, includes: true) # epoll is a separate library in FreeBSD if host_machine.system() == 'freebsd' - libepoll = [dependency('epoll-shim')] + libepoll = dependency('epoll-shim') else - libepoll = [] + libepoll = declare_dependency() endif -libpng = dependency('libpng', required: false, disabler: true) +if not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil) + libavutil = disabler() +endif -examples = { +wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') +wlr_protocol_dir = 'protocol' + +protocols = { + # Stable upstream protocols + 'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml', + + # Unstable upstream protocols + 'fullscreen-shell-unstable-v1': wl_protocol_dir / 'unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml', + 'idle-inhibit-unstable-v1': wl_protocol_dir / 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml', + 'keyboard-shortcuts-inhibit-unstable-v1': wl_protocol_dir / 'unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml', + 'linux-dmabuf-unstable-v1': wl_protocol_dir / 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', + 'pointer-constraints-unstable-v1': wl_protocol_dir / 'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml', + 'relative-pointer-unstable-v1': wl_protocol_dir / 'unstable/relative-pointer/relative-pointer-unstable-v1.xml', + 'text-input-unstable-v3': wl_protocol_dir / 'unstable/text-input/text-input-unstable-v3.xml', + 'xdg-decoration-unstable-v1': wl_protocol_dir / 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml', + + # Other protocols + 'input-method-unstable-v2': wlr_protocol_dir / 'input-method-unstable-v2.xml', + 'kde-idle': wlr_protocol_dir / 'idle.xml', + 'wlr-export-dmabuf-unstable-v1': wlr_protocol_dir / 'wlr-export-dmabuf-unstable-v1.xml', + 'wlr-foreign-toplevel-management-unstable-v1': wlr_protocol_dir / 'wlr-foreign-toplevel-management-unstable-v1.xml', + 'wlr-gamma-control-unstable-v1': wlr_protocol_dir / 'wlr-gamma-control-unstable-v1.xml', + 'wlr-input-inhibitor-unstable-v1': wlr_protocol_dir / 'wlr-input-inhibitor-unstable-v1.xml', + 'wlr-layer-shell-unstable-v1': wlr_protocol_dir / 'wlr-layer-shell-unstable-v1.xml', + 'wlr-output-power-management-unstable-v1': wlr_protocol_dir / 'wlr-output-power-management-unstable-v1.xml', + 'wlr-screencopy-unstable-v1': wlr_protocol_dir / 'wlr-screencopy-unstable-v1.xml', + 'wlr-virtual-pointer-unstable-v1': wlr_protocol_dir / 'wlr-virtual-pointer-unstable-v1.xml', +} + +compositors = { 'simple': { 'src': 'simple.c', - 'dep': [wlroots, wayland_server, glesv2, xkbcommon], }, 'pointer': { 'src': 'pointer.c', - 'dep': [wlroots, wayland_server, xkbcommon], }, 'touch': { 'src': ['touch.c', 'cat.c'], - 'dep': [wlroots, wayland_server, xkbcommon], }, 'tablet': { 'src': 'tablet.c', - 'dep': [wlroots, wayland_server, xkbcommon], }, 'rotation': { 'src': ['rotation.c', 'cat.c'], - 'dep': [wlroots, wayland_server, xkbcommon], }, 'multi-pointer': { 'src': 'multi-pointer.c', - 'dep': [wlroots, wayland_server, glesv2, xkbcommon], }, 'output-layout': { 'src': ['output-layout.c', 'cat.c'], - 'dep': [wlroots, wayland_server, xkbcommon], }, - 'screencopy': { - 'src': 'screencopy.c', - 'dep': [libpng, wayland_client, wlr_protos, rt], + 'fullscreen-shell': { + 'src': 'fullscreen-shell.c', + 'proto': ['fullscreen-shell-unstable-v1'], + }, + 'quads': { + 'src': 'quads.c', + }, + 'scene-graph': { + 'src': 'scene-graph.c', + 'proto': ['xdg-shell'], }, } -foreach name, info : examples +clients = { + 'idle': { + 'src': 'idle.c', + 'dep': [threads], + 'proto': ['kde-idle'], + }, + 'idle-inhibit': { + 'src': ['idle-inhibit.c', 'egl_common.c'], + 'dep': [wayland_egl, egl, glesv2], + 'proto': [ + 'idle-inhibit-unstable-v1', + 'xdg-shell', + ], + }, + 'keyboard-shortcuts-inhibit': { + 'src': ['keyboard-shortcuts-inhibit.c', 'egl_common.c'], + 'dep': [wayland_egl, wayland_cursor, egl, glesv2], + 'proto': [ + 'keyboard-shortcuts-inhibit-unstable-v1', + 'xdg-shell', + ], + }, + 'layer-shell': { + 'src': ['layer-shell.c', 'egl_common.c'], + 'dep': [wayland_egl, wayland_cursor, egl, glesv2], + 'proto': [ + 'wlr-layer-shell-unstable-v1', + 'xdg-shell', + ], + }, + 'input-inhibitor': { + 'src': ['input-inhibitor.c', 'egl_common.c'], + 'dep': [wayland_egl, wayland_cursor, egl, glesv2], + 'proto': [ + 'wlr-input-inhibitor-unstable-v1', + 'xdg-shell', + ], + }, + 'gamma-control': { + 'src': 'gamma-control.c', + 'dep': [wayland_cursor, math], + 'proto': ['wlr-gamma-control-unstable-v1'], + }, + 'output-power-management': { + 'src': 'output-power-management.c', + 'dep': [wayland_client], + 'proto': ['wlr-output-power-management-unstable-v1'], + }, + 'pointer-constraints': { + 'src': ['pointer-constraints.c', 'egl_common.c'], + 'dep': [wayland_egl, egl, glesv2], + 'proto': [ + 'pointer-constraints-unstable-v1', + 'xdg-shell', + ], + }, + 'relative-pointer': { + 'src': ['relative-pointer-unstable-v1.c', 'egl_common.c'], + 'dep': [wayland_egl, egl, glesv2], + 'proto': [ + 'pointer-constraints-unstable-v1', + 'relative-pointer-unstable-v1', + 'xdg-shell', + ], + }, + 'dmabuf-capture': { + 'src': 'dmabuf-capture.c', + 'dep': [ + libavcodec, + libavformat, + libavutil, + drm, + threads, + ], + 'proto': ['wlr-export-dmabuf-unstable-v1'], + }, + 'screencopy': { + 'src': 'screencopy.c', + 'dep': [libpng, rt], + 'proto': ['wlr-screencopy-unstable-v1'], + }, + 'screencopy-dmabuf': { + 'src': 'screencopy-dmabuf.c', + 'dep': [libpng, rt, gbm, drm], + 'proto': [ + 'wlr-screencopy-unstable-v1', + 'linux-dmabuf-unstable-v1', + ], + }, + 'toplevel-decoration': { + 'src': ['toplevel-decoration.c', 'egl_common.c'], + 'dep': [wayland_egl, egl, glesv2], + 'proto': [ + 'xdg-decoration-unstable-v1', + 'xdg-shell', + ], + }, + 'input-method': { + 'src': 'input-method.c', + 'dep': [wayland_egl, libepoll], + 'proto': [ + 'input-method-unstable-v2', + 'text-input-unstable-v3', + 'xdg-shell', + ], + }, + 'text-input': { + 'src': ['text-input.c', 'egl_common.c'], + 'dep': [wayland_egl, wayland_cursor, egl, glesv2], + 'proto': [ + 'text-input-unstable-v3', + 'xdg-shell', + ], + }, + 'foreign-toplevel': { + 'src': 'foreign-toplevel.c', + 'proto': ['wlr-foreign-toplevel-management-unstable-v1'], + }, + 'virtual-pointer': { + 'src': 'virtual-pointer.c', + 'proto': ['wlr-virtual-pointer-unstable-v1'], + }, + 'input-method-keyboard-grab': { + 'src': 'input-method-keyboard-grab.c', + 'dep': [xkbcommon], + 'proto': [ + 'input-method-unstable-v2', + ], + }, +} + +protocols_code = {} +protocols_server_header = {} +protocols_client_header = {} +proto_inc = include_directories('protocol') + +foreach name, path : protocols + code = custom_target( + name.underscorify() + '_c', + input: path, + output: '@BASENAME@-protocol.c', + command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'], + ) + + server_header = custom_target( + name.underscorify() + '_server_h', + input: path, + output: '@BASENAME@-protocol.h', + command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'], + ) + + client_header = custom_target( + name.underscorify() + '_client_h', + input: path, + output: '@BASENAME@-client-protocol.h', + command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'], + build_by_default: false, + ) + + protocols_code += { name: code } + protocols_server_header += { name: server_header } + protocols_client_header += { name: client_header } +endforeach + +foreach name, info : compositors + extra_src = [] + foreach p : info.get('proto', []) + extra_src += protocols_server_header[p] + endforeach + + executable( + name, + [info.get('src'), extra_src], + dependencies: [libdrm, wlroots, wayland_server, xkbcommon], + include_directories: [proto_inc], + ) +endforeach + +foreach name, info : clients all_dep_found = true - foreach d : info.get('dep') + extra_src = [] + foreach d : info.get('dep', []) all_dep_found = all_dep_found and d.found() endforeach + foreach p : info.get('proto') + extra_src += protocols_code[p] + extra_src += protocols_client_header[p] + endforeach + if all_dep_found executable( name, - info.get('src'), - dependencies: info.get('dep'), + [info.get('src'), extra_src], + dependencies: [wayland_client, info.get('dep', [])], ) else warning('Dependencies not satisfied for ' + name) diff --git a/wlroots.spec b/wlroots.spec index 453cb67..5833ca5 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -70,9 +70,13 @@ BuildRequires: pkgconfig(xcb-renderutil) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xwayland) -# only select examples are supported for being readily compilable (see SOURCE3) -%global examples \ - cat multi-pointer output-layout pointer rotation screencopy simple tablet touch +# protocol files required to compile examples (see SOURCE3) +%global example_protocols \ + idle input-method-unstable-v2 wlr-export-dmabuf-unstable-v1 \ + wlr-foreign-toplevel-management-unstable-v1 wlr-gamma-control-unstable-v1 \ + wlr-input-inhibitor-unstable-v1 wlr-layer-shell-unstable-v1 \ + wlr-output-power-management-unstable-v1 wlr-screencopy-unstable-v1 \ + wlr-virtual-pointer-unstable-v1 %description %{summary}. @@ -85,8 +89,12 @@ Requires: %{name}%{?_isa} == %{version}-%{release} Recommends: pkgconfig(xcb-icccm) # for examples Suggests: gcc -Suggests: meson >= 0.51.2 +Suggests: meson >= 0.58.0 Suggests: pkgconfig(libpng) +Suggests: pkgconfig(libavutil) +Suggests: pkgconfig(libavcodec) +Suggests: pkgconfig(libavformat) +Suggests: pkgconfig(wayland-egl) %description devel Development files for %{name}. @@ -117,9 +125,10 @@ MESON_OPTIONS=( %install %{meson_install} -EXAMPLES=( %{examples} ) # Normalize whitespace by creating an array -for example in "${EXAMPLES[@]}"; do - install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/"${example}".[ch] +EXAMPLE_PROTOCOLS=( %{example_protocols} ) # Normalize whitespace by creating an array +install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/*.[ch] +for proto in "${EXAMPLE_PROTOCOLS[@]}"; do + install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples/protocol' "protocol/${proto}.xml" done install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build' @@ -145,6 +154,7 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build * Fri Dec 02 2022 Aleksei Bavshin - 0.16.0-1 - Update to 0.16.0 (#2142159) - Add patch for compatibility with older libdrm +- Sync examples.meson.build with upstream, include all available examples * Mon Nov 14 2022 Aleksei Bavshin - 0.15.1-5 - Backport upstream crash fix (#2142447) From b32c37f87e47740a5d4c9e7a47a3bf7f33ade290 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 25 Dec 2022 08:14:54 -0800 Subject: [PATCH 26/61] Update to 0.16.1 --- sources | 4 +- wlroots-0.16-backports.patch | 454 ----------------------- wlroots-0.16-libdrm-2.4.109-compat.patch | 241 ------------ wlroots.spec | 13 +- 4 files changed, 6 insertions(+), 706 deletions(-) delete mode 100644 wlroots-0.16-backports.patch delete mode 100644 wlroots-0.16-libdrm-2.4.109-compat.patch diff --git a/sources b/sources index 12a60d6..da36423 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.16.0.tar.gz) = f5a7ea444f77ec563a4cf40831c43fbe8593a61a31cc9e04f45abf0603d9dab11b90e0f7cda0cd65df40c36257377c101bbbd9e4cb9dd5cde0baa7abb558cc87 -SHA512 (wlroots-0.16.0.tar.gz.sig) = 98d0579f8a4b863f2c57cfcd9849811ac2bf5945b5b2511c7e1eb4f73e5db8af02265e9fa2e5b3330af141506b1d4e3c22a35cd8669ebd5633388e3c6bc5d2d3 +SHA512 (wlroots-0.16.1.tar.gz) = e676717b8e0f6a52ae02bd8187c70c5ce5f73c00c251bdfe94285d12b960e1a519a663ebd12a7686979d259977080560b22ef8dbbb6594234eb137dfaf0fea58 +SHA512 (wlroots-0.16.1.tar.gz.sig) = 0af3783ed826d590416c3834bc5c0383e4b9aa206e592bcb838bdd1bf93f89192839d0ca699078d5076cd60b37fe1354199e06b8ad2e45ebb270e7ab31c32e12 diff --git a/wlroots-0.16-backports.patch b/wlroots-0.16-backports.patch deleted file mode 100644 index ed9b7a9..0000000 --- a/wlroots-0.16-backports.patch +++ /dev/null @@ -1,454 +0,0 @@ -From bc6422115cf0dd0c065d3a6ec4d1ac363aad39fd Mon Sep 17 00:00:00 2001 -From: Simon Zeni -Date: Fri, 11 Nov 2022 14:52:24 -0500 -Subject: [PATCH 01/12] render/egl: fix uninitialized pointers in - init_dmabuf_formats - -`modifiers` and `external_only` are never initialized, and free'd later. This -commit explicitly initializes them to NULL to prevent segfaults on `free()` - -(cherry picked from commit ed71915742160f2b9157adbad79364e22ab7ebda) ---- - render/egl.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/render/egl.c b/render/egl.c -index e3839c7d..0c25e036 100644 ---- a/render/egl.c -+++ b/render/egl.c -@@ -124,8 +124,8 @@ static void init_dmabuf_formats(struct wlr_egl *egl) { - for (int i = 0; i < formats_len; i++) { - uint32_t fmt = formats[i]; - -- uint64_t *modifiers; -- EGLBoolean *external_only; -+ uint64_t *modifiers = NULL; -+ EGLBoolean *external_only = NULL; - int modifiers_len = 0; - if (!no_modifiers) { - modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers, &external_only); --- -2.38.1 - - -From a6ff023df291a770fb907a88ca39b9ee5b1cc89e Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Tue, 15 Nov 2022 10:55:38 +0100 -Subject: [PATCH 02/12] backend/drm: only request page-flip if active - -It doesn't make sense to request a page-flip for a disabled output. - -Fixes: 84e727daae67 ("backend/drm: request page-flip event on modeset") -Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3528 -(cherry picked from commit f863b93c05a73097ccddce1ed066f3f11bfb1c3e) ---- - backend/drm/drm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index 04994c68..1f4e74c5 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -577,7 +577,7 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, - return false; - } - } -- if (pending.modeset) { -+ if (pending.modeset && pending.active) { - flags |= DRM_MODE_PAGE_FLIP_EVENT; - } - --- -2.38.1 - - -From 990cba89662c5d892dd8e045e737b6ada2f6d1ae Mon Sep 17 00:00:00 2001 -From: bi4k8 -Date: Tue, 15 Nov 2022 01:00:27 +0000 -Subject: [PATCH 03/12] wlr_seat: clear `drag->seat_client` when destroyed - -This was previously a use-after-free in `wlr_drag.c`. - -(cherry picked from commit 8b12037cadb2422a10d948babc4fd77ce637f158) ---- - types/data_device/wlr_drag.c | 6 +++--- - types/seat/wlr_seat.c | 4 ++++ - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c -index d3cb979d..c1fa801b 100644 ---- a/types/data_device/wlr_drag.c -+++ b/types/data_device/wlr_drag.c -@@ -55,14 +55,14 @@ static void drag_set_focus(struct wlr_drag *drag, - goto out; - } - -- if (!drag->source && -+ if (!drag->source && drag->seat_client && - wl_resource_get_client(surface->resource) != - drag->seat_client->client) { - goto out; - } - - struct wlr_seat_client *focus_client = wlr_seat_client_for_wl_client( -- drag->seat_client->seat, wl_resource_get_client(surface->resource)); -+ drag->seat, wl_resource_get_client(surface->resource)); - if (!focus_client) { - goto out; - } -@@ -71,7 +71,7 @@ static void drag_set_focus(struct wlr_drag *drag, - drag->source->accepted = false; - - uint32_t serial = -- wl_display_next_serial(drag->seat_client->seat->display); -+ wl_display_next_serial(drag->seat->display); - - struct wl_resource *device_resource; - wl_resource_for_each(device_resource, &focus_client->data_devices) { -diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c -index 59b760ca..f83ccd6d 100644 ---- a/types/seat/wlr_seat.c -+++ b/types/seat/wlr_seat.c -@@ -75,6 +75,10 @@ static void seat_client_handle_resource_destroy( - client->seat->keyboard_state.focused_client = NULL; - } - -+ if (client->seat->drag && client == client->seat->drag->seat_client) { -+ client->seat->drag->seat_client = NULL; -+ } -+ - struct wl_resource *resource, *tmp; - wl_resource_for_each_safe(resource, tmp, &client->pointers) { - wl_resource_destroy(resource); --- -2.38.1 - - -From b9b6334639bed442e039b61ec902692da557d4de Mon Sep 17 00:00:00 2001 -From: Kirill Primak -Date: Sun, 13 Nov 2022 01:30:22 +0300 -Subject: [PATCH 04/12] xwayland: fix wlr_xwayland_surface_from_wlr_surface() - docs - -32daa43a454bcea1306ad0976fd4161ce8c7e86f has removed the asymmetry in -the relationship of a wlr_surface and an unmapped wlr_xwayland_surface, -when wlr_surface.role_data wasn't NULL but wlr_xwayland_surface.surface -was. However, this also means that -wlr_xwayland_surface_from_wlr_surface() now returns NULL if the -wlr_surface is unmapped. Fix the documentation to reflect this. - -(cherry picked from commit 627a5c511278e67c3c308cdc6a639cbb490f48c3) ---- - include/wlr/xwayland/xwayland.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h -index fd161937..372ab9a8 100644 ---- a/include/wlr/xwayland/xwayland.h -+++ b/include/wlr/xwayland/xwayland.h -@@ -232,7 +232,7 @@ bool wlr_surface_is_xwayland_surface(struct wlr_surface *surface); - * Get a struct wlr_xwayland_surface from a struct wlr_surface. - * Asserts that the surface has the xwayland surface role. - * May return NULL even if the surface has the xwayland surface role if the -- * corresponding xwayland surface has been destroyed. -+ * corresponding xwayland surface has been unmapped or destroyed. - */ - struct wlr_xwayland_surface *wlr_xwayland_surface_from_wlr_surface( - struct wlr_surface *surface); --- -2.38.1 - - -From e169ebb8cfbdb92f932b3f973e20ce79495bd983 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Thu, 10 Nov 2022 12:28:34 +0100 -Subject: [PATCH 05/12] backend/drm: log refresh rate in Hz - -(cherry picked from commit b3da33116ea9fb3ef948ae72425534b43c217579) ---- - backend/drm/drm.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index 1f4e74c5..55f95c91 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -1302,9 +1302,9 @@ static void connect_drm_connector(struct wlr_drm_connector *wlr_conn, - wlr_conn->crtc->mode_id = mode_id; - } - -- wlr_log(WLR_INFO, " %"PRId32"x%"PRId32"@%"PRId32" %s", -+ wlr_log(WLR_INFO, " %"PRId32"x%"PRId32" @ %.3f Hz %s", - mode->wlr_mode.width, mode->wlr_mode.height, -- mode->wlr_mode.refresh, -+ (float)mode->wlr_mode.refresh / 1000, - mode->wlr_mode.preferred ? "(preferred)" : ""); - - wl_list_insert(wlr_conn->output.modes.prev, &mode->wlr_mode.link); --- -2.38.1 - - -From 356ac5eed90a2c8b899dbfaf8a7a17237868adeb Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Thu, 10 Nov 2022 12:28:53 +0100 -Subject: [PATCH 06/12] backend/drm: log modesetting commits - -(cherry picked from commit 65836ce357e4140d4e5250228a05ddd96119a883) ---- - backend/drm/drm.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index 55f95c91..74265d4f 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -581,6 +581,12 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, - flags |= DRM_MODE_PAGE_FLIP_EVENT; - } - -+ if (pending.modeset) { -+ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", -+ pending.mode.hdisplay, pending.mode.vdisplay, -+ (float)calculate_refresh_rate(&pending.mode) / 1000); -+ } -+ - if (!drm_crtc_commit(conn, &pending, flags, false)) { - return false; - } --- -2.38.1 - - -From 9c5445148235109b4fb986138c6294db4d0334d8 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Tue, 15 Nov 2022 10:06:23 +0100 -Subject: [PATCH 07/12] backend/drm: fix FPE when disabling output - -Fixes: 65836ce357e4 ("backend/drm: log modesetting commits") -Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3534 -(cherry picked from commit a40ba16a6414f72ae0224164bb08cd8479dc52ee) ---- - backend/drm/drm.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index 74265d4f..a7ff585e 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -582,9 +582,13 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, - } - - if (pending.modeset) { -- wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", -- pending.mode.hdisplay, pending.mode.vdisplay, -- (float)calculate_refresh_rate(&pending.mode) / 1000); -+ if (pending.active) { -+ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", -+ pending.mode.hdisplay, pending.mode.vdisplay, -+ (float)calculate_refresh_rate(&pending.mode) / 1000); -+ } else { -+ wlr_drm_conn_log(conn, WLR_INFO, "Turning off"); -+ } - } - - if (!drm_crtc_commit(conn, &pending, flags, false)) { --- -2.38.1 - - -From 724bc296f5a3dce3b619cf089b711cff3a8ece37 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Guido=20G=C3=BCnther?= -Date: Thu, 24 Nov 2022 22:38:29 +0100 -Subject: [PATCH 08/12] seat/pointer: Initialize low_res_value - -Fixes - - In file included from /usr/include/wayland-server-core.h:32, - from ../types/seat/wlr_seat_pointer.c:6: - In function 'wl_fixed_from_double', - inlined from 'wlr_seat_pointer_send_axis' at ../types/seat/wlr_seat_pointer.c:367:6: - /usr/include/wayland-util.h:641:17: error: 'low_res_value' may be used uninitialized [-Werror=maybe-uninitialized] - 641 | u.d = d + (3LL << (51 - 8)); - | ~~^~~~~~~~~~~~~~~~~~~ - ../types/seat/wlr_seat_pointer.c: In function 'wlr_seat_pointer_send_axis': - ../types/seat/wlr_seat_pointer.c:329:16: note: 'low_res_value' was declared here - 329 | double low_res_value; - | ^~~~~~~~~~~~~ ---- - types/seat/wlr_seat_pointer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c -index 8d6154b0..ffa706bd 100644 ---- a/types/seat/wlr_seat_pointer.c -+++ b/types/seat/wlr_seat_pointer.c -@@ -326,7 +326,7 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time, - send_source = true; - } - -- double low_res_value; -+ double low_res_value = 0.0; - int32_t low_res_value_discrete = 0; - update_value120_accumulators(client, orientation, value, value_discrete, - &low_res_value, &low_res_value_discrete); --- -2.38.1 - - -From 4892082836399fda80dd55671c46b005f0451c5c Mon Sep 17 00:00:00 2001 -From: Johan Malm -Date: Sat, 26 Nov 2022 17:18:33 +0000 -Subject: [PATCH 09/12] scene/layer_shell_v1.c: set exclusive zone correctly - -...when only one edge is anchored. - -The layer-shell protocol specifies that a positive exclusive-zone value is -'meaningful' if the surface is anchored to either: - -1. one edge -2. one edge and both perpendicular edges. - -For example, if you wish to position a layer-shell client along the top -edge and make it exclusive, you should be able to either set anchor=TOP or -anchor=TOP|LEFT|RIGHT. It appears that many panels/bars use the latter -approach (anchor to an edge and also both perpendicular edges) which is -probably why this has not been reported previously. - -This patch adds support for the first case and thereby makes exclusive -zone behaviour consistent with the protocol and also with sway's extant -layer-shell implementation. - -(cherry picked from commit 8e80432a72b18a1ddbacdb08ff0c41645578f1ee) ---- - types/scene/layer_shell_v1.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c -index 22986983..e523d315 100644 ---- a/types/scene/layer_shell_v1.c -+++ b/types/scene/layer_shell_v1.c -@@ -39,6 +39,7 @@ static void layer_surface_exclusive_zone( - struct wlr_layer_surface_v1_state *state, - struct wlr_box *usable_area) { - switch (state->anchor) { -+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP: - case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | - ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | - ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): -@@ -46,12 +47,14 @@ static void layer_surface_exclusive_zone( - usable_area->y += state->exclusive_zone + state->margin.top; - usable_area->height -= state->exclusive_zone + state->margin.top; - break; -+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM: - case (ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | - ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | - ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): - // Anchor bottom - usable_area->height -= state->exclusive_zone + state->margin.bottom; - break; -+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT: - case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | - ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | - ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT): -@@ -59,6 +62,7 @@ static void layer_surface_exclusive_zone( - usable_area->x += state->exclusive_zone + state->margin.left; - usable_area->width -= state->exclusive_zone + state->margin.left; - break; -+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT: - case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | - ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | - ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right --- -2.38.1 - - -From e0fe72ffdd66bcf2f43f728858d745171498d58d Mon Sep 17 00:00:00 2001 -From: Johan Malm -Date: Sat, 26 Nov 2022 17:23:51 +0000 -Subject: [PATCH 10/12] scene/layer_shell_v1.c: remove redundant comment - -(cherry picked from commit 338e0a3976f2bad5ec048b022648a671ed443b4f) ---- - types/scene/layer_shell_v1.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c -index e523d315..3ed616a9 100644 ---- a/types/scene/layer_shell_v1.c -+++ b/types/scene/layer_shell_v1.c -@@ -65,7 +65,7 @@ static void layer_surface_exclusive_zone( - case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT: - case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | - ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | -- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right -+ ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): - // Anchor right - usable_area->width -= state->exclusive_zone + state->margin.right; - break; --- -2.38.1 - - -From de5e091996bfa58a0a93fac38a45235b7cb06488 Mon Sep 17 00:00:00 2001 -From: Simon Zeni -Date: Tue, 29 Nov 2022 15:21:18 -0500 -Subject: [PATCH 11/12] types/wlr_seat: finish keyboard_state during - wlr_seat_destroy - -(cherry picked from commit 0611c10909b17276bd633a4ee9a322995e9a3580) ---- - types/seat/wlr_seat.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c -index f83ccd6d..c2985824 100644 ---- a/types/seat/wlr_seat.c -+++ b/types/seat/wlr_seat.c -@@ -179,6 +179,8 @@ void wlr_seat_destroy(struct wlr_seat *seat) { - wlr_seat_pointer_clear_focus(seat); - wlr_seat_keyboard_clear_focus(seat); - -+ wlr_seat_set_keyboard(seat, NULL); -+ - struct wlr_touch_point *point; - wl_list_for_each(point, &seat->touch_state.touch_points, link) { - wlr_seat_touch_point_clear_focus(seat, 0, point->touch_id); --- -2.38.1 - - -From f1bea43ccccd5824097d8660a2d20b5d0bf506be Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Wed, 30 Nov 2022 15:58:08 +0100 -Subject: [PATCH 12/12] Revert "compositor: enforce surface destruction order" - -This reverts commit c09d3450d494e21f065c12f199fa5ba8bfd946a9. - -This doesn't play well with the Xwayland surface role. ---- - types/wlr_compositor.c | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c -index 5e6de244..fa4a8aa5 100644 ---- a/types/wlr_compositor.c -+++ b/types/wlr_compositor.c -@@ -36,14 +36,6 @@ static int max(int fst, int snd) { - - static void surface_handle_destroy(struct wl_client *client, - struct wl_resource *resource) { -- struct wlr_surface *surface = wlr_surface_from_resource(resource); -- if (surface->role_data != NULL) { -- // TODO: send WL_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT -- // https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/278 -- wl_resource_post_error(resource, -1, -- "surface was destroyed before its role object"); -- return; -- } - wl_resource_destroy(resource); - } - --- -2.38.1 - diff --git a/wlroots-0.16-libdrm-2.4.109-compat.patch b/wlroots-0.16-libdrm-2.4.109-compat.patch deleted file mode 100644 index 997cf49..0000000 --- a/wlroots-0.16-libdrm-2.4.109-compat.patch +++ /dev/null @@ -1,241 +0,0 @@ -From 05ec8d7a160aa5fb1a7fb47c6711e3e95348fbf7 Mon Sep 17 00:00:00 2001 -From: Aleksei Bavshin -Date: Tue, 8 Nov 2022 18:37:13 -0800 -Subject: [PATCH 1/2] Compatibility with libdrm 2.4.112 - ---- - meson.build | 2 +- - render/allocator/gbm.c | 7 ++----- - render/egl.c | 5 +---- - render/vulkan/pixel_format.c | 6 ++---- - types/output/render.c | 7 ++----- - 5 files changed, 8 insertions(+), 19 deletions(-) - -diff --git a/meson.build b/meson.build -index 5dd38e1a..b2fbcf33 100644 ---- a/meson.build -+++ b/meson.build -@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server', - ) - - drm = dependency('libdrm', -- version: '>=2.4.113', -+ version: '>=2.4.112', - fallback: 'libdrm', - default_options: [ - 'intel=disabled', -diff --git a/render/allocator/gbm.c b/render/allocator/gbm.c -index f77fedd8..805d80e3 100644 ---- a/render/allocator/gbm.c -+++ b/render/allocator/gbm.c -@@ -138,14 +138,11 @@ static struct wlr_gbm_buffer *create_buffer(struct wlr_gbm_allocator *alloc, - buffer->dmabuf.modifier = fallback_modifier; - } - -- char *format_name = drmGetFormatName(buffer->dmabuf.format); - char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier); - wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer " -- "with format %s (0x%08"PRIX32"), modifier %s (0x%016"PRIX64")", -- buffer->base.width, buffer->base.height, -- format_name ? format_name : "", buffer->dmabuf.format, -+ "with format 0x%08"PRIX32", modifier %s (0x%016"PRIX64")", -+ buffer->base.width, buffer->base.height, buffer->dmabuf.format, - modifier_name ? modifier_name : "", buffer->dmabuf.modifier); -- free(format_name); - free(modifier_name); - - return buffer; -diff --git a/render/egl.c b/render/egl.c -index e3839c7d..13068fe2 100644 ---- a/render/egl.c -+++ b/render/egl.c -@@ -161,10 +161,7 @@ static void init_dmabuf_formats(struct wlr_egl *egl) { - } - - if (wlr_log_get_verbosity() >= WLR_DEBUG) { -- char *fmt_name = drmGetFormatName(fmt); -- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")", -- fmt_name ? fmt_name : "", fmt); -- free(fmt_name); -+ wlr_log(WLR_DEBUG, " 0x%08"PRIX32"", fmt); - - log_modifier(DRM_FORMAT_MOD_INVALID, false); - if (modifiers_len == 0) { -diff --git a/render/vulkan/pixel_format.c b/render/vulkan/pixel_format.c -index f55063d7..d0008648 100644 ---- a/render/vulkan/pixel_format.c -+++ b/render/vulkan/pixel_format.c -@@ -234,10 +234,8 @@ void vulkan_format_props_query(struct wlr_vk_device *dev, - const struct wlr_vk_format *format) { - VkResult res; - -- char *format_name = drmGetFormatName(format->drm_format); -- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")", -- format_name ? format_name : "", format->drm_format); -- free(format_name); -+ wlr_log(WLR_DEBUG, " %.4s (0x08%"PRIx32")", -+ (const char *)&format->drm_format, format->drm_format); - - // get general features and modifiers - VkFormatProperties2 fmtp = {0}; -diff --git a/types/output/render.c b/types/output/render.c -index 13d714e1..862f67f5 100644 ---- a/types/output/render.c -+++ b/types/output/render.c -@@ -4,7 +4,6 @@ - #include - #include - #include --#include - #include "backend/backend.h" - #include "render/allocator/allocator.h" - #include "render/drm_format_set.h" -@@ -71,10 +70,8 @@ static bool output_create_swapchain(struct wlr_output *output, - return true; - } - -- char *format_name = drmGetFormatName(format->format); -- wlr_log(WLR_DEBUG, "Choosing primary buffer format %s (0x%08"PRIX32") for output '%s'", -- format_name ? format_name : "", format->format, output->name); -- free(format_name); -+ wlr_log(WLR_DEBUG, "Choosing primary buffer format 0x%"PRIX32" for output '%s'", -+ format->format, output->name); - - if (!allow_modifiers && (format->len != 1 || format->modifiers[0] != DRM_FORMAT_MOD_LINEAR)) { - if (!wlr_drm_format_has(format, DRM_FORMAT_MOD_INVALID)) { --- -2.37.3 - - -From 99798f45c7a407c2a97c7ac2883c348b8e71c8c1 Mon Sep 17 00:00:00 2001 -From: Aleksei Bavshin -Date: Tue, 8 Nov 2022 18:37:51 -0800 -Subject: [PATCH 2/2] Compatibility with libdrm 2.4.109 - ---- - backend/drm/drm.c | 29 ++++++++++++++++++++--------- - backend/drm/util.c | 31 +++++++++++++++++++++++++++++++ - include/backend/drm/util.h | 2 ++ - meson.build | 2 +- - 4 files changed, 54 insertions(+), 10 deletions(-) - -diff --git a/backend/drm/drm.c b/backend/drm/drm.c -index 04994c68..9576de17 100644 ---- a/backend/drm/drm.c -+++ b/backend/drm/drm.c -@@ -1141,6 +1141,23 @@ static struct wlr_drm_crtc *connector_get_current_crtc( - return NULL; - } - -+static uint32_t get_possible_crtcs(int fd, const drmModeConnector *conn) { -+ uint32_t possible_crtcs = 0; -+ -+ for (int i = 0; i < conn->count_encoders; ++i) { -+ drmModeEncoder *enc = drmModeGetEncoder(fd, conn->encoders[i]); -+ if (!enc) { -+ continue; -+ } -+ -+ possible_crtcs |= enc->possible_crtcs; -+ -+ drmModeFreeEncoder(enc); -+ } -+ -+ return possible_crtcs; -+} -+ - static struct wlr_drm_connector *create_drm_connector(struct wlr_drm_backend *drm, - const drmModeConnector *drm_conn) { - struct wlr_drm_connector *wlr_conn = calloc(1, sizeof(*wlr_conn)); -@@ -1153,17 +1170,11 @@ static struct wlr_drm_connector *create_drm_connector(struct wlr_drm_backend *dr - wlr_conn->status = DRM_MODE_DISCONNECTED; - wlr_conn->id = drm_conn->connector_id; - -- const char *conn_name = -- drmModeGetConnectorTypeName(drm_conn->connector_type); -- if (conn_name == NULL) { -- conn_name = "Unknown"; -- } -- - snprintf(wlr_conn->name, sizeof(wlr_conn->name), -- "%s-%"PRIu32, conn_name, drm_conn->connector_type_id); -+ "%s-%"PRIu32, conn_get_name(drm_conn->connector_type), -+ drm_conn->connector_type_id); - -- wlr_conn->possible_crtcs = -- drmModeConnectorGetPossibleCrtcs(drm->fd, drm_conn); -+ wlr_conn->possible_crtcs = get_possible_crtcs(drm->fd, drm_conn); - if (wlr_conn->possible_crtcs == 0) { - wlr_drm_conn_log(wlr_conn, WLR_ERROR, "No CRTC possible"); - } -diff --git a/backend/drm/util.c b/backend/drm/util.c -index 03c4b0b4..6e0df7c5 100644 ---- a/backend/drm/util.c -+++ b/backend/drm/util.c -@@ -119,6 +119,37 @@ void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data) - } - } - -+const char *conn_get_name(uint32_t type_id) { -+ switch (type_id) { -+ case DRM_MODE_CONNECTOR_Unknown: return "Unknown"; -+ case DRM_MODE_CONNECTOR_VGA: return "VGA"; -+ case DRM_MODE_CONNECTOR_DVII: return "DVI-I"; -+ case DRM_MODE_CONNECTOR_DVID: return "DVI-D"; -+ case DRM_MODE_CONNECTOR_DVIA: return "DVI-A"; -+ case DRM_MODE_CONNECTOR_Composite: return "Composite"; -+ case DRM_MODE_CONNECTOR_SVIDEO: return "SVIDEO"; -+ case DRM_MODE_CONNECTOR_LVDS: return "LVDS"; -+ case DRM_MODE_CONNECTOR_Component: return "Component"; -+ case DRM_MODE_CONNECTOR_9PinDIN: return "DIN"; -+ case DRM_MODE_CONNECTOR_DisplayPort: return "DP"; -+ case DRM_MODE_CONNECTOR_HDMIA: return "HDMI-A"; -+ case DRM_MODE_CONNECTOR_HDMIB: return "HDMI-B"; -+ case DRM_MODE_CONNECTOR_TV: return "TV"; -+ case DRM_MODE_CONNECTOR_eDP: return "eDP"; -+ case DRM_MODE_CONNECTOR_VIRTUAL: return "Virtual"; -+ case DRM_MODE_CONNECTOR_DSI: return "DSI"; -+ case DRM_MODE_CONNECTOR_DPI: return "DPI"; -+ case DRM_MODE_CONNECTOR_WRITEBACK: return "Writeback"; -+#ifdef DRM_MODE_CONNECTOR_SPI -+ case DRM_MODE_CONNECTOR_SPI: return "SPI"; -+#endif -+#ifdef DRM_MODE_CONNECTOR_USB -+ case DRM_MODE_CONNECTOR_USB: return "USB"; -+#endif -+ default: return "Unknown"; -+ } -+} -+ - static bool is_taken(size_t n, const uint32_t arr[static n], uint32_t key) { - for (size_t i = 0; i < n; ++i) { - if (arr[i] == key) { -diff --git a/include/backend/drm/util.h b/include/backend/drm/util.h -index 9bfe5f8a..4979d906 100644 ---- a/include/backend/drm/util.h -+++ b/include/backend/drm/util.h -@@ -14,6 +14,8 @@ enum wlr_output_mode_aspect_ratio get_picture_aspect_ratio(const drmModeModeInfo - const char *get_pnp_manufacturer(uint16_t code); - // Populates the make/model/phys_{width,height} of output from the edid data - void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data); -+// Returns the string representation of a DRM output type -+const char *conn_get_name(uint32_t type_id); - - // Part of match_obj - enum { -diff --git a/meson.build b/meson.build -index b2fbcf33..b673ab20 100644 ---- a/meson.build -+++ b/meson.build -@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server', - ) - - drm = dependency('libdrm', -- version: '>=2.4.112', -+ version: '>=2.4.109', - fallback: 'libdrm', - default_options: [ - 'intel=disabled', --- -2.37.3 - diff --git a/wlroots.spec b/wlroots.spec index 5833ca5..3369d1c 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,7 +2,7 @@ %global abi_ver 11 Name: wlroots -Version: 0.16.0 +Version: 0.16.1 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -35,16 +35,11 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches -# Backports for 0.16.1 bugfix release: git format-patch --stdout 0.16.0..0.16 -Patch0: wlroots-0.16-backports.patch # Fedora patches # Following patch is required for phoc. Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch -# Patches for compatibility with older Fedora releases (module or copr builds) -Patch20: wlroots-0.16-libdrm-2.4.109-compat.patch - BuildRequires: gcc BuildRequires: glslang BuildRequires: gnupg2 @@ -106,9 +101,6 @@ Development files for %{name}. # apply unconditional patches %autopatch -p1 -M19 # apply conditional patches -%if 0%{?fedora} && 0%{?fedora} < 37 -%patch20 -p1 -b .libdrm -%endif %build @@ -151,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Dec 25 2022 Aleksei Bavshin - 0.16.1-1 +- Update to 0.16.1 + * Fri Dec 02 2022 Aleksei Bavshin - 0.16.0-1 - Update to 0.16.0 (#2142159) - Add patch for compatibility with older libdrm From 6bef925b327c586db0ad54151e462378ece1f4d9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:54:22 +0000 Subject: [PATCH 27/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 3369d1c..8b3c6a3 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.16.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 0.16.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sun Dec 25 2022 Aleksei Bavshin - 0.16.1-1 - Update to 0.16.1 From 592cea998f456d2fd54cfff76f45aa8e39e96f71 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 10 Feb 2023 18:04:40 -0800 Subject: [PATCH 28/61] Update to 0.16.2 (#2168992) --- sources | 4 ++-- wlroots.spec | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index da36423..635c7d5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.16.1.tar.gz) = e676717b8e0f6a52ae02bd8187c70c5ce5f73c00c251bdfe94285d12b960e1a519a663ebd12a7686979d259977080560b22ef8dbbb6594234eb137dfaf0fea58 -SHA512 (wlroots-0.16.1.tar.gz.sig) = 0af3783ed826d590416c3834bc5c0383e4b9aa206e592bcb838bdd1bf93f89192839d0ca699078d5076cd60b37fe1354199e06b8ad2e45ebb270e7ab31c32e12 +SHA512 (wlroots-0.16.2.tar.gz) = 9d5fbee3b87738de75323a056b83446eb93b81ac3e8a4315918d5daad6ed2f50392d9641039f3f830ec1df94155473a2052689d3c029be7572d8ec9ecc62c0e9 +SHA512 (wlroots-0.16.2.tar.gz.sig) = 25e09ed5dba676d4911183a87a25a04040255a7a2ec7dff8e124fd4957ed16cd091e2a5105853d8d5896cdd5db17513f04e7fdf3a79363eb296d40f29245e0fa diff --git a/wlroots.spec b/wlroots.spec index 8b3c6a3..2231b01 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,8 +2,8 @@ %global abi_ver 11 Name: wlroots -Version: 0.16.1 -Release: 2%{?dist} +Version: 0.16.2 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -48,7 +48,7 @@ BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(hwdata) -BuildRequires: pkgconfig(libdrm) >= 2.4.109 %dnl # 2.4.113 without the compat patch +BuildRequires: pkgconfig(libdrm) >= 2.4.113 BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libudev) @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri Feb 10 2023 Aleksei Bavshin - 0.16.2-1 +- Update to 0.16.2 (#2168992) + * Sat Jan 21 2023 Fedora Release Engineering - 0.16.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 1a73f49d483ca764af39f6184b44a149e358e778 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 16 Apr 2023 16:18:47 -0700 Subject: [PATCH 29/61] Apply upstream patch to remove hardcoded Vulkan validation layers --- ...n-remove-hardcoded-validation-layers.patch | 55 +++++++++++++++++++ wlroots.spec | 6 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch diff --git a/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch b/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch new file mode 100644 index 0000000..68ecf28 --- /dev/null +++ b/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch @@ -0,0 +1,55 @@ +From f3ba14e491333d6bbba8c60328c4dbfd20571182 Mon Sep 17 00:00:00 2001 +From: Simon Zeni +Date: Fri, 11 Nov 2022 15:54:07 -0500 +Subject: [PATCH] render/vulkan: remove hardcoded validation layers + +Users should use the VK_INSTANCE_LAYERS env var to set layers at runtime +--- + render/vulkan/renderer.c | 2 ++ + render/vulkan/vulkan.c | 12 ++---------- + 2 files changed, 4 insertions(+), 10 deletions(-) + +diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c +index c64937aa6..ff208abc4 100644 +--- a/render/vulkan/renderer.c ++++ b/render/vulkan/renderer.c +@@ -1938,6 +1938,8 @@ error: + struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd) { + wlr_log(WLR_INFO, "The vulkan renderer is only experimental and " + "not expected to be ready for daily use"); ++ wlr_log(WLR_INFO, "Run with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation " ++ "to enable the validation layer"); + + // NOTE: we could add functionality to allow the compositor passing its + // name and version to this function. Just use dummies until then, +diff --git a/render/vulkan/vulkan.c b/render/vulkan/vulkan.c +index 748ba9c32..c964fe12e 100644 +--- a/render/vulkan/vulkan.c ++++ b/render/vulkan/vulkan.c +@@ -138,21 +138,13 @@ struct wlr_vk_instance *vulkan_instance_create(bool debug) { + .apiVersion = VK_API_VERSION_1_1, + }; + +- const char *layers[] = { +- "VK_LAYER_KHRONOS_validation", +- // "VK_LAYER_RENDERDOC_Capture", +- // "VK_LAYER_live_introspection", +- }; +- +- unsigned layer_count = debug * (sizeof(layers) / sizeof(layers[0])); +- + VkInstanceCreateInfo instance_info = { + .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, + .pApplicationInfo = &application_info, + .enabledExtensionCount = extensions_len, + .ppEnabledExtensionNames = extensions, +- .enabledLayerCount = layer_count, +- .ppEnabledLayerNames = layers, ++ .enabledLayerCount = 0, ++ .ppEnabledLayerNames = NULL, + }; + + VkDebugUtilsMessageSeverityFlagsEXT severity = +-- +GitLab + diff --git a/wlroots.spec b/wlroots.spec index 2231b01..7808663 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.16.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -35,6 +35,7 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches +Patch0: %{url}/-/commit/f3ba14e491333d6bbba8c60328c4dbfd20571182.patch#/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch # Fedora patches # Following patch is required for phoc. @@ -143,6 +144,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Apr 16 2023 Aleksei Bavshin - 0.16.2-2 +- Apply upstream patch to remove hardcoded Vulkan validation layers + * Fri Feb 10 2023 Aleksei Bavshin - 0.16.2-1 - Update to 0.16.2 (#2168992) From 23ecf089bf98ef53d8884d0dfe2ebfd310f267d6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 18:17:22 +0000 Subject: [PATCH 30/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 7808663..73abeb3 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.16.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -144,6 +144,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 0.16.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sun Apr 16 2023 Aleksei Bavshin - 0.16.2-2 - Apply upstream patch to remove hardcoded Vulkan validation layers From 0a1c111cc7c35f113d26cafa07cdbdae359327ea Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 2 Dec 2023 22:20:17 -0800 Subject: [PATCH 31/61] Use xcb-errors util library --- wlroots.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 73abeb3..c7c6b99 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -61,6 +61,7 @@ BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(wayland-server) >= 1.21 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) +BuildRequires: pkgconfig(xcb-errors) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xcb-renderutil) BuildRequires: pkgconfig(xkbcommon) @@ -108,7 +109,6 @@ Development files for %{name}. MESON_OPTIONS=( # Disable options requiring extra/unpackaged dependencies -Dexamples=false - -Dxcb-errors=disabled ) %{meson} "${MESON_OPTIONS[@]}" From 000c5dbb9390664d4ac2aca1e6b621aca1f0e7b4 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 21 Nov 2023 08:06:44 -0800 Subject: [PATCH 32/61] Update to 0.17.0 (#2250885) --- ...ll-error-on-0-dimension-without-anch.patch | 16 +- examples.meson.build | 301 ++++-------------- sources | 4 +- ...n-remove-hardcoded-validation-layers.patch | 55 ---- wlroots.spec | 43 +-- 5 files changed, 85 insertions(+), 334 deletions(-) delete mode 100644 wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch diff --git a/Revert-layer-shell-error-on-0-dimension-without-anch.patch b/Revert-layer-shell-error-on-0-dimension-without-anch.patch index 430fb55..b6bd5ce 100644 --- a/Revert-layer-shell-error-on-0-dimension-without-anch.patch +++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch @@ -1,4 +1,4 @@ -From 05a740206a73c6aab3762eb449b0733e5b9a4c7a Mon Sep 17 00:00:00 2001 +From 05cd68c9eee28c2223cc192b9744cff493f940cc Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 25 Jun 2022 21:22:08 -0700 Subject: [PATCH] Revert "layer-shell: error on 0 dimension without anchors" @@ -9,12 +9,12 @@ This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3. 1 file changed, 20 deletions(-) diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c -index fa054d3c..062fa96d 100644 +index 37256db6..77dbad94 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c -@@ -316,26 +316,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { - struct wlr_layer_surface_v1 *surface = - wlr_layer_surface_v1_from_wlr_surface(wlr_surface); +@@ -335,26 +335,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { + return; + } - const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | - ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT; @@ -36,9 +36,9 @@ index fa054d3c..062fa96d 100644 - return; - } - - surface->current = surface->pending; - surface->pending.committed = 0; + if (surface->surface->unmap_commit) { + layer_surface_reset(surface); -- -2.37.3 +2.41.0 diff --git a/examples.meson.build b/examples.meson.build index 37b20e2..1e78006 100644 --- a/examples.meson.build +++ b/examples.meson.build @@ -1,3 +1,5 @@ +# Client examples are now available from a separate repository, +# https://gitlab.freedesktop.org/wlroots/wlr-clients project( 'wlroots-examples', 'c', @@ -12,47 +14,25 @@ project( cc = meson.get_compiler('c') add_global_arguments('-DWLR_USE_UNSTABLE', language : 'c') -math = cc.find_library('m') -rt = cc.find_library('rt') - -threads = dependency('threads') -wayland_egl = dependency('wayland-egl') -wayland_cursor = dependency('wayland-cursor') +cairo = dependency('cairo') +drm = dependency('libdrm') +egl = dependency('egl') +glesv2 = dependency('glesv2') +# Only needed for drm_fourcc.h +libdrm = dependency('libdrm').partial_dependency(compile_args: true, includes: true) wayland_client = dependency('wayland-client') -wayland_server = dependency('wayland-server') +wayland_egl = dependency('wayland-egl') wayland_protos = dependency('wayland-protocols', version: '>=1.27') wayland_scanner_dep = dependency('wayland-scanner', native: true) wayland_scanner = find_program( wayland_scanner_dep.get_variable('wayland_scanner'), native: true, ) -wlroots = dependency('wlroots') +wayland_server = dependency('wayland-server') +wlroots = dependency('wlroots', version: ['>=0.17.0', '<0.18.0']) xkbcommon = dependency('xkbcommon') -libpng = dependency('libpng', required: false, disabler: true) -drm = dependency('libdrm') -egl = dependency('egl', required: false, disabler: true) -glesv2 = dependency('glesv2', required: false, disabler: true) -gbm = dependency('gbm', required: false, disabler: true) -# These versions correspond to ffmpeg 4.0 -libavutil = dependency('libavutil', version: '>=56.14.100', required: false, disabler: true) -libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false, disabler: true) -libavformat = dependency('libavformat', version: '>=58.12.100', required: false, disabler: true) -# Only needed for drm_fourcc.h -libdrm = dependency('libdrm').partial_dependency(compile_args: true, includes: true) - -# epoll is a separate library in FreeBSD -if host_machine.system() == 'freebsd' - libepoll = dependency('epoll-shim') -else - libepoll = declare_dependency() -endif - -if not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil) - libavutil = disabler() -endif wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') -wlr_protocol_dir = 'protocol' protocols = { # Stable upstream protocols @@ -60,197 +40,11 @@ protocols = { # Unstable upstream protocols 'fullscreen-shell-unstable-v1': wl_protocol_dir / 'unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml', - 'idle-inhibit-unstable-v1': wl_protocol_dir / 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml', - 'keyboard-shortcuts-inhibit-unstable-v1': wl_protocol_dir / 'unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml', - 'linux-dmabuf-unstable-v1': wl_protocol_dir / 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', - 'pointer-constraints-unstable-v1': wl_protocol_dir / 'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml', - 'relative-pointer-unstable-v1': wl_protocol_dir / 'unstable/relative-pointer/relative-pointer-unstable-v1.xml', - 'text-input-unstable-v3': wl_protocol_dir / 'unstable/text-input/text-input-unstable-v3.xml', - 'xdg-decoration-unstable-v1': wl_protocol_dir / 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml', - - # Other protocols - 'input-method-unstable-v2': wlr_protocol_dir / 'input-method-unstable-v2.xml', - 'kde-idle': wlr_protocol_dir / 'idle.xml', - 'wlr-export-dmabuf-unstable-v1': wlr_protocol_dir / 'wlr-export-dmabuf-unstable-v1.xml', - 'wlr-foreign-toplevel-management-unstable-v1': wlr_protocol_dir / 'wlr-foreign-toplevel-management-unstable-v1.xml', - 'wlr-gamma-control-unstable-v1': wlr_protocol_dir / 'wlr-gamma-control-unstable-v1.xml', - 'wlr-input-inhibitor-unstable-v1': wlr_protocol_dir / 'wlr-input-inhibitor-unstable-v1.xml', - 'wlr-layer-shell-unstable-v1': wlr_protocol_dir / 'wlr-layer-shell-unstable-v1.xml', - 'wlr-output-power-management-unstable-v1': wlr_protocol_dir / 'wlr-output-power-management-unstable-v1.xml', - 'wlr-screencopy-unstable-v1': wlr_protocol_dir / 'wlr-screencopy-unstable-v1.xml', - 'wlr-virtual-pointer-unstable-v1': wlr_protocol_dir / 'wlr-virtual-pointer-unstable-v1.xml', -} - -compositors = { - 'simple': { - 'src': 'simple.c', - }, - 'pointer': { - 'src': 'pointer.c', - }, - 'touch': { - 'src': ['touch.c', 'cat.c'], - }, - 'tablet': { - 'src': 'tablet.c', - }, - 'rotation': { - 'src': ['rotation.c', 'cat.c'], - }, - 'multi-pointer': { - 'src': 'multi-pointer.c', - }, - 'output-layout': { - 'src': ['output-layout.c', 'cat.c'], - }, - 'fullscreen-shell': { - 'src': 'fullscreen-shell.c', - 'proto': ['fullscreen-shell-unstable-v1'], - }, - 'quads': { - 'src': 'quads.c', - }, - 'scene-graph': { - 'src': 'scene-graph.c', - 'proto': ['xdg-shell'], - }, -} - -clients = { - 'idle': { - 'src': 'idle.c', - 'dep': [threads], - 'proto': ['kde-idle'], - }, - 'idle-inhibit': { - 'src': ['idle-inhibit.c', 'egl_common.c'], - 'dep': [wayland_egl, egl, glesv2], - 'proto': [ - 'idle-inhibit-unstable-v1', - 'xdg-shell', - ], - }, - 'keyboard-shortcuts-inhibit': { - 'src': ['keyboard-shortcuts-inhibit.c', 'egl_common.c'], - 'dep': [wayland_egl, wayland_cursor, egl, glesv2], - 'proto': [ - 'keyboard-shortcuts-inhibit-unstable-v1', - 'xdg-shell', - ], - }, - 'layer-shell': { - 'src': ['layer-shell.c', 'egl_common.c'], - 'dep': [wayland_egl, wayland_cursor, egl, glesv2], - 'proto': [ - 'wlr-layer-shell-unstable-v1', - 'xdg-shell', - ], - }, - 'input-inhibitor': { - 'src': ['input-inhibitor.c', 'egl_common.c'], - 'dep': [wayland_egl, wayland_cursor, egl, glesv2], - 'proto': [ - 'wlr-input-inhibitor-unstable-v1', - 'xdg-shell', - ], - }, - 'gamma-control': { - 'src': 'gamma-control.c', - 'dep': [wayland_cursor, math], - 'proto': ['wlr-gamma-control-unstable-v1'], - }, - 'output-power-management': { - 'src': 'output-power-management.c', - 'dep': [wayland_client], - 'proto': ['wlr-output-power-management-unstable-v1'], - }, - 'pointer-constraints': { - 'src': ['pointer-constraints.c', 'egl_common.c'], - 'dep': [wayland_egl, egl, glesv2], - 'proto': [ - 'pointer-constraints-unstable-v1', - 'xdg-shell', - ], - }, - 'relative-pointer': { - 'src': ['relative-pointer-unstable-v1.c', 'egl_common.c'], - 'dep': [wayland_egl, egl, glesv2], - 'proto': [ - 'pointer-constraints-unstable-v1', - 'relative-pointer-unstable-v1', - 'xdg-shell', - ], - }, - 'dmabuf-capture': { - 'src': 'dmabuf-capture.c', - 'dep': [ - libavcodec, - libavformat, - libavutil, - drm, - threads, - ], - 'proto': ['wlr-export-dmabuf-unstable-v1'], - }, - 'screencopy': { - 'src': 'screencopy.c', - 'dep': [libpng, rt], - 'proto': ['wlr-screencopy-unstable-v1'], - }, - 'screencopy-dmabuf': { - 'src': 'screencopy-dmabuf.c', - 'dep': [libpng, rt, gbm, drm], - 'proto': [ - 'wlr-screencopy-unstable-v1', - 'linux-dmabuf-unstable-v1', - ], - }, - 'toplevel-decoration': { - 'src': ['toplevel-decoration.c', 'egl_common.c'], - 'dep': [wayland_egl, egl, glesv2], - 'proto': [ - 'xdg-decoration-unstable-v1', - 'xdg-shell', - ], - }, - 'input-method': { - 'src': 'input-method.c', - 'dep': [wayland_egl, libepoll], - 'proto': [ - 'input-method-unstable-v2', - 'text-input-unstable-v3', - 'xdg-shell', - ], - }, - 'text-input': { - 'src': ['text-input.c', 'egl_common.c'], - 'dep': [wayland_egl, wayland_cursor, egl, glesv2], - 'proto': [ - 'text-input-unstable-v3', - 'xdg-shell', - ], - }, - 'foreign-toplevel': { - 'src': 'foreign-toplevel.c', - 'proto': ['wlr-foreign-toplevel-management-unstable-v1'], - }, - 'virtual-pointer': { - 'src': 'virtual-pointer.c', - 'proto': ['wlr-virtual-pointer-unstable-v1'], - }, - 'input-method-keyboard-grab': { - 'src': 'input-method-keyboard-grab.c', - 'dep': [xkbcommon], - 'proto': [ - 'input-method-unstable-v2', - ], - }, } protocols_code = {} protocols_server_header = {} protocols_client_header = {} -proto_inc = include_directories('protocol') foreach name, path : protocols code = custom_target( @@ -280,6 +74,54 @@ foreach name, path : protocols protocols_client_header += { name: client_header } endforeach + +compositors = { + 'simple': { + 'src': 'simple.c', + }, + 'pointer': { + 'src': 'pointer.c', + }, + 'touch': { + 'src': ['touch.c', 'cat.c'], + }, + 'tablet': { + 'src': 'tablet.c', + }, + 'rotation': { + 'src': ['rotation.c', 'cat.c'], + }, + 'output-layout': { + 'src': ['output-layout.c', 'cat.c'], + }, + 'fullscreen-shell': { + 'src': 'fullscreen-shell.c', + 'proto': ['fullscreen-shell-unstable-v1'], + }, + 'scene-graph': { + 'src': 'scene-graph.c', + 'proto': ['xdg-shell'], + }, + 'output-layers': { + 'src': 'output-layers.c', + 'proto': [ + 'xdg-shell', + ], + }, + 'cairo-buffer': { + 'src': 'cairo-buffer.c', + 'dep': cairo, + }, + 'embedded': { + 'src': [ + 'embedded.c', + protocols_code['xdg-shell'], + protocols_client_header['xdg-shell'], + ], + 'dep': [wayland_client, wayland_egl, egl, glesv2], + }, +} + foreach name, info : compositors extra_src = [] foreach p : info.get('proto', []) @@ -289,29 +131,6 @@ foreach name, info : compositors executable( name, [info.get('src'), extra_src], - dependencies: [libdrm, wlroots, wayland_server, xkbcommon], - include_directories: [proto_inc], + dependencies: [libdrm, wlroots, wayland_server, xkbcommon, info.get('dep', [])], ) endforeach - -foreach name, info : clients - all_dep_found = true - extra_src = [] - foreach d : info.get('dep', []) - all_dep_found = all_dep_found and d.found() - endforeach - foreach p : info.get('proto') - extra_src += protocols_code[p] - extra_src += protocols_client_header[p] - endforeach - - if all_dep_found - executable( - name, - [info.get('src'), extra_src], - dependencies: [wayland_client, info.get('dep', [])], - ) - else - warning('Dependencies not satisfied for ' + name) - endif -endforeach diff --git a/sources b/sources index 635c7d5..2c944e9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.16.2.tar.gz) = 9d5fbee3b87738de75323a056b83446eb93b81ac3e8a4315918d5daad6ed2f50392d9641039f3f830ec1df94155473a2052689d3c029be7572d8ec9ecc62c0e9 -SHA512 (wlroots-0.16.2.tar.gz.sig) = 25e09ed5dba676d4911183a87a25a04040255a7a2ec7dff8e124fd4957ed16cd091e2a5105853d8d5896cdd5db17513f04e7fdf3a79363eb296d40f29245e0fa +SHA512 (wlroots-0.17.0.tar.gz) = ca7314d7dca3ddac3e6970476b4145a0a2566a6632054f406c6e74ea7280a805cdf9b6972cca15c3170a5f41c83677768843b648b6b98ab6428e4ecde43aa4de +SHA512 (wlroots-0.17.0.tar.gz.sig) = fe2136580d6bde59254d88512597da728acb4dd80cb8eda92cb9295118e4a4b28da68a9cec4c6affc7889b99255ec491f694a27977331f949c647ebeb21b8a62 diff --git a/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch b/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch deleted file mode 100644 index 68ecf28..0000000 --- a/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f3ba14e491333d6bbba8c60328c4dbfd20571182 Mon Sep 17 00:00:00 2001 -From: Simon Zeni -Date: Fri, 11 Nov 2022 15:54:07 -0500 -Subject: [PATCH] render/vulkan: remove hardcoded validation layers - -Users should use the VK_INSTANCE_LAYERS env var to set layers at runtime ---- - render/vulkan/renderer.c | 2 ++ - render/vulkan/vulkan.c | 12 ++---------- - 2 files changed, 4 insertions(+), 10 deletions(-) - -diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c -index c64937aa6..ff208abc4 100644 ---- a/render/vulkan/renderer.c -+++ b/render/vulkan/renderer.c -@@ -1938,6 +1938,8 @@ error: - struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd) { - wlr_log(WLR_INFO, "The vulkan renderer is only experimental and " - "not expected to be ready for daily use"); -+ wlr_log(WLR_INFO, "Run with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation " -+ "to enable the validation layer"); - - // NOTE: we could add functionality to allow the compositor passing its - // name and version to this function. Just use dummies until then, -diff --git a/render/vulkan/vulkan.c b/render/vulkan/vulkan.c -index 748ba9c32..c964fe12e 100644 ---- a/render/vulkan/vulkan.c -+++ b/render/vulkan/vulkan.c -@@ -138,21 +138,13 @@ struct wlr_vk_instance *vulkan_instance_create(bool debug) { - .apiVersion = VK_API_VERSION_1_1, - }; - -- const char *layers[] = { -- "VK_LAYER_KHRONOS_validation", -- // "VK_LAYER_RENDERDOC_Capture", -- // "VK_LAYER_live_introspection", -- }; -- -- unsigned layer_count = debug * (sizeof(layers) / sizeof(layers[0])); -- - VkInstanceCreateInfo instance_info = { - .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, - .pApplicationInfo = &application_info, - .enabledExtensionCount = extensions_len, - .ppEnabledExtensionNames = extensions, -- .enabledLayerCount = layer_count, -- .ppEnabledLayerNames = layers, -+ .enabledLayerCount = 0, -+ .ppEnabledLayerNames = NULL, - }; - - VkDebugUtilsMessageSeverityFlagsEXT severity = --- -GitLab - diff --git a/wlroots.spec b/wlroots.spec index c7c6b99..dc36764 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,9 +1,9 @@ # Version of the .so library -%global abi_ver 11 +%global abi_ver 12 Name: wlroots -Version: 0.16.2 -Release: 3%{?dist} +Version: 0.17.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -16,7 +16,6 @@ Summary: A modular Wayland compositor library # * protocol/wlr-layer-shell-unstable-v1.xml # * protocol/wlr-output-management-unstable-v1.xml # - LGPL-2.1-or-later -# * protocol/idle.xml # * protocol/server-decoration.xml # Those files are processed to C-compilable files by the # `wayland-scanner` binary during build and don't alter @@ -35,7 +34,6 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches -Patch0: %{url}/-/commit/f3ba14e491333d6bbba8c60328c4dbfd20571182.patch#/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch # Fedora patches # Following patch is required for phoc. @@ -45,20 +43,23 @@ BuildRequires: gcc BuildRequires: glslang BuildRequires: gnupg2 BuildRequires: meson >= 0.59.0 + +BuildRequires: (pkgconfig(libdisplay-info) >= 0.1.1 with pkgconfig(libdisplay-info) < 0.2) +BuildRequires: (pkgconfig(libliftoff) >= 0.4.0 with pkgconfig(libliftoff) < 0.5.0) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(hwdata) -BuildRequires: pkgconfig(libdrm) >= 2.4.113 +BuildRequires: pkgconfig(libdrm) >= 2.4.114 BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libudev) -BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(pixman-1) >= 0.42.0 BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(wayland-client) -BuildRequires: pkgconfig(wayland-protocols) >= 1.27 +BuildRequires: pkgconfig(wayland-protocols) >= 1.32 BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-server) >= 1.21 +BuildRequires: pkgconfig(wayland-server) >= 1.22 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-errors) @@ -67,14 +68,6 @@ BuildRequires: pkgconfig(xcb-renderutil) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xwayland) -# protocol files required to compile examples (see SOURCE3) -%global example_protocols \ - idle input-method-unstable-v2 wlr-export-dmabuf-unstable-v1 \ - wlr-foreign-toplevel-management-unstable-v1 wlr-gamma-control-unstable-v1 \ - wlr-input-inhibitor-unstable-v1 wlr-layer-shell-unstable-v1 \ - wlr-output-power-management-unstable-v1 wlr-screencopy-unstable-v1 \ - wlr-virtual-pointer-unstable-v1 - %description %{summary}. @@ -87,10 +80,6 @@ Recommends: pkgconfig(xcb-icccm) # for examples Suggests: gcc Suggests: meson >= 0.58.0 -Suggests: pkgconfig(libpng) -Suggests: pkgconfig(libavutil) -Suggests: pkgconfig(libavcodec) -Suggests: pkgconfig(libavformat) Suggests: pkgconfig(wayland-egl) %description devel @@ -117,12 +106,6 @@ MESON_OPTIONS=( %install %{meson_install} - -EXAMPLE_PROTOCOLS=( %{example_protocols} ) # Normalize whitespace by creating an array -install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/*.[ch] -for proto in "${EXAMPLE_PROTOCOLS[@]}"; do - install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples/protocol' "protocol/${proto}.xml" -done install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build' @@ -133,7 +116,7 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %files %license LICENSE %doc README.md -%{_libdir}/lib%{name}.so.%{abi_ver}* +%{_libdir}/lib%{name}.so.%{abi_ver}{,.*} %files devel @@ -144,6 +127,10 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Tue Nov 21 2023 Aleksei Bavshin - 0.17.0-1 +- Update to 0.17.0 (#2250885) +- Use xcb-errors util library + * Sat Jul 22 2023 Fedora Release Engineering - 0.16.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From bb0224f81e919df2d5ad2f28c0f84ed0b1ce38cc Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 2 Dec 2023 23:10:32 -0800 Subject: [PATCH 33/61] Apply patches from 0.17.x bugfix branch --- wlroots-0.17-backports.patch | 500 +++++++++++++++++++++++++++++++++++ wlroots.spec | 11 +- 2 files changed, 507 insertions(+), 4 deletions(-) create mode 100644 wlroots-0.17-backports.patch diff --git a/wlroots-0.17-backports.patch b/wlroots-0.17-backports.patch new file mode 100644 index 0000000..bd2528c --- /dev/null +++ b/wlroots-0.17-backports.patch @@ -0,0 +1,500 @@ +From fe53ec693789afb44c899cad8c2df70c8f9f9023 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Tue, 21 Nov 2023 17:22:02 +0100 +Subject: [PATCH 01/10] tinywl: fix wlroots dependency constraint in Makefile + +--- + tinywl/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tinywl/Makefile b/tinywl/Makefile +index 0cfb3cd2..8f1df207 100644 +--- a/tinywl/Makefile ++++ b/tinywl/Makefile +@@ -1,7 +1,7 @@ + WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols) + WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner) + LIBS=\ +- $(shell pkg-config --cflags --libs "wlroots >= 0.17.0-dev") \ ++ $(shell pkg-config --cflags --libs "wlroots >= 0.17.0") \ + $(shell pkg-config --cflags --libs wayland-server) \ + $(shell pkg-config --cflags --libs xkbcommon) + +-- +2.43.0 + + +From b909cc71cdc853a67bfb9323290b4ddc165cba72 Mon Sep 17 00:00:00 2001 +From: Kirill Primak +Date: Sun, 26 Nov 2023 00:51:50 +0300 +Subject: [PATCH 02/10] backend/x11: don't send ConfigureRequest with the same + size + +Under X11, ConfigureNotify means that the window has already been resized. +Sending ConfigureRequest with the received size is not only useless, but also +can confuse the window manager, which will probably reply with the current +(i.e. *old*) size causing a configure loop. + +Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3769 +(cherry picked from commit 4990ed99ebc8eeb508e0077f620ec2df781fabdb) +--- + backend/x11/output.c | 13 +++++++++++++ + include/backend/x11.h | 2 ++ + 2 files changed, 15 insertions(+) + +diff --git a/backend/x11/output.c b/backend/x11/output.c +index f5dc527c..59f2d87d 100644 +--- a/backend/x11/output.c ++++ b/backend/x11/output.c +@@ -64,6 +64,10 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output, + struct wlr_x11_output *output = get_x11_output_from_output(wlr_output); + struct wlr_x11_backend *x11 = output->x11; + ++ if (width == output->win_width && height == output->win_height) { ++ return true; ++ } ++ + const uint32_t values[] = { width, height }; + xcb_void_cookie_t cookie = xcb_configure_window_checked( + x11->xcb, output->win, +@@ -77,6 +81,9 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output, + return false; + } + ++ output->win_width = width; ++ output->win_height = height; ++ + // Move the pointer to its new location + update_x11_pointer_position(output, output->x11->time); + +@@ -579,6 +586,9 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) { + x11->screen->root, 0, 0, wlr_output->width, wlr_output->height, 0, + XCB_WINDOW_CLASS_INPUT_OUTPUT, x11->visualid, mask, values); + ++ output->win_width = wlr_output->width; ++ output->win_height = wlr_output->height; ++ + struct { + xcb_input_event_mask_t head; + xcb_input_xi_event_mask_t mask; +@@ -640,6 +650,9 @@ void handle_x11_configure_notify(struct wlr_x11_output *output, + return; + } + ++ output->win_width = ev->width; ++ output->win_height = ev->height; ++ + struct wlr_output_state state; + wlr_output_state_init(&state); + wlr_output_state_set_custom_mode(&state, ev->width, ev->height, 0); +diff --git a/include/backend/x11.h b/include/backend/x11.h +index 06834c1c..9eb208b1 100644 +--- a/include/backend/x11.h ++++ b/include/backend/x11.h +@@ -35,6 +35,8 @@ struct wlr_x11_output { + xcb_window_t win; + xcb_present_event_t present_event_id; + ++ int32_t win_width, win_height; ++ + struct wlr_pointer pointer; + + struct wlr_touch touch; +-- +2.43.0 + + +From 3ada3efe4f922489b7f262af13a686fada9c191a Mon Sep 17 00:00:00 2001 +From: Kirill Primak +Date: Sun, 26 Nov 2023 23:05:44 +0300 +Subject: [PATCH 03/10] backend/x11: check buffer format in output_test() + +(cherry picked from commit 4102b722d9812dbdc6bc0a8cb816e429d4533424) +--- + backend/x11/output.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/backend/x11/output.c b/backend/x11/output.c +index 59f2d87d..2521795d 100644 +--- a/backend/x11/output.c ++++ b/backend/x11/output.c +@@ -121,6 +121,9 @@ static void output_destroy(struct wlr_output *wlr_output) { + + static bool output_test(struct wlr_output *wlr_output, + const struct wlr_output_state *state) { ++ struct wlr_x11_output *output = get_x11_output_from_output(wlr_output); ++ struct wlr_x11_backend *x11 = output->x11; ++ + uint32_t unsupported = state->committed & ~SUPPORTED_OUTPUT_STATE; + if (unsupported != 0) { + wlr_log(WLR_DEBUG, "Unsupported output state fields: 0x%"PRIx32, +@@ -140,6 +143,22 @@ static bool output_test(struct wlr_output *wlr_output, + } + } + ++ if (state->committed & WLR_OUTPUT_STATE_BUFFER) { ++ struct wlr_buffer *buffer = state->buffer; ++ struct wlr_dmabuf_attributes dmabuf_attrs; ++ struct wlr_shm_attributes shm_attrs; ++ uint32_t format = DRM_FORMAT_INVALID; ++ if (wlr_buffer_get_dmabuf(buffer, &dmabuf_attrs)) { ++ format = dmabuf_attrs.format; ++ } else if (wlr_buffer_get_shm(buffer, &shm_attrs)) { ++ format = shm_attrs.format; ++ } ++ if (format != x11->x11_format->drm) { ++ wlr_log(WLR_DEBUG, "Unsupported buffer format"); ++ return false; ++ } ++ } ++ + if (state->committed & WLR_OUTPUT_STATE_MODE) { + assert(state->mode_type == WLR_OUTPUT_STATE_MODE_CUSTOM); + +-- +2.43.0 + + +From 8f6625945ec5bc7453e6b969c8600ddabbc58444 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Fri, 24 Nov 2023 16:48:34 +0100 +Subject: [PATCH 04/10] viewporter: rename state var in + viewport_handle_surface_commit() + +"current" is misleading, since we are using the pending state here. + +(cherry picked from commit d1c88a22a363620f9eb1a6286f01c7aac197f260) +--- + types/wlr_viewporter.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c +index 9e743d59..a4a0d92d 100644 +--- a/types/wlr_viewporter.c ++++ b/types/wlr_viewporter.c +@@ -136,22 +136,22 @@ static void viewport_handle_surface_commit(struct wl_listener *listener, + struct wlr_viewport *viewport = + wl_container_of(listener, viewport, surface_commit); + +- struct wlr_surface_state *current = &viewport->surface->pending; ++ struct wlr_surface_state *state = &viewport->surface->pending; + +- if (!current->viewport.has_dst && +- (floor(current->viewport.src.width) != current->viewport.src.width || +- floor(current->viewport.src.height) != current->viewport.src.height)) { ++ if (!state->viewport.has_dst && ++ (floor(state->viewport.src.width) != state->viewport.src.width || ++ floor(state->viewport.src.height) != state->viewport.src.height)) { + wl_resource_post_error(viewport->resource, WP_VIEWPORT_ERROR_BAD_SIZE, + "wl_viewport.set_source width and height must be integers " + "when the destination rectangle is unset"); + return; + } + +- if (current->viewport.has_src && current->buffer != NULL && +- (current->viewport.src.x + current->viewport.src.width > +- current->buffer_width || +- current->viewport.src.y + current->viewport.src.height > +- current->buffer_height)) { ++ if (state->viewport.has_src && state->buffer != NULL && ++ (state->viewport.src.x + state->viewport.src.width > ++ state->buffer_width || ++ state->viewport.src.y + state->viewport.src.height > ++ state->buffer_height)) { + wl_resource_post_error(viewport->resource, WP_VIEWPORT_ERROR_OUT_OF_BUFFER, + "source rectangle out of buffer bounds"); + return; +-- +2.43.0 + + +From f070bab7db6bac66407ebc2270dc081c548aef65 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Fri, 24 Nov 2023 16:50:17 +0100 +Subject: [PATCH 05/10] viewporter: listen to client_commit + +The commit event fires too late: we're interested in checking the +values at wl_surface.commit time, not after. + +(cherry picked from commit 7dcb045176ae72140c5e27abeca3e5fde982489c) +--- + types/wlr_viewporter.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c +index a4a0d92d..cb5d1df1 100644 +--- a/types/wlr_viewporter.c ++++ b/types/wlr_viewporter.c +@@ -13,7 +13,7 @@ struct wlr_viewport { + + struct wlr_addon addon; + +- struct wl_listener surface_commit; ++ struct wl_listener surface_client_commit; + }; + + static const struct wp_viewport_interface viewport_impl; +@@ -112,7 +112,7 @@ static void viewport_destroy(struct wlr_viewport *viewport) { + wlr_addon_finish(&viewport->addon); + + wl_resource_set_user_data(viewport->resource, NULL); +- wl_list_remove(&viewport->surface_commit.link); ++ wl_list_remove(&viewport->surface_client_commit.link); + free(viewport); + } + +@@ -131,10 +131,10 @@ static void viewport_handle_resource_destroy(struct wl_resource *resource) { + viewport_destroy(viewport); + } + +-static void viewport_handle_surface_commit(struct wl_listener *listener, ++static void viewport_handle_surface_client_commit(struct wl_listener *listener, + void *data) { + struct wlr_viewport *viewport = +- wl_container_of(listener, viewport, surface_commit); ++ wl_container_of(listener, viewport, surface_client_commit); + + struct wlr_surface_state *state = &viewport->surface->pending; + +@@ -195,8 +195,8 @@ static void viewporter_handle_get_viewport(struct wl_client *client, + + wlr_addon_init(&viewport->addon, &surface->addons, NULL, &surface_addon_impl); + +- viewport->surface_commit.notify = viewport_handle_surface_commit; +- wl_signal_add(&surface->events.commit, &viewport->surface_commit); ++ viewport->surface_client_commit.notify = viewport_handle_surface_client_commit; ++ wl_signal_add(&surface->events.client_commit, &viewport->surface_client_commit); + } + + static const struct wp_viewporter_interface viewporter_impl = { +-- +2.43.0 + + +From b05fef20ff27e975948859667d1bf4543826474c Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Fri, 24 Nov 2023 17:00:34 +0100 +Subject: [PATCH 06/10] viewporter: fix src buffer bounds check + +The surface scale and transform are applied before the viewport. + +Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3766 +(cherry picked from commit 4fbe648fafe687a061e246c2f16b971ecfaf89ec) +--- + types/wlr_viewporter.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c +index cb5d1df1..0e5069bb 100644 +--- a/types/wlr_viewporter.c ++++ b/types/wlr_viewporter.c +@@ -131,6 +131,19 @@ static void viewport_handle_resource_destroy(struct wl_resource *resource) { + viewport_destroy(viewport); + } + ++static bool check_src_buffer_bounds(const struct wlr_surface_state *state) { ++ int width = state->buffer_width / state->scale; ++ int height = state->buffer_height / state->scale; ++ if (state->transform & WL_OUTPUT_TRANSFORM_90) { ++ int tmp = width; ++ width = height; ++ height = tmp; ++ } ++ ++ struct wlr_fbox box = state->viewport.src; ++ return box.x + box.width <= width && box.y + box.height <= height; ++} ++ + static void viewport_handle_surface_client_commit(struct wl_listener *listener, + void *data) { + struct wlr_viewport *viewport = +@@ -148,10 +161,7 @@ static void viewport_handle_surface_client_commit(struct wl_listener *listener, + } + + if (state->viewport.has_src && state->buffer != NULL && +- (state->viewport.src.x + state->viewport.src.width > +- state->buffer_width || +- state->viewport.src.y + state->viewport.src.height > +- state->buffer_height)) { ++ !check_src_buffer_bounds(state)) { + wl_resource_post_error(viewport->resource, WP_VIEWPORT_ERROR_OUT_OF_BUFFER, + "source rectangle out of buffer bounds"); + return; +-- +2.43.0 + + +From 6d13d1814e019b11ea5dc07261e505373a277cb6 Mon Sep 17 00:00:00 2001 +From: Simon Zeni +Date: Thu, 30 Nov 2023 13:29:18 -0500 +Subject: [PATCH 07/10] types/output: emit destroy event before destroying + global + +(cherry picked from commit 5d639394f3e83b01596dcd166a44a9a1a2583350) +--- + types/output/output.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/types/output/output.c b/types/output/output.c +index 08a71d83..af2fab5e 100644 +--- a/types/output/output.c ++++ b/types/output/output.c +@@ -450,11 +450,12 @@ void wlr_output_destroy(struct wlr_output *output) { + return; + } + ++ wl_signal_emit_mutable(&output->events.destroy, output); ++ + wl_list_remove(&output->display_destroy.link); + wlr_output_destroy_global(output); + output_clear_back_buffer(output); + +- wl_signal_emit_mutable(&output->events.destroy, output); + wlr_addon_set_finish(&output->addons); + + // The backend is responsible for free-ing the list of modes +-- +2.43.0 + + +From fcf62ba7096653de7feb19c1978d1fbfabf83ec5 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Mon, 20 Nov 2023 20:48:55 +0100 +Subject: [PATCH 08/10] render/egl: fallback to GBM FD if EGLDevice is not + available + +It's possible that we don't have an EGLDevice if we created the +EGL context from a GBM device. Let's ensure all GPU-accelerated +renderers always have a DRM FD to return by falling back to GBM's +FD. + +(cherry picked from commit 395a08f5d19151b6a1a6e788c9f112a00953ec37) +--- + render/egl.c | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +diff --git a/render/egl.c b/render/egl.c +index 8a1e6dae..162634be 100644 +--- a/render/egl.c ++++ b/render/egl.c +@@ -954,7 +954,7 @@ static char *get_render_name(const char *name) { + return render_name; + } + +-int wlr_egl_dup_drm_fd(struct wlr_egl *egl) { ++static int dup_egl_device_drm_fd(struct wlr_egl *egl) { + if (egl->device == EGL_NO_DEVICE_EXT || (!egl->exts.EXT_device_drm && + !egl->exts.EXT_device_drm_render_node)) { + return -1; +@@ -1001,3 +1001,21 @@ int wlr_egl_dup_drm_fd(struct wlr_egl *egl) { + + return render_fd; + } ++ ++int wlr_egl_dup_drm_fd(struct wlr_egl *egl) { ++ int fd = dup_egl_device_drm_fd(egl); ++ if (fd >= 0) { ++ return fd; ++ } ++ ++ // Fallback to GBM's FD if we can't use EGLDevice ++ if (egl->gbm_device == NULL) { ++ return -1; ++ } ++ ++ fd = fcntl(gbm_device_get_fd(egl->gbm_device), F_DUPFD_CLOEXEC, 0); ++ if (fd < 0) { ++ wlr_log_errno(WLR_ERROR, "Failed to dup GBM FD"); ++ } ++ return fd; ++} +-- +2.43.0 + + +From bb8bcb354e7d2fb6b62b4397e39213be2005e040 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Mon, 20 Nov 2023 21:18:57 +0100 +Subject: [PATCH 09/10] render: disable linux-dmabuf without DRM FD + +linux-dmabuf used to not need a DRM FD, however since v4 a DRM FD +is required for the main_device event. + +(cherry picked from commit 4ed8df9ab2fd540113a171940f990874063641ad) +--- + render/wlr_renderer.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c +index d4043b43..2bdcff5a 100644 +--- a/render/wlr_renderer.c ++++ b/render/wlr_renderer.c +@@ -228,13 +228,10 @@ bool wlr_renderer_init_wl_display(struct wlr_renderer *r, + return false; + } + +- if (wlr_renderer_get_dmabuf_texture_formats(r) != NULL) { +- if (wlr_renderer_get_drm_fd(r) >= 0) { +- if (wlr_drm_create(wl_display, r) == NULL) { +- return false; +- } +- } else { +- wlr_log(WLR_INFO, "Cannot get renderer DRM FD, disabling wl_drm"); ++ if (wlr_renderer_get_dmabuf_texture_formats(r) != NULL && ++ wlr_renderer_get_drm_fd(r) >= 0) { ++ if (wlr_drm_create(wl_display, r) == NULL) { ++ return false; + } + + if (wlr_linux_dmabuf_v1_create_with_renderer(wl_display, 4, r) == NULL) { +-- +2.43.0 + + +From a577308276a85d77f9c784902e1b5702a9b7281b Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Thu, 30 Nov 2023 12:23:00 +0100 +Subject: [PATCH 10/10] cursor: send surface scale events + +wlr_cursor is responsible for sending enter/leave events, but +doesn't send fractional-scale-v1 and wl_surface.preferred_buffer_scale +events. This is not an easy thing to do from a compositor, so let's +just do it in wlr_cursor itself. + +(cherry picked from commit 78836298efc6930db482806fadc605de72897ccc) +--- + types/wlr_cursor.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c +index ee41337a..4e5c3473 100644 +--- a/types/wlr_cursor.c ++++ b/types/wlr_cursor.c +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -545,6 +546,16 @@ static void cursor_output_cursor_update(struct wlr_cursor_output_cursor *output_ + } else { + wlr_surface_send_leave(surface, output); + } ++ ++ float scale = 1; ++ struct wlr_surface_output *surface_output; ++ wl_list_for_each(surface_output, &surface->current_outputs, link) { ++ if (surface_output->output->scale > scale) { ++ scale = surface_output->output->scale; ++ } ++ } ++ wlr_fractional_scale_v1_notify_scale(surface, scale); ++ wlr_surface_set_preferred_buffer_scale(surface, ceil(scale)); + } else if (cur->state->xcursor_name != NULL) { + struct wlr_xcursor_manager *manager = cur->state->xcursor_manager; + const char *name = cur->state->xcursor_name; +-- +2.43.0 + diff --git a/wlroots.spec b/wlroots.spec index dc36764..24f2666 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -34,10 +34,12 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches +# https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4461 +Patch: wlroots-0.17-backports.patch # Fedora patches # Following patch is required for phoc. -Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch +Patch: Revert-layer-shell-error-on-0-dimension-without-anch.patch BuildRequires: gcc BuildRequires: glslang @@ -89,9 +91,9 @@ Development files for %{name}. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -N -# apply unconditional patches -%autopatch -p1 -M19 -# apply conditional patches +# apply unconditional patches (0..99) +%autopatch -p1 -M99 +# apply conditional patches (100..) %build @@ -130,6 +132,7 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build * Tue Nov 21 2023 Aleksei Bavshin - 0.17.0-1 - Update to 0.17.0 (#2250885) - Use xcb-errors util library +- Apply patches from 0.17.x bugfix branch * Sat Jul 22 2023 Fedora Release Engineering - 0.16.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 99aa7067f08a3faa3bf05d729efc06f9a20a601e Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 21 Dec 2023 17:04:14 -0800 Subject: [PATCH 34/61] Update to 0.17.1 (#2255547) --- sources | 4 +- wlroots-0.17-backports.patch | 500 ----------------------------------- wlroots.spec | 7 +- 3 files changed, 6 insertions(+), 505 deletions(-) delete mode 100644 wlroots-0.17-backports.patch diff --git a/sources b/sources index 2c944e9..82fccdf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.17.0.tar.gz) = ca7314d7dca3ddac3e6970476b4145a0a2566a6632054f406c6e74ea7280a805cdf9b6972cca15c3170a5f41c83677768843b648b6b98ab6428e4ecde43aa4de -SHA512 (wlroots-0.17.0.tar.gz.sig) = fe2136580d6bde59254d88512597da728acb4dd80cb8eda92cb9295118e4a4b28da68a9cec4c6affc7889b99255ec491f694a27977331f949c647ebeb21b8a62 +SHA512 (wlroots-0.17.1.tar.gz) = 33360da04c5af807d775638a06844ada21fa451a745bcbb8d92b005608195c6301bd27b5c1e815990a581b6330b9343a00fc8f8e93a3764e8a856f74d55f8ff7 +SHA512 (wlroots-0.17.1.tar.gz.sig) = 1a7cd6ec2a4a6e6e4da9e387bbf2a295dc63740fc9caba965493c2293244ef2c8e211f663a60fbc9ed51f1fc1a18f145bcab23b98eb32057243e0d7a1b563070 diff --git a/wlroots-0.17-backports.patch b/wlroots-0.17-backports.patch deleted file mode 100644 index bd2528c..0000000 --- a/wlroots-0.17-backports.patch +++ /dev/null @@ -1,500 +0,0 @@ -From fe53ec693789afb44c899cad8c2df70c8f9f9023 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Tue, 21 Nov 2023 17:22:02 +0100 -Subject: [PATCH 01/10] tinywl: fix wlroots dependency constraint in Makefile - ---- - tinywl/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tinywl/Makefile b/tinywl/Makefile -index 0cfb3cd2..8f1df207 100644 ---- a/tinywl/Makefile -+++ b/tinywl/Makefile -@@ -1,7 +1,7 @@ - WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols) - WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner) - LIBS=\ -- $(shell pkg-config --cflags --libs "wlroots >= 0.17.0-dev") \ -+ $(shell pkg-config --cflags --libs "wlroots >= 0.17.0") \ - $(shell pkg-config --cflags --libs wayland-server) \ - $(shell pkg-config --cflags --libs xkbcommon) - --- -2.43.0 - - -From b909cc71cdc853a67bfb9323290b4ddc165cba72 Mon Sep 17 00:00:00 2001 -From: Kirill Primak -Date: Sun, 26 Nov 2023 00:51:50 +0300 -Subject: [PATCH 02/10] backend/x11: don't send ConfigureRequest with the same - size - -Under X11, ConfigureNotify means that the window has already been resized. -Sending ConfigureRequest with the received size is not only useless, but also -can confuse the window manager, which will probably reply with the current -(i.e. *old*) size causing a configure loop. - -Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3769 -(cherry picked from commit 4990ed99ebc8eeb508e0077f620ec2df781fabdb) ---- - backend/x11/output.c | 13 +++++++++++++ - include/backend/x11.h | 2 ++ - 2 files changed, 15 insertions(+) - -diff --git a/backend/x11/output.c b/backend/x11/output.c -index f5dc527c..59f2d87d 100644 ---- a/backend/x11/output.c -+++ b/backend/x11/output.c -@@ -64,6 +64,10 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output, - struct wlr_x11_output *output = get_x11_output_from_output(wlr_output); - struct wlr_x11_backend *x11 = output->x11; - -+ if (width == output->win_width && height == output->win_height) { -+ return true; -+ } -+ - const uint32_t values[] = { width, height }; - xcb_void_cookie_t cookie = xcb_configure_window_checked( - x11->xcb, output->win, -@@ -77,6 +81,9 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output, - return false; - } - -+ output->win_width = width; -+ output->win_height = height; -+ - // Move the pointer to its new location - update_x11_pointer_position(output, output->x11->time); - -@@ -579,6 +586,9 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) { - x11->screen->root, 0, 0, wlr_output->width, wlr_output->height, 0, - XCB_WINDOW_CLASS_INPUT_OUTPUT, x11->visualid, mask, values); - -+ output->win_width = wlr_output->width; -+ output->win_height = wlr_output->height; -+ - struct { - xcb_input_event_mask_t head; - xcb_input_xi_event_mask_t mask; -@@ -640,6 +650,9 @@ void handle_x11_configure_notify(struct wlr_x11_output *output, - return; - } - -+ output->win_width = ev->width; -+ output->win_height = ev->height; -+ - struct wlr_output_state state; - wlr_output_state_init(&state); - wlr_output_state_set_custom_mode(&state, ev->width, ev->height, 0); -diff --git a/include/backend/x11.h b/include/backend/x11.h -index 06834c1c..9eb208b1 100644 ---- a/include/backend/x11.h -+++ b/include/backend/x11.h -@@ -35,6 +35,8 @@ struct wlr_x11_output { - xcb_window_t win; - xcb_present_event_t present_event_id; - -+ int32_t win_width, win_height; -+ - struct wlr_pointer pointer; - - struct wlr_touch touch; --- -2.43.0 - - -From 3ada3efe4f922489b7f262af13a686fada9c191a Mon Sep 17 00:00:00 2001 -From: Kirill Primak -Date: Sun, 26 Nov 2023 23:05:44 +0300 -Subject: [PATCH 03/10] backend/x11: check buffer format in output_test() - -(cherry picked from commit 4102b722d9812dbdc6bc0a8cb816e429d4533424) ---- - backend/x11/output.c | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/backend/x11/output.c b/backend/x11/output.c -index 59f2d87d..2521795d 100644 ---- a/backend/x11/output.c -+++ b/backend/x11/output.c -@@ -121,6 +121,9 @@ static void output_destroy(struct wlr_output *wlr_output) { - - static bool output_test(struct wlr_output *wlr_output, - const struct wlr_output_state *state) { -+ struct wlr_x11_output *output = get_x11_output_from_output(wlr_output); -+ struct wlr_x11_backend *x11 = output->x11; -+ - uint32_t unsupported = state->committed & ~SUPPORTED_OUTPUT_STATE; - if (unsupported != 0) { - wlr_log(WLR_DEBUG, "Unsupported output state fields: 0x%"PRIx32, -@@ -140,6 +143,22 @@ static bool output_test(struct wlr_output *wlr_output, - } - } - -+ if (state->committed & WLR_OUTPUT_STATE_BUFFER) { -+ struct wlr_buffer *buffer = state->buffer; -+ struct wlr_dmabuf_attributes dmabuf_attrs; -+ struct wlr_shm_attributes shm_attrs; -+ uint32_t format = DRM_FORMAT_INVALID; -+ if (wlr_buffer_get_dmabuf(buffer, &dmabuf_attrs)) { -+ format = dmabuf_attrs.format; -+ } else if (wlr_buffer_get_shm(buffer, &shm_attrs)) { -+ format = shm_attrs.format; -+ } -+ if (format != x11->x11_format->drm) { -+ wlr_log(WLR_DEBUG, "Unsupported buffer format"); -+ return false; -+ } -+ } -+ - if (state->committed & WLR_OUTPUT_STATE_MODE) { - assert(state->mode_type == WLR_OUTPUT_STATE_MODE_CUSTOM); - --- -2.43.0 - - -From 8f6625945ec5bc7453e6b969c8600ddabbc58444 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Fri, 24 Nov 2023 16:48:34 +0100 -Subject: [PATCH 04/10] viewporter: rename state var in - viewport_handle_surface_commit() - -"current" is misleading, since we are using the pending state here. - -(cherry picked from commit d1c88a22a363620f9eb1a6286f01c7aac197f260) ---- - types/wlr_viewporter.c | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c -index 9e743d59..a4a0d92d 100644 ---- a/types/wlr_viewporter.c -+++ b/types/wlr_viewporter.c -@@ -136,22 +136,22 @@ static void viewport_handle_surface_commit(struct wl_listener *listener, - struct wlr_viewport *viewport = - wl_container_of(listener, viewport, surface_commit); - -- struct wlr_surface_state *current = &viewport->surface->pending; -+ struct wlr_surface_state *state = &viewport->surface->pending; - -- if (!current->viewport.has_dst && -- (floor(current->viewport.src.width) != current->viewport.src.width || -- floor(current->viewport.src.height) != current->viewport.src.height)) { -+ if (!state->viewport.has_dst && -+ (floor(state->viewport.src.width) != state->viewport.src.width || -+ floor(state->viewport.src.height) != state->viewport.src.height)) { - wl_resource_post_error(viewport->resource, WP_VIEWPORT_ERROR_BAD_SIZE, - "wl_viewport.set_source width and height must be integers " - "when the destination rectangle is unset"); - return; - } - -- if (current->viewport.has_src && current->buffer != NULL && -- (current->viewport.src.x + current->viewport.src.width > -- current->buffer_width || -- current->viewport.src.y + current->viewport.src.height > -- current->buffer_height)) { -+ if (state->viewport.has_src && state->buffer != NULL && -+ (state->viewport.src.x + state->viewport.src.width > -+ state->buffer_width || -+ state->viewport.src.y + state->viewport.src.height > -+ state->buffer_height)) { - wl_resource_post_error(viewport->resource, WP_VIEWPORT_ERROR_OUT_OF_BUFFER, - "source rectangle out of buffer bounds"); - return; --- -2.43.0 - - -From f070bab7db6bac66407ebc2270dc081c548aef65 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Fri, 24 Nov 2023 16:50:17 +0100 -Subject: [PATCH 05/10] viewporter: listen to client_commit - -The commit event fires too late: we're interested in checking the -values at wl_surface.commit time, not after. - -(cherry picked from commit 7dcb045176ae72140c5e27abeca3e5fde982489c) ---- - types/wlr_viewporter.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c -index a4a0d92d..cb5d1df1 100644 ---- a/types/wlr_viewporter.c -+++ b/types/wlr_viewporter.c -@@ -13,7 +13,7 @@ struct wlr_viewport { - - struct wlr_addon addon; - -- struct wl_listener surface_commit; -+ struct wl_listener surface_client_commit; - }; - - static const struct wp_viewport_interface viewport_impl; -@@ -112,7 +112,7 @@ static void viewport_destroy(struct wlr_viewport *viewport) { - wlr_addon_finish(&viewport->addon); - - wl_resource_set_user_data(viewport->resource, NULL); -- wl_list_remove(&viewport->surface_commit.link); -+ wl_list_remove(&viewport->surface_client_commit.link); - free(viewport); - } - -@@ -131,10 +131,10 @@ static void viewport_handle_resource_destroy(struct wl_resource *resource) { - viewport_destroy(viewport); - } - --static void viewport_handle_surface_commit(struct wl_listener *listener, -+static void viewport_handle_surface_client_commit(struct wl_listener *listener, - void *data) { - struct wlr_viewport *viewport = -- wl_container_of(listener, viewport, surface_commit); -+ wl_container_of(listener, viewport, surface_client_commit); - - struct wlr_surface_state *state = &viewport->surface->pending; - -@@ -195,8 +195,8 @@ static void viewporter_handle_get_viewport(struct wl_client *client, - - wlr_addon_init(&viewport->addon, &surface->addons, NULL, &surface_addon_impl); - -- viewport->surface_commit.notify = viewport_handle_surface_commit; -- wl_signal_add(&surface->events.commit, &viewport->surface_commit); -+ viewport->surface_client_commit.notify = viewport_handle_surface_client_commit; -+ wl_signal_add(&surface->events.client_commit, &viewport->surface_client_commit); - } - - static const struct wp_viewporter_interface viewporter_impl = { --- -2.43.0 - - -From b05fef20ff27e975948859667d1bf4543826474c Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Fri, 24 Nov 2023 17:00:34 +0100 -Subject: [PATCH 06/10] viewporter: fix src buffer bounds check - -The surface scale and transform are applied before the viewport. - -Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3766 -(cherry picked from commit 4fbe648fafe687a061e246c2f16b971ecfaf89ec) ---- - types/wlr_viewporter.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c -index cb5d1df1..0e5069bb 100644 ---- a/types/wlr_viewporter.c -+++ b/types/wlr_viewporter.c -@@ -131,6 +131,19 @@ static void viewport_handle_resource_destroy(struct wl_resource *resource) { - viewport_destroy(viewport); - } - -+static bool check_src_buffer_bounds(const struct wlr_surface_state *state) { -+ int width = state->buffer_width / state->scale; -+ int height = state->buffer_height / state->scale; -+ if (state->transform & WL_OUTPUT_TRANSFORM_90) { -+ int tmp = width; -+ width = height; -+ height = tmp; -+ } -+ -+ struct wlr_fbox box = state->viewport.src; -+ return box.x + box.width <= width && box.y + box.height <= height; -+} -+ - static void viewport_handle_surface_client_commit(struct wl_listener *listener, - void *data) { - struct wlr_viewport *viewport = -@@ -148,10 +161,7 @@ static void viewport_handle_surface_client_commit(struct wl_listener *listener, - } - - if (state->viewport.has_src && state->buffer != NULL && -- (state->viewport.src.x + state->viewport.src.width > -- state->buffer_width || -- state->viewport.src.y + state->viewport.src.height > -- state->buffer_height)) { -+ !check_src_buffer_bounds(state)) { - wl_resource_post_error(viewport->resource, WP_VIEWPORT_ERROR_OUT_OF_BUFFER, - "source rectangle out of buffer bounds"); - return; --- -2.43.0 - - -From 6d13d1814e019b11ea5dc07261e505373a277cb6 Mon Sep 17 00:00:00 2001 -From: Simon Zeni -Date: Thu, 30 Nov 2023 13:29:18 -0500 -Subject: [PATCH 07/10] types/output: emit destroy event before destroying - global - -(cherry picked from commit 5d639394f3e83b01596dcd166a44a9a1a2583350) ---- - types/output/output.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/types/output/output.c b/types/output/output.c -index 08a71d83..af2fab5e 100644 ---- a/types/output/output.c -+++ b/types/output/output.c -@@ -450,11 +450,12 @@ void wlr_output_destroy(struct wlr_output *output) { - return; - } - -+ wl_signal_emit_mutable(&output->events.destroy, output); -+ - wl_list_remove(&output->display_destroy.link); - wlr_output_destroy_global(output); - output_clear_back_buffer(output); - -- wl_signal_emit_mutable(&output->events.destroy, output); - wlr_addon_set_finish(&output->addons); - - // The backend is responsible for free-ing the list of modes --- -2.43.0 - - -From fcf62ba7096653de7feb19c1978d1fbfabf83ec5 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Mon, 20 Nov 2023 20:48:55 +0100 -Subject: [PATCH 08/10] render/egl: fallback to GBM FD if EGLDevice is not - available - -It's possible that we don't have an EGLDevice if we created the -EGL context from a GBM device. Let's ensure all GPU-accelerated -renderers always have a DRM FD to return by falling back to GBM's -FD. - -(cherry picked from commit 395a08f5d19151b6a1a6e788c9f112a00953ec37) ---- - render/egl.c | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -diff --git a/render/egl.c b/render/egl.c -index 8a1e6dae..162634be 100644 ---- a/render/egl.c -+++ b/render/egl.c -@@ -954,7 +954,7 @@ static char *get_render_name(const char *name) { - return render_name; - } - --int wlr_egl_dup_drm_fd(struct wlr_egl *egl) { -+static int dup_egl_device_drm_fd(struct wlr_egl *egl) { - if (egl->device == EGL_NO_DEVICE_EXT || (!egl->exts.EXT_device_drm && - !egl->exts.EXT_device_drm_render_node)) { - return -1; -@@ -1001,3 +1001,21 @@ int wlr_egl_dup_drm_fd(struct wlr_egl *egl) { - - return render_fd; - } -+ -+int wlr_egl_dup_drm_fd(struct wlr_egl *egl) { -+ int fd = dup_egl_device_drm_fd(egl); -+ if (fd >= 0) { -+ return fd; -+ } -+ -+ // Fallback to GBM's FD if we can't use EGLDevice -+ if (egl->gbm_device == NULL) { -+ return -1; -+ } -+ -+ fd = fcntl(gbm_device_get_fd(egl->gbm_device), F_DUPFD_CLOEXEC, 0); -+ if (fd < 0) { -+ wlr_log_errno(WLR_ERROR, "Failed to dup GBM FD"); -+ } -+ return fd; -+} --- -2.43.0 - - -From bb8bcb354e7d2fb6b62b4397e39213be2005e040 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Mon, 20 Nov 2023 21:18:57 +0100 -Subject: [PATCH 09/10] render: disable linux-dmabuf without DRM FD - -linux-dmabuf used to not need a DRM FD, however since v4 a DRM FD -is required for the main_device event. - -(cherry picked from commit 4ed8df9ab2fd540113a171940f990874063641ad) ---- - render/wlr_renderer.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c -index d4043b43..2bdcff5a 100644 ---- a/render/wlr_renderer.c -+++ b/render/wlr_renderer.c -@@ -228,13 +228,10 @@ bool wlr_renderer_init_wl_display(struct wlr_renderer *r, - return false; - } - -- if (wlr_renderer_get_dmabuf_texture_formats(r) != NULL) { -- if (wlr_renderer_get_drm_fd(r) >= 0) { -- if (wlr_drm_create(wl_display, r) == NULL) { -- return false; -- } -- } else { -- wlr_log(WLR_INFO, "Cannot get renderer DRM FD, disabling wl_drm"); -+ if (wlr_renderer_get_dmabuf_texture_formats(r) != NULL && -+ wlr_renderer_get_drm_fd(r) >= 0) { -+ if (wlr_drm_create(wl_display, r) == NULL) { -+ return false; - } - - if (wlr_linux_dmabuf_v1_create_with_renderer(wl_display, 4, r) == NULL) { --- -2.43.0 - - -From a577308276a85d77f9c784902e1b5702a9b7281b Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Thu, 30 Nov 2023 12:23:00 +0100 -Subject: [PATCH 10/10] cursor: send surface scale events - -wlr_cursor is responsible for sending enter/leave events, but -doesn't send fractional-scale-v1 and wl_surface.preferred_buffer_scale -events. This is not an easy thing to do from a compositor, so let's -just do it in wlr_cursor itself. - -(cherry picked from commit 78836298efc6930db482806fadc605de72897ccc) ---- - types/wlr_cursor.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c -index ee41337a..4e5c3473 100644 ---- a/types/wlr_cursor.c -+++ b/types/wlr_cursor.c -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -545,6 +546,16 @@ static void cursor_output_cursor_update(struct wlr_cursor_output_cursor *output_ - } else { - wlr_surface_send_leave(surface, output); - } -+ -+ float scale = 1; -+ struct wlr_surface_output *surface_output; -+ wl_list_for_each(surface_output, &surface->current_outputs, link) { -+ if (surface_output->output->scale > scale) { -+ scale = surface_output->output->scale; -+ } -+ } -+ wlr_fractional_scale_v1_notify_scale(surface, scale); -+ wlr_surface_set_preferred_buffer_scale(surface, ceil(scale)); - } else if (cur->state->xcursor_name != NULL) { - struct wlr_xcursor_manager *manager = cur->state->xcursor_manager; - const char *name = cur->state->xcursor_name; --- -2.43.0 - diff --git a/wlroots.spec b/wlroots.spec index 24f2666..4bfdf8d 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,7 +2,7 @@ %global abi_ver 12 Name: wlroots -Version: 0.17.0 +Version: 0.17.1 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -34,8 +34,6 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches -# https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4461 -Patch: wlroots-0.17-backports.patch # Fedora patches # Following patch is required for phoc. @@ -129,6 +127,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Thu Dec 21 2023 Aleksei Bavshin - 0.17.1-1 +- Update to 0.17.1 (#2255547) + * Tue Nov 21 2023 Aleksei Bavshin - 0.17.0-1 - Update to 0.17.0 (#2250885) - Use xcb-errors util library From bf56e9526c4ab2547edab9c9d2c3abf5cc1b7f5c Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 18 Jan 2024 00:20:43 -0800 Subject: [PATCH 35/61] Apply patch for GCC 14 `-Werror=calloc-transposed-args` --- ...nd-fix-build-against-upcoming-gcc-14.patch | 52 +++++++++++++++++++ wlroots.spec | 1 + 2 files changed, 53 insertions(+) create mode 100644 wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch diff --git a/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch b/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch new file mode 100644 index 0000000..1199143 --- /dev/null +++ b/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch @@ -0,0 +1,52 @@ +From f3e1f7b2a70a500b740bfc406e893eba0852699a Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 21 Dec 2023 21:06:20 +0000 +Subject: [PATCH] backend: fix build against upcoming `gcc-14` + (`-Werror=calloc-transposed-args`) + +`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It +detected minor infelicity in `calloc()` API usage in `wlroots`: + + ../backend/libinput/tablet_pad.c: In function 'add_pad_group_from_libinput': + ../backend/libinput/tablet_pad.c:36:38: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] + 36 | group->rings = calloc(sizeof(unsigned int), group->ring_count); + | ^~~~~~~~ + ../backend/libinput/tablet_pad.c:36:38: note: earlier argument should specify number of elements, later size of each element +--- + backend/libinput/tablet_pad.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c +index 2e74022a5..e53275281 100644 +--- a/backend/libinput/tablet_pad.c ++++ b/backend/libinput/tablet_pad.c +@@ -33,7 +33,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, + ++group->ring_count; + } + } +- group->rings = calloc(sizeof(unsigned int), group->ring_count); ++ group->rings = calloc(group->ring_count, sizeof(unsigned int)); + if (group->rings == NULL) { + goto group_fail; + } +@@ -50,7 +50,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, + ++group->strip_count; + } + } +- group->strips = calloc(sizeof(unsigned int), group->strip_count); ++ group->strips = calloc(group->strip_count, sizeof(unsigned int)); + if (group->strips == NULL) { + goto group_fail; + } +@@ -66,7 +66,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, + ++group->button_count; + } + } +- group->buttons = calloc(sizeof(unsigned int), group->button_count); ++ group->buttons = calloc(group->button_count, sizeof(unsigned int)); + if (group->buttons == NULL) { + goto group_fail; + } +-- +GitLab + diff --git a/wlroots.spec b/wlroots.spec index 4bfdf8d..7b27992 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -34,6 +34,7 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches +Patch: %{url}/-/commit/f3e1f7b.patch#/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch # Fedora patches # Following patch is required for phoc. From 5167a5eda806a877178cfd6645c2fcf25a01badd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 08:58:43 +0000 Subject: [PATCH 36/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 7b27992..53118b9 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -3,7 +3,7 @@ Name: wlroots Version: 0.17.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -128,6 +128,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 0.17.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Dec 21 2023 Aleksei Bavshin - 0.17.1-1 - Update to 0.17.1 (#2255547) From 82fa7cf455d2e7ca1049b728a36c79e3e47d5237 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Mon, 11 Mar 2024 18:25:01 -0700 Subject: [PATCH 37/61] Update to 0.17.2 (#2269046) --- sources | 4 +- ...nd-fix-build-against-upcoming-gcc-14.patch | 52 ------------------- wlroots.spec | 8 +-- 3 files changed, 7 insertions(+), 57 deletions(-) delete mode 100644 wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch diff --git a/sources b/sources index 82fccdf..7f53089 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.17.1.tar.gz) = 33360da04c5af807d775638a06844ada21fa451a745bcbb8d92b005608195c6301bd27b5c1e815990a581b6330b9343a00fc8f8e93a3764e8a856f74d55f8ff7 -SHA512 (wlroots-0.17.1.tar.gz.sig) = 1a7cd6ec2a4a6e6e4da9e387bbf2a295dc63740fc9caba965493c2293244ef2c8e211f663a60fbc9ed51f1fc1a18f145bcab23b98eb32057243e0d7a1b563070 +SHA512 (wlroots-0.17.2.tar.gz) = 44a3ec673431c02fc08a5c33daa06148b5e85a3a7ea45b28978cd6be230dd4c5082e8a34985e2976c9e64f98b7567e334c191c3d20141e8e27ddc4a4659843cc +SHA512 (wlroots-0.17.2.tar.gz.sig) = bd316ed7ec3b2efdb5af6bd117bb5a67edb43581b85302f991c1ec7f1f42ecddacaed0435997a2e7cbd489790f61b35ec91e007c31825543ad9b283d59afaed0 diff --git a/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch b/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch deleted file mode 100644 index 1199143..0000000 --- a/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f3e1f7b2a70a500b740bfc406e893eba0852699a Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Thu, 21 Dec 2023 21:06:20 +0000 -Subject: [PATCH] backend: fix build against upcoming `gcc-14` - (`-Werror=calloc-transposed-args`) - -`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It -detected minor infelicity in `calloc()` API usage in `wlroots`: - - ../backend/libinput/tablet_pad.c: In function 'add_pad_group_from_libinput': - ../backend/libinput/tablet_pad.c:36:38: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] - 36 | group->rings = calloc(sizeof(unsigned int), group->ring_count); - | ^~~~~~~~ - ../backend/libinput/tablet_pad.c:36:38: note: earlier argument should specify number of elements, later size of each element ---- - backend/libinput/tablet_pad.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c -index 2e74022a5..e53275281 100644 ---- a/backend/libinput/tablet_pad.c -+++ b/backend/libinput/tablet_pad.c -@@ -33,7 +33,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, - ++group->ring_count; - } - } -- group->rings = calloc(sizeof(unsigned int), group->ring_count); -+ group->rings = calloc(group->ring_count, sizeof(unsigned int)); - if (group->rings == NULL) { - goto group_fail; - } -@@ -50,7 +50,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, - ++group->strip_count; - } - } -- group->strips = calloc(sizeof(unsigned int), group->strip_count); -+ group->strips = calloc(group->strip_count, sizeof(unsigned int)); - if (group->strips == NULL) { - goto group_fail; - } -@@ -66,7 +66,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, - ++group->button_count; - } - } -- group->buttons = calloc(sizeof(unsigned int), group->button_count); -+ group->buttons = calloc(group->button_count, sizeof(unsigned int)); - if (group->buttons == NULL) { - goto group_fail; - } --- -GitLab - diff --git a/wlroots.spec b/wlroots.spec index 53118b9..8b035fe 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,8 +2,8 @@ %global abi_ver 12 Name: wlroots -Version: 0.17.1 -Release: 2%{?dist} +Version: 0.17.2 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -34,7 +34,6 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches -Patch: %{url}/-/commit/f3e1f7b.patch#/wlroots-0.17-backend-fix-build-against-upcoming-gcc-14.patch # Fedora patches # Following patch is required for phoc. @@ -128,6 +127,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Mon Mar 11 2024 Aleksei Bavshin - 0.17.2-1 +- Update to 0.17.2 (#2269046) + * Sat Jan 27 2024 Fedora Release Engineering - 0.17.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 06e8851845399d4e7dd6747b340605f777e59eaa Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 26 Apr 2024 12:07:13 -0700 Subject: [PATCH 38/61] Update to 0.17.3 --- sources | 4 ++-- wlroots.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 7f53089..8e985ea 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.17.2.tar.gz) = 44a3ec673431c02fc08a5c33daa06148b5e85a3a7ea45b28978cd6be230dd4c5082e8a34985e2976c9e64f98b7567e334c191c3d20141e8e27ddc4a4659843cc -SHA512 (wlroots-0.17.2.tar.gz.sig) = bd316ed7ec3b2efdb5af6bd117bb5a67edb43581b85302f991c1ec7f1f42ecddacaed0435997a2e7cbd489790f61b35ec91e007c31825543ad9b283d59afaed0 +SHA512 (wlroots-0.17.3.tar.gz) = b88747daba304db6dc302acdebb8764e719d84134118963c019d5f0d0d38552e0ffd2a50bf560b3b84549c5a0f2d11a6187ac8ddcd9faa28c5b42f86c585b555 +SHA512 (wlroots-0.17.3.tar.gz.sig) = 249b0e83e978bd6f6f3d2d88fad7aee68e50c42830262ed69b79150b45164430e037e24806565243960748ac53d629551890298289aad35ea21db560d610faa4 diff --git a/wlroots.spec b/wlroots.spec index 8b035fe..e23bd45 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,7 +2,7 @@ %global abi_ver 12 Name: wlroots -Version: 0.17.2 +Version: 0.17.3 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -127,6 +127,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri Apr 26 2024 Aleksei Bavshin - 0.17.3-1 +- Update to 0.17.3 + * Mon Mar 11 2024 Aleksei Bavshin - 0.17.2-1 - Update to 0.17.2 (#2269046) From 17b823e3fa432da5d04db4f17af187b6906d0990 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 29 Jun 2024 16:55:43 -0700 Subject: [PATCH 39/61] Update to 0.17.4 (#2294793) --- sources | 4 ++-- wlroots.spec | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 8e985ea..e2c8469 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.17.3.tar.gz) = b88747daba304db6dc302acdebb8764e719d84134118963c019d5f0d0d38552e0ffd2a50bf560b3b84549c5a0f2d11a6187ac8ddcd9faa28c5b42f86c585b555 -SHA512 (wlroots-0.17.3.tar.gz.sig) = 249b0e83e978bd6f6f3d2d88fad7aee68e50c42830262ed69b79150b45164430e037e24806565243960748ac53d629551890298289aad35ea21db560d610faa4 +SHA512 (wlroots-0.17.4.tar.gz) = 35803df9fe68cadb0b9b5e522863535407ba2354ed1ca8f824a9c40b64698a97c579fec0afeb444b05d429adc1e3dfc45b20c3a1b7a2004e4f5a10d2305c9116 +SHA512 (wlroots-0.17.4.tar.gz.sig) = 9639a10f9dffbed3ffd2cb579aafe8092c5c3ad0d96a3f550c103d5b0339ba10a8824e5209ef616587ced3a994b4a768d99f0e742af103e6967c944b010d053c diff --git a/wlroots.spec b/wlroots.spec index e23bd45..1de4055 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,8 +1,10 @@ # Version of the .so library %global abi_ver 12 +# libliftoff does not bump soname on API changes +%global liftoff_ver %[0%{?fedora} >= 41 ? "0.5.0" : "0.4.1" ] Name: wlroots -Version: 0.17.3 +Version: 0.17.4 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -44,8 +46,8 @@ BuildRequires: glslang BuildRequires: gnupg2 BuildRequires: meson >= 0.59.0 -BuildRequires: (pkgconfig(libdisplay-info) >= 0.1.1 with pkgconfig(libdisplay-info) < 0.2) -BuildRequires: (pkgconfig(libliftoff) >= 0.4.0 with pkgconfig(libliftoff) < 0.5.0) +BuildRequires: (pkgconfig(libdisplay-info) >= 0.1.1 with pkgconfig(libdisplay-info) < 0.3) +BuildRequires: (pkgconfig(libliftoff) >= %{liftoff_ver} with pkgconfig(libliftoff) < 0.6) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) @@ -67,6 +69,8 @@ BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xcb-renderutil) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xwayland) +# libliftoff does not bump soname on API changes +Requires: libliftoff%{?_isa} >= %{liftoff_ver} %description %{summary}. @@ -127,6 +131,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jun 29 2024 Aleksei Bavshin - 0.17.4-1 +- Update to 0.17.4 (#2294793) + * Fri Apr 26 2024 Aleksei Bavshin - 0.17.3-1 - Update to 0.17.3 From 135263e28d8af14c092b9338070d84ac652825e8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 09:26:58 +0000 Subject: [PATCH 40/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 1de4055..2b5e2fd 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -5,7 +5,7 @@ Name: wlroots Version: 0.17.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -131,6 +131,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 0.17.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jun 29 2024 Aleksei Bavshin - 0.17.4-1 - Update to 0.17.4 (#2294793) From a00f48886096c1df4a330db8927e864c4465e3a6 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 8 Aug 2024 21:06:11 -0700 Subject: [PATCH 41/61] Update to 0.18.0 (#2297921) --- ...ll-error-on-0-dimension-without-anch.patch | 24 ++++++------- examples.meson.build | 2 +- sources | 4 +-- wlroots.spec | 34 +++++++++++++------ 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/Revert-layer-shell-error-on-0-dimension-without-anch.patch b/Revert-layer-shell-error-on-0-dimension-without-anch.patch index b6bd5ce..4df421b 100644 --- a/Revert-layer-shell-error-on-0-dimension-without-anch.patch +++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch @@ -1,4 +1,4 @@ -From 05cd68c9eee28c2223cc192b9744cff493f940cc Mon Sep 17 00:00:00 2001 +From ed19a7f8b2fb32e1919d7910041dac5f07fca75e Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 25 Jun 2022 21:22:08 -0700 Subject: [PATCH] Revert "layer-shell: error on 0 dimension without anchors" @@ -9,18 +9,19 @@ This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3. 1 file changed, 20 deletions(-) diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c -index 37256db6..77dbad94 100644 +index a59f1104..75a19314 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c -@@ -335,26 +335,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { +@@ -335,26 +335,6 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) { + "layer_surface has never been configured"); return; } - +- - const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | - ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT; - if (surface->pending.desired_width == 0 && -- (surface->pending.anchor & horiz) != horiz) { -- wl_resource_post_error(surface->resource, +- (surface->pending.anchor & horiz) != horiz) { +- wlr_surface_reject_pending(wlr_surface, surface->resource, - ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, - "width 0 requested without setting left and right anchors"); - return; @@ -29,16 +30,15 @@ index 37256db6..77dbad94 100644 - const uint32_t vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | - ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM; - if (surface->pending.desired_height == 0 && -- (surface->pending.anchor & vert) != vert) { -- wl_resource_post_error(surface->resource, +- (surface->pending.anchor & vert) != vert) { +- wlr_surface_reject_pending(wlr_surface, surface->resource, - ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, - "height 0 requested without setting top and bottom anchors"); - return; - } -- - if (surface->surface->unmap_commit) { - layer_surface_reset(surface); + } + static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { -- -2.41.0 +2.45.2 diff --git a/examples.meson.build b/examples.meson.build index 1e78006..4f3156e 100644 --- a/examples.meson.build +++ b/examples.meson.build @@ -29,7 +29,7 @@ wayland_scanner = find_program( native: true, ) wayland_server = dependency('wayland-server') -wlroots = dependency('wlroots', version: ['>=0.17.0', '<0.18.0']) +wlroots = dependency('wlroots-0.18') xkbcommon = dependency('xkbcommon') wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') diff --git a/sources b/sources index e2c8469..4fac9e6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.17.4.tar.gz) = 35803df9fe68cadb0b9b5e522863535407ba2354ed1ca8f824a9c40b64698a97c579fec0afeb444b05d429adc1e3dfc45b20c3a1b7a2004e4f5a10d2305c9116 -SHA512 (wlroots-0.17.4.tar.gz.sig) = 9639a10f9dffbed3ffd2cb579aafe8092c5c3ad0d96a3f550c103d5b0339ba10a8824e5209ef616587ced3a994b4a768d99f0e742af103e6967c944b010d053c +SHA512 (wlroots-0.18.0.tar.gz) = 2cf848aa67f41089b60cc7d01c3a344ebaf7f5bbced459675fef885cd4b3e6b99d9a49d6b127518314d0ae38e52e9aff7991611592b2add4cba96f15aa0bf1c6 +SHA512 (wlroots-0.18.0.tar.gz.sig) = 865665ae349ab3709645a81a293c4c2ac931bcdb2e9f3cc3811ec098969758c0ff7b4946bd5da1cb983d78145022769963f70a170a22fe0eb3a1546987f098e0 diff --git a/wlroots.spec b/wlroots.spec index 2b5e2fd..20b48f2 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,11 +1,11 @@ # Version of the .so library -%global abi_ver 12 +%global abi_ver 0.18 # libliftoff does not bump soname on API changes %global liftoff_ver %[0%{?fedora} >= 41 ? "0.5.0" : "0.4.1" ] Name: wlroots -Version: 0.17.4 -Release: 2%{?dist} +Version: 0.18.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -52,21 +52,31 @@ BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(hwdata) -BuildRequires: pkgconfig(libdrm) >= 2.4.114 +BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(libdrm) >= 2.4.122 BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) >= 0.42.0 -BuildRequires: pkgconfig(vulkan) +BuildRequires: pkgconfig(vulkan) >= 1.2.182 BuildRequires: pkgconfig(wayland-client) -BuildRequires: pkgconfig(wayland-protocols) >= 1.32 +BuildRequires: pkgconfig(wayland-protocols) >= 1.35 BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-server) >= 1.22 +BuildRequires: pkgconfig(wayland-server) >= 1.23 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) +BuildRequires: pkgconfig(xcb-composite) +BuildRequires: pkgconfig(xcb-dri3) BuildRequires: pkgconfig(xcb-errors) +BuildRequires: pkgconfig(xcb-ewmh) BuildRequires: pkgconfig(xcb-icccm) +BuildRequires: pkgconfig(xcb-present) +BuildRequires: pkgconfig(xcb-render) BuildRequires: pkgconfig(xcb-renderutil) +BuildRequires: pkgconfig(xcb-res) +BuildRequires: pkgconfig(xcb-shm) +BuildRequires: pkgconfig(xcb-xfixes) +BuildRequires: pkgconfig(xcb-xinput) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xwayland) # libliftoff does not bump soname on API changes @@ -120,17 +130,19 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %files %license LICENSE %doc README.md -%{_libdir}/lib%{name}.so.%{abi_ver}{,.*} +%{_libdir}/libwlroots-%{abi_ver}.so %files devel %doc %{_pkgdocdir}/examples -%{_includedir}/wlr -%{_libdir}/lib%{name}.so -%{_libdir}/pkgconfig/%{name}.pc +%{_includedir}/wlroots-%{abi_ver}/wlr +%{_libdir}/pkgconfig/wlroots-%{abi_ver}.pc %changelog +* Thu Aug 08 2024 Aleksei Bavshin - 0.18.0-1 +- Update to 0.18.0 (#2297921) + * Sat Jul 20 2024 Fedora Release Engineering - 0.17.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ebd7df88f6dcfbfebe584c68ab0741e82d1de74a Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 20 Sep 2024 07:37:51 -0700 Subject: [PATCH 42/61] Update to 0.18.1 (#2313753) --- sources | 4 ++-- wlroots.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 4fac9e6..f850b13 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.18.0.tar.gz) = 2cf848aa67f41089b60cc7d01c3a344ebaf7f5bbced459675fef885cd4b3e6b99d9a49d6b127518314d0ae38e52e9aff7991611592b2add4cba96f15aa0bf1c6 -SHA512 (wlroots-0.18.0.tar.gz.sig) = 865665ae349ab3709645a81a293c4c2ac931bcdb2e9f3cc3811ec098969758c0ff7b4946bd5da1cb983d78145022769963f70a170a22fe0eb3a1546987f098e0 +SHA512 (wlroots-0.18.1.tar.gz) = c4d83ae75aec4f7f4e8aefbff27594d0962c56c4a3a3ef2d7ccd432f92eb56df7edb995cc0fa1f62d9290e988f20e7525d007717f36ce4824dfc41061a697fbb +SHA512 (wlroots-0.18.1.tar.gz.sig) = 39aa8ce9b2b5a0284f1d71a34600435219b0a2d59d9a4a5f08391c46c6013f3acb0bddc98099907debcab2dc26f7c306f69526359d59e4fe5285a2cbbc651bad diff --git a/wlroots.spec b/wlroots.spec index 20b48f2..6140062 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -4,7 +4,7 @@ %global liftoff_ver %[0%{?fedora} >= 41 ? "0.5.0" : "0.4.1" ] Name: wlroots -Version: 0.18.0 +Version: 0.18.1 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -140,6 +140,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri Sep 20 2024 Aleksei Bavshin - 0.18.1-1 +- Update to 0.18.1 (#2313753) + * Thu Aug 08 2024 Aleksei Bavshin - 0.18.0-1 - Update to 0.18.0 (#2297921) From 8826828a2a84c9a16b1123df37a62520f8b2fb26 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Wed, 11 Dec 2024 16:55:49 -0800 Subject: [PATCH 43/61] Update to 0.18.2 (#2331871) --- sources | 4 ++-- wlroots.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index f850b13..7ed4928 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.18.1.tar.gz) = c4d83ae75aec4f7f4e8aefbff27594d0962c56c4a3a3ef2d7ccd432f92eb56df7edb995cc0fa1f62d9290e988f20e7525d007717f36ce4824dfc41061a697fbb -SHA512 (wlroots-0.18.1.tar.gz.sig) = 39aa8ce9b2b5a0284f1d71a34600435219b0a2d59d9a4a5f08391c46c6013f3acb0bddc98099907debcab2dc26f7c306f69526359d59e4fe5285a2cbbc651bad +SHA512 (wlroots-0.18.2.tar.gz) = a03826f51dbca287ecbb217aadc361a1dedbbe5e225ee7b9ca22779456156c1035acaea7301ca509c410bfef9d0c33cf94cba140bba25d979608b14a99be8c8a +SHA512 (wlroots-0.18.2.tar.gz.sig) = 93716a0347eafa65675c257080152b0adb2f8145c63f4c1ee55ab3f3972f943dc9b103788cb19905536d7b9c7ff91be7826d82bde9c98666f48ee8fbcb70939b diff --git a/wlroots.spec b/wlroots.spec index 6140062..a4fe887 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -4,7 +4,7 @@ %global liftoff_ver %[0%{?fedora} >= 41 ? "0.5.0" : "0.4.1" ] Name: wlroots -Version: 0.18.1 +Version: 0.18.2 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -140,6 +140,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Wed Dec 11 2024 Aleksei Bavshin - 0.18.2-1 +- Update to 0.18.2 (#2331871) + * Fri Sep 20 2024 Aleksei Bavshin - 0.18.1-1 - Update to 0.18.1 (#2313753) From 373ca6b1b16e798333c038980df2b7a56a54d4f2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 15:08:37 +0000 Subject: [PATCH 44/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index a4fe887..b20f820 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -5,7 +5,7 @@ Name: wlroots Version: 0.18.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -140,6 +140,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 0.18.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Dec 11 2024 Aleksei Bavshin - 0.18.2-1 - Update to 0.18.2 (#2331871) From f55f4ba70e948503974ed0843a59486edf1f4542 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 10 Feb 2025 09:59:49 -0500 Subject: [PATCH 45/61] Rebuild for libdisplay-info 0.2.0 Rebuild for libdisplay-info 0.2.0 --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index b20f820..c7b4953 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -5,7 +5,7 @@ Name: wlroots Version: 0.18.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -140,6 +140,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Mon Feb 10 2025 Neal Gompa - 0.18.2-3 +- Rebuild for libdisplay-info 0.2.0 + * Sun Jan 19 2025 Fedora Release Engineering - 0.18.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 6eb9ee592059f70eea4ca0e5cccee10899b25238 Mon Sep 17 00:00:00 2001 From: Sam Day Date: Sat, 15 Feb 2025 16:13:34 +0100 Subject: [PATCH 46/61] Add MR!4985 backport patch needed by phoc 0.45 This patch has already merged into mainline and the 0.18 branch upstream, but has not yet been released. It can be dropped in 0.18.3 Signed-off-by: Sam Day --- 4985.patch | 38 ++++++++++++++++++++++++++++++++++++++ wlroots.spec | 7 ++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 4985.patch diff --git a/4985.patch b/4985.patch new file mode 100644 index 0000000..96e4955 --- /dev/null +++ b/4985.patch @@ -0,0 +1,38 @@ +From d9818603142c42eea7d10fb656aaca857a179cf0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Mon, 27 Jan 2025 17:48:39 +0100 +Subject: [PATCH] seat: Don't forget to destroy touch points on touch up +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Otherwise the number of touch points goes up constantly and d'n'd via +touch can't work as validation always fails. + +Fixes 75ecba44 ("seat: add serials to touch up events") + +Signed-off-by: Guido Günther +(cherry picked from commit fef4f3637a5dfb7022887dfb36ccdd69932d2753) +--- + types/seat/wlr_seat_touch.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c +index 09f33d667..cc5b7c826 100644 +--- a/types/seat/wlr_seat_touch.c ++++ b/types/seat/wlr_seat_touch.c +@@ -214,9 +214,10 @@ uint32_t wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time, + return 0; + } + +- return grab->interface->up(grab, time, point); ++ uint32_t serial = grab->interface->up(grab, time, point); + + touch_point_destroy(point); ++ return serial; + } + + void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time, +-- +GitLab + diff --git a/wlroots.spec b/wlroots.spec index c7b4953..917bad3 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -5,7 +5,7 @@ Name: wlroots Version: 0.18.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -40,6 +40,8 @@ Source3: examples.meson.build # Fedora patches # Following patch is required for phoc. Patch: Revert-layer-shell-error-on-0-dimension-without-anch.patch +# Needed by phoc 0.45.0+, can be dropped in wlroots 0.18.3 +Patch: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4985.patch BuildRequires: gcc BuildRequires: glslang @@ -140,6 +142,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Feb 15 2025 Sam Day - 0.18.2-4 +- Add wlroots!4985 patch needed by phoc 0.45.0 + * Mon Feb 10 2025 Neal Gompa - 0.18.2-3 - Rebuild for libdisplay-info 0.2.0 From 6442a76f36e2cd1e4df33da8a7a1a1e69c931391 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 16 May 2025 18:32:23 -0700 Subject: [PATCH 47/61] Update to 0.19.0 (#2359256) --- 4985.patch | 38 --------------- ...ll-error-on-0-dimension-without-anch.patch | 47 +++++++------------ sources | 4 +- wlroots.spec | 28 ++++++----- 4 files changed, 35 insertions(+), 82 deletions(-) delete mode 100644 4985.patch diff --git a/4985.patch b/4985.patch deleted file mode 100644 index 96e4955..0000000 --- a/4985.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d9818603142c42eea7d10fb656aaca857a179cf0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Guido=20G=C3=BCnther?= -Date: Mon, 27 Jan 2025 17:48:39 +0100 -Subject: [PATCH] seat: Don't forget to destroy touch points on touch up -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Otherwise the number of touch points goes up constantly and d'n'd via -touch can't work as validation always fails. - -Fixes 75ecba44 ("seat: add serials to touch up events") - -Signed-off-by: Guido Günther -(cherry picked from commit fef4f3637a5dfb7022887dfb36ccdd69932d2753) ---- - types/seat/wlr_seat_touch.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c -index 09f33d667..cc5b7c826 100644 ---- a/types/seat/wlr_seat_touch.c -+++ b/types/seat/wlr_seat_touch.c -@@ -214,9 +214,10 @@ uint32_t wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time, - return 0; - } - -- return grab->interface->up(grab, time, point); -+ uint32_t serial = grab->interface->up(grab, time, point); - - touch_point_destroy(point); -+ return serial; - } - - void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time, --- -GitLab - diff --git a/Revert-layer-shell-error-on-0-dimension-without-anch.patch b/Revert-layer-shell-error-on-0-dimension-without-anch.patch index 4df421b..a9112d9 100644 --- a/Revert-layer-shell-error-on-0-dimension-without-anch.patch +++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch @@ -1,44 +1,33 @@ -From ed19a7f8b2fb32e1919d7910041dac5f07fca75e Mon Sep 17 00:00:00 2001 +From e021326f7de0505fcae85f5732885848b21edf9c Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 25 Jun 2022 21:22:08 -0700 Subject: [PATCH] Revert "layer-shell: error on 0 dimension without anchors" This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3. --- - types/wlr_layer_shell_v1.c | 20 -------------------- - 1 file changed, 20 deletions(-) + types/wlr_layer_shell_v1.c | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c -index a59f1104..75a19314 100644 +index 2d838498..c3c50d78 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c -@@ -335,26 +335,6 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) { - "layer_surface has never been configured"); +@@ -358,6 +358,7 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) { + + uint32_t anchor = surface->pending.anchor; + ++#if 0 + const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | + ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT; + if (surface->pending.desired_width == 0 && (anchor & horiz) != horiz) { +@@ -375,6 +376,7 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) { + "height 0 requested without setting top and bottom anchors"); return; } -- -- const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | -- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT; -- if (surface->pending.desired_width == 0 && -- (surface->pending.anchor & horiz) != horiz) { -- wlr_surface_reject_pending(wlr_surface, surface->resource, -- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, -- "width 0 requested without setting left and right anchors"); -- return; -- } -- -- const uint32_t vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | -- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM; -- if (surface->pending.desired_height == 0 && -- (surface->pending.anchor & vert) != vert) { -- wlr_surface_reject_pending(wlr_surface, surface->resource, -- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, -- "height 0 requested without setting top and bottom anchors"); -- return; -- } - } ++#endif - static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { + if ((anchor & surface->pending.exclusive_edge) != surface->pending.exclusive_edge) { + wlr_surface_reject_pending(wlr_surface, surface->resource, -- -2.45.2 +2.49.0 diff --git a/sources b/sources index 7ed4928..84d4aff 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.18.2.tar.gz) = a03826f51dbca287ecbb217aadc361a1dedbbe5e225ee7b9ca22779456156c1035acaea7301ca509c410bfef9d0c33cf94cba140bba25d979608b14a99be8c8a -SHA512 (wlroots-0.18.2.tar.gz.sig) = 93716a0347eafa65675c257080152b0adb2f8145c63f4c1ee55ab3f3972f943dc9b103788cb19905536d7b9c7ff91be7826d82bde9c98666f48ee8fbcb70939b +SHA512 (wlroots-0.19.0.tar.gz) = f48055b9bf480f05c97d1d65597697ac9a68cc0529f09bd8667e86555eea5c4635613045076017f87dee6a1b72419b9828d3493991e563ac7b9e614684d7bcde +SHA512 (wlroots-0.19.0.tar.gz.sig) = cb9b2298c0a9529b439648e9cb73629a74e692fa8f076c7caa9857ef20b56fcc827e4bf6a76a3e5c7a4ab0f060e9ff474f2c3965734994e9a48e2ae19cbab882 diff --git a/wlroots.spec b/wlroots.spec index 917bad3..ee8434b 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,11 +1,12 @@ # Version of the .so library -%global abi_ver 0.18 +%global abi_ver 0.19 # libliftoff does not bump soname on API changes -%global liftoff_ver %[0%{?fedora} >= 41 ? "0.5.0" : "0.4.1" ] +%global liftoff_ver 0.5.0 +%global tag 0.19.0 Name: wlroots -Version: 0.18.2 -Release: 4%{?dist} +Version: 0.19.0 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -25,8 +26,8 @@ Summary: A modular Wayland compositor library # the underlying licenses. License: MIT URL: https://gitlab.freedesktop.org/wlroots/wlroots -Source0: %{url}/-/releases/%{version}/downloads/%{name}-%{version}.tar.gz -Source1: %{url}/-/releases/%{version}/downloads/%{name}-%{version}.tar.gz.sig +Source0: %{url}/-/releases/%{tag}/downloads/%{name}-%{tag}.tar.gz +Source1: %{url}/-/releases/%{tag}/downloads/%{name}-%{tag}.tar.gz.sig # 0FDE7BE0E88F5E48: emersion Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rkjfnghbjxug6b19#/gpgkey-0FDE7BE0E88F5E48.gpg @@ -40,13 +41,11 @@ Source3: examples.meson.build # Fedora patches # Following patch is required for phoc. Patch: Revert-layer-shell-error-on-0-dimension-without-anch.patch -# Needed by phoc 0.45.0+, can be dropped in wlroots 0.18.3 -Patch: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4985.patch BuildRequires: gcc BuildRequires: glslang BuildRequires: gnupg2 -BuildRequires: meson >= 0.59.0 +BuildRequires: meson >= 1.3 BuildRequires: (pkgconfig(libdisplay-info) >= 0.1.1 with pkgconfig(libdisplay-info) < 0.3) BuildRequires: (pkgconfig(libliftoff) >= %{liftoff_ver} with pkgconfig(libliftoff) < 0.6) @@ -59,12 +58,12 @@ BuildRequires: pkgconfig(libdrm) >= 2.4.122 BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libudev) -BuildRequires: pkgconfig(pixman-1) >= 0.42.0 +BuildRequires: pkgconfig(pixman-1) >= 0.43.0 BuildRequires: pkgconfig(vulkan) >= 1.2.182 BuildRequires: pkgconfig(wayland-client) -BuildRequires: pkgconfig(wayland-protocols) >= 1.35 +BuildRequires: pkgconfig(wayland-protocols) >= 1.41 BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-server) >= 1.23 +BuildRequires: pkgconfig(wayland-server) >= 1.23.1 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-composite) @@ -104,7 +103,7 @@ Development files for %{name}. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -N +%autosetup -N -n %{name}-%{tag} # apply unconditional patches (0..99) %autopatch -p1 -M99 # apply conditional patches (100..) @@ -142,6 +141,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri May 16 2025 Aleksei Bavshin - 0.19.0-1 +- Update to 0.19.0 (#2359256) + * Sat Feb 15 2025 Sam Day - 0.18.2-4 - Add wlroots!4985 patch needed by phoc 0.45.0 From b11c779550d1f668ae946d4767c86a303f4c2d3b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:29:00 +0000 Subject: [PATCH 48/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index ee8434b..06a7bd2 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -6,7 +6,7 @@ Name: wlroots Version: 0.19.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -141,6 +141,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.19.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri May 16 2025 Aleksei Bavshin - 0.19.0-1 - Update to 0.19.0 (#2359256) From 00b7c19be8ac76e8ad1b4b419014c10a7f0f0cea Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 21 Sep 2025 14:52:42 -0700 Subject: [PATCH 49/61] Update to 0.19.1 (#2397203) --- sources | 4 ++-- wlroots.spec | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 84d4aff..f5c8ac6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.19.0.tar.gz) = f48055b9bf480f05c97d1d65597697ac9a68cc0529f09bd8667e86555eea5c4635613045076017f87dee6a1b72419b9828d3493991e563ac7b9e614684d7bcde -SHA512 (wlroots-0.19.0.tar.gz.sig) = cb9b2298c0a9529b439648e9cb73629a74e692fa8f076c7caa9857ef20b56fcc827e4bf6a76a3e5c7a4ab0f060e9ff474f2c3965734994e9a48e2ae19cbab882 +SHA512 (wlroots-0.19.1.tar.gz) = 2aac7ca61d6bae71268b114a2348fcd4d5b5734e245c1e6decf5d8230ea24245e30e48f79634aaea2743b89a89721a8fb2d74cd5e9c8da8f1525f30d410b420c +SHA512 (wlroots-0.19.1.tar.gz.sig) = 60f53a1304106c8fb694048101c6ad881c52213681285cfd17505446659d90c033c5d79fe574a2296dd4a6e6cde71cb9737d030374f254b44407f853196ed475 diff --git a/wlroots.spec b/wlroots.spec index 06a7bd2..1e38508 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,11 +2,11 @@ %global abi_ver 0.19 # libliftoff does not bump soname on API changes %global liftoff_ver 0.5.0 -%global tag 0.19.0 +%global tag 0.19.1 Name: wlroots -Version: 0.19.0 -Release: 2%{?dist} +Version: 0.19.1 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -47,13 +47,13 @@ BuildRequires: glslang BuildRequires: gnupg2 BuildRequires: meson >= 1.3 -BuildRequires: (pkgconfig(libdisplay-info) >= 0.1.1 with pkgconfig(libdisplay-info) < 0.3) BuildRequires: (pkgconfig(libliftoff) >= %{liftoff_ver} with pkgconfig(libliftoff) < 0.6) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(hwdata) BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(libdisplay-info) BuildRequires: pkgconfig(libdrm) >= 2.4.122 BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) @@ -141,6 +141,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Sep 21 2025 Aleksei Bavshin - 0.19.1-1 +- Update to 0.19.1 (#2397203) + * Fri Jul 25 2025 Fedora Release Engineering - 0.19.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From a034b0be85a4db64b9365feac46cee1a8931a135 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sun, 28 Sep 2025 14:39:43 -0700 Subject: [PATCH 50/61] Apply upstream patch for crash on disabling outputs --- ...end-commit-events-after-applying-all.patch | 73 +++++++++++++++++++ wlroots.spec | 6 +- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch diff --git a/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch b/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch new file mode 100644 index 0000000..17b8c8f --- /dev/null +++ b/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch @@ -0,0 +1,73 @@ +From 7392b3313a7b483c61f4fea648ba8f2aa4ce8798 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Tue, 12 Aug 2025 19:00:11 +0200 +Subject: [PATCH] backend, output: send commit events after applying all in + wlr_backend_commit() + +We were iterating over involved outputs, applying the new state and +sending the commit event for each one. This resulted in commit +events being fired while we weren't done applying the new state for +all outputs. + +Fix this by first applying all of the states, then firing all of +the events. + +Closes: https://github.com/swaywm/sway/issues/8829 +--- + backend/backend.c | 5 +++++ + include/types/wlr_output.h | 1 + + types/output/output.c | 3 +++ + 3 files changed, 9 insertions(+) + +diff --git a/backend/backend.c b/backend/backend.c +index a130d9045a..3d84aa636f 100644 +--- a/backend/backend.c ++++ b/backend/backend.c +@@ -485,5 +485,10 @@ bool wlr_backend_commit(struct wlr_backend *backend, + output_apply_commit(state->output, &state->base); + } + ++ for (size_t i = 0; i < states_len; i++) { ++ const struct wlr_backend_output_state *state = &states[i]; ++ output_send_commit_event(state->output, &state->base); ++ } ++ + return true; + } +diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h +index f901505afc..d59b05f0b9 100644 +--- a/include/types/wlr_output.h ++++ b/include/types/wlr_output.h +@@ -27,6 +27,7 @@ void output_defer_present(struct wlr_output *output, struct wlr_output_event_pre + + bool output_prepare_commit(struct wlr_output *output, const struct wlr_output_state *state); + void output_apply_commit(struct wlr_output *output, const struct wlr_output_state *state); ++void output_send_commit_event(struct wlr_output *output, const struct wlr_output_state *state); + + void output_state_get_buffer_src_box(const struct wlr_output_state *state, + struct wlr_fbox *out); +diff --git a/types/output/output.c b/types/output/output.c +index 636d155d21..1fb0347a0b 100644 +--- a/types/output/output.c ++++ b/types/output/output.c +@@ -759,7 +759,9 @@ void output_apply_commit(struct wlr_output *output, const struct wlr_output_stat + } + + output_apply_state(output, state); ++} + ++void output_send_commit_event(struct wlr_output *output, const struct wlr_output_state *state) { + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + struct wlr_output_event_commit event = { +@@ -801,6 +803,7 @@ bool wlr_output_commit_state(struct wlr_output *output, + } + + output_apply_commit(output, &pending); ++ output_send_commit_event(output, &pending); + + if (new_back_buffer) { + wlr_buffer_unlock(pending.buffer); +-- +GitLab + diff --git a/wlroots.spec b/wlroots.spec index 1e38508..d4a76d8 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -6,7 +6,7 @@ Name: wlroots Version: 0.19.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -37,6 +37,7 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches +Patch: %{url}/-/commit/7392b331.patch#/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch # Fedora patches # Following patch is required for phoc. @@ -141,6 +142,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sun Sep 28 2025 Aleksei Bavshin - 0.19.1-2 +- Apply upstream patch for crash on disabling outputs + * Sun Sep 21 2025 Aleksei Bavshin - 0.19.1-1 - Update to 0.19.1 (#2397203) From 69922850bd02e72bee44ac2b8b561303872da49c Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 21 Oct 2025 23:14:08 -0700 Subject: [PATCH 51/61] Update to 0.19.2 (#2405567) --- sources | 4 +- ...end-commit-events-after-applying-all.patch | 73 ------------------- wlroots.spec | 10 ++- 3 files changed, 8 insertions(+), 79 deletions(-) delete mode 100644 wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch diff --git a/sources b/sources index f5c8ac6..84a6c9a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.19.1.tar.gz) = 2aac7ca61d6bae71268b114a2348fcd4d5b5734e245c1e6decf5d8230ea24245e30e48f79634aaea2743b89a89721a8fb2d74cd5e9c8da8f1525f30d410b420c -SHA512 (wlroots-0.19.1.tar.gz.sig) = 60f53a1304106c8fb694048101c6ad881c52213681285cfd17505446659d90c033c5d79fe574a2296dd4a6e6cde71cb9737d030374f254b44407f853196ed475 +SHA512 (wlroots-0.19.2.tar.gz) = 8228bdd463f3b79c02cc36311f93eb3a2fe2c8406222316a9996abebfbefa39cc4a9587ea800d677961d59b27c82ae906e538dceaf565403bbb3f2b1ae19eff1 +SHA512 (wlroots-0.19.2.tar.gz.sig) = c9f2bc6413c19e1fd52f151779a80513a72f0b9d1df706ad3d77df74f0736c22e12122fe08c3f24c908649ca1f3adad5aee8f8cc65fa0b24155353ca66f6e240 diff --git a/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch b/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch deleted file mode 100644 index 17b8c8f..0000000 --- a/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 7392b3313a7b483c61f4fea648ba8f2aa4ce8798 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Tue, 12 Aug 2025 19:00:11 +0200 -Subject: [PATCH] backend, output: send commit events after applying all in - wlr_backend_commit() - -We were iterating over involved outputs, applying the new state and -sending the commit event for each one. This resulted in commit -events being fired while we weren't done applying the new state for -all outputs. - -Fix this by first applying all of the states, then firing all of -the events. - -Closes: https://github.com/swaywm/sway/issues/8829 ---- - backend/backend.c | 5 +++++ - include/types/wlr_output.h | 1 + - types/output/output.c | 3 +++ - 3 files changed, 9 insertions(+) - -diff --git a/backend/backend.c b/backend/backend.c -index a130d9045a..3d84aa636f 100644 ---- a/backend/backend.c -+++ b/backend/backend.c -@@ -485,5 +485,10 @@ bool wlr_backend_commit(struct wlr_backend *backend, - output_apply_commit(state->output, &state->base); - } - -+ for (size_t i = 0; i < states_len; i++) { -+ const struct wlr_backend_output_state *state = &states[i]; -+ output_send_commit_event(state->output, &state->base); -+ } -+ - return true; - } -diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h -index f901505afc..d59b05f0b9 100644 ---- a/include/types/wlr_output.h -+++ b/include/types/wlr_output.h -@@ -27,6 +27,7 @@ void output_defer_present(struct wlr_output *output, struct wlr_output_event_pre - - bool output_prepare_commit(struct wlr_output *output, const struct wlr_output_state *state); - void output_apply_commit(struct wlr_output *output, const struct wlr_output_state *state); -+void output_send_commit_event(struct wlr_output *output, const struct wlr_output_state *state); - - void output_state_get_buffer_src_box(const struct wlr_output_state *state, - struct wlr_fbox *out); -diff --git a/types/output/output.c b/types/output/output.c -index 636d155d21..1fb0347a0b 100644 ---- a/types/output/output.c -+++ b/types/output/output.c -@@ -759,7 +759,9 @@ void output_apply_commit(struct wlr_output *output, const struct wlr_output_stat - } - - output_apply_state(output, state); -+} - -+void output_send_commit_event(struct wlr_output *output, const struct wlr_output_state *state) { - struct timespec now; - clock_gettime(CLOCK_MONOTONIC, &now); - struct wlr_output_event_commit event = { -@@ -801,6 +803,7 @@ bool wlr_output_commit_state(struct wlr_output *output, - } - - output_apply_commit(output, &pending); -+ output_send_commit_event(output, &pending); - - if (new_back_buffer) { - wlr_buffer_unlock(pending.buffer); --- -GitLab - diff --git a/wlroots.spec b/wlroots.spec index d4a76d8..f5aab06 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -2,11 +2,11 @@ %global abi_ver 0.19 # libliftoff does not bump soname on API changes %global liftoff_ver 0.5.0 -%global tag 0.19.1 +%global tag 0.19.2 Name: wlroots -Version: 0.19.1 -Release: 2%{?dist} +Version: 0.19.2 +Release: 1%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -37,7 +37,6 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches -Patch: %{url}/-/commit/7392b331.patch#/wlroots-0.19.1-backend-output-send-commit-events-after-applying-all.patch # Fedora patches # Following patch is required for phoc. @@ -142,6 +141,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Tue Oct 21 2025 Aleksei Bavshin - 0.19.2-1 +- Update to 0.19.2 (#2405567) + * Sun Sep 28 2025 Aleksei Bavshin - 0.19.1-2 - Apply upstream patch for crash on disabling outputs From 4b409cc451006a9230947ffaf562a88752a85d45 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 22 Dec 2025 23:45:46 -0500 Subject: [PATCH 52/61] Fix discarded const qualifier warnings with GCC 15 https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5203 --- Fix-discarded-const-qualifier.patch | 30 +++++++++++++++++++++++++++++ wlroots.spec | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 Fix-discarded-const-qualifier.patch diff --git a/Fix-discarded-const-qualifier.patch b/Fix-discarded-const-qualifier.patch new file mode 100644 index 0000000..fd74c75 --- /dev/null +++ b/Fix-discarded-const-qualifier.patch @@ -0,0 +1,30 @@ +From 47486545b196987f6f07fffe2929bba8f515b8e9 Mon Sep 17 00:00:00 2001 +From: Dale Turner +Date: Wed, 3 Dec 2025 20:02:29 -0400 +Subject: [PATCH] =?UTF-8?q?Add=20"const"=20to=20eliminate=20"error:=20init?= + =?UTF-8?q?ialization=20discards=20=E2=80=98const=E2=80=99=20qualifier=20f?= + =?UTF-8?q?rom=20pointer=20target=20type"?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + xcursor/xcursor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xcursor/xcursor.c b/xcursor/xcursor.c +index b5edb9de86..6627fb6cd7 100644 +--- a/xcursor/xcursor.c ++++ b/xcursor/xcursor.c +@@ -602,7 +602,7 @@ xcursor_build_fullname(const char *dir, const char *subdir, const char *file) + static const char * + xcursor_next_path(const char *path) + { +- char *colon = strchr(path, ':'); ++ const char *colon = strchr(path, ':'); + + if (!colon) + return NULL; +-- +GitLab + diff --git a/wlroots.spec b/wlroots.spec index f5aab06..8ce0dea 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -37,6 +37,8 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches +# https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5203 +Patch: Fix-discarded-const-qualifier.patch # Fedora patches # Following patch is required for phoc. From 6d290402fb44787280e8284ab51bc72597ca065e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:18:14 +0000 Subject: [PATCH 53/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 8ce0dea..6892b3e 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -6,7 +6,7 @@ Name: wlroots Version: 0.19.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 0.19.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Tue Oct 21 2025 Aleksei Bavshin - 0.19.2-1 - Update to 0.19.2 (#2405567) From 2ea14ebe8e6d3741dfcf11409e2c898d41425216 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 24 Jan 2026 16:45:59 -0800 Subject: [PATCH 54/61] Rebuild for libdisplay-info 0.3.0 --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 6892b3e..2215c59 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -6,7 +6,7 @@ Name: wlroots Version: 0.19.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Jan 24 2026 Aleksei Bavshin - 0.19.2-3 +- Rebuild for libdisplay-info 0.3.0 + * Sat Jan 17 2026 Fedora Release Engineering - 0.19.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 5035af13d432d55e0a7d32f355d57e7040a8c578 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 12 Feb 2026 19:15:32 -0800 Subject: [PATCH 55/61] Apply upstream patch for libinput 1.31 compatibility --- ...ibinput-fix-build-with-libinput-1.31.patch | 48 +++++++++++++++++++ wlroots.spec | 6 ++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 backend-libinput-fix-build-with-libinput-1.31.patch diff --git a/backend-libinput-fix-build-with-libinput-1.31.patch b/backend-libinput-fix-build-with-libinput-1.31.patch new file mode 100644 index 0000000..ff30e78 --- /dev/null +++ b/backend-libinput-fix-build-with-libinput-1.31.patch @@ -0,0 +1,48 @@ +From c1452d88114710f5772662b1d8efb9c71edaa34c Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Sat, 7 Feb 2026 17:48:16 -0800 +Subject: [PATCH] backend/libinput: fix build with libinput 1.31 + +--- + backend/libinput/meson.build | 4 ++++ + backend/libinput/switch.c | 5 +++++ + 2 files changed, 9 insertions(+) + +diff --git a/backend/libinput/meson.build b/backend/libinput/meson.build +index c244eb77a..091b0e0eb 100644 +--- a/backend/libinput/meson.build ++++ b/backend/libinput/meson.build +@@ -29,3 +29,7 @@ features += { 'libinput-backend': true } + wlr_deps += libinput + + internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0')) ++internal_config.set10( ++ 'HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE', ++ libinput.version().version_compare('>=1.30.901') ++) +diff --git a/backend/libinput/switch.c b/backend/libinput/switch.c +index abeec86d7..9dde3c9cb 100644 +--- a/backend/libinput/switch.c ++++ b/backend/libinput/switch.c +@@ -2,6 +2,7 @@ + #include + #include + #include "backend/libinput.h" ++#include "config.h" + + const struct wlr_switch_impl libinput_switch_impl = { + .name = "libinput-switch", +@@ -36,6 +37,10 @@ void handle_switch_toggle(struct libinput_event *event, + case LIBINPUT_SWITCH_TABLET_MODE: + wlr_event.switch_type = WLR_SWITCH_TYPE_TABLET_MODE; + break; ++#if HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE ++ case LIBINPUT_SWITCH_KEYPAD_SLIDE: ++ return; ++#endif + } + switch (libinput_event_switch_get_switch_state(sevent)) { + case LIBINPUT_SWITCH_STATE_OFF: +-- +GitLab + diff --git a/wlroots.spec b/wlroots.spec index 2215c59..7ba06e2 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -6,7 +6,7 @@ Name: wlroots Version: 0.19.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but @@ -39,6 +39,7 @@ Source3: examples.meson.build # Upstream patches # https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5203 Patch: Fix-discarded-const-qualifier.patch +Patch: %{url}/-/commit/c1452d88.patch#/backend-libinput-fix-build-with-libinput-1.31.patch # Fedora patches # Following patch is required for phoc. @@ -143,6 +144,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Thu Feb 12 2026 Aleksei Bavshin - 0.19.2-4 +- Apply upstream patch for libinput 1.31 compatibility + * Sat Jan 24 2026 Aleksei Bavshin - 0.19.2-3 - Rebuild for libdisplay-info 0.3.0 From 75918f6d7db6f9c89b2a87610a36ddc2e3a132f3 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 14 Feb 2026 12:18:54 -0800 Subject: [PATCH 56/61] Update to 0.20.0-rc2 --- Fix-discarded-const-qualifier.patch | 30 ------------ ...ibinput-fix-build-with-libinput-1.31.patch | 48 ------------------- examples.meson.build | 37 +++++++------- sources | 4 +- wlroots.spec | 32 +++++++------ 5 files changed, 39 insertions(+), 112 deletions(-) delete mode 100644 Fix-discarded-const-qualifier.patch delete mode 100644 backend-libinput-fix-build-with-libinput-1.31.patch diff --git a/Fix-discarded-const-qualifier.patch b/Fix-discarded-const-qualifier.patch deleted file mode 100644 index fd74c75..0000000 --- a/Fix-discarded-const-qualifier.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 47486545b196987f6f07fffe2929bba8f515b8e9 Mon Sep 17 00:00:00 2001 -From: Dale Turner -Date: Wed, 3 Dec 2025 20:02:29 -0400 -Subject: [PATCH] =?UTF-8?q?Add=20"const"=20to=20eliminate=20"error:=20init?= - =?UTF-8?q?ialization=20discards=20=E2=80=98const=E2=80=99=20qualifier=20f?= - =?UTF-8?q?rom=20pointer=20target=20type"?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - xcursor/xcursor.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xcursor/xcursor.c b/xcursor/xcursor.c -index b5edb9de86..6627fb6cd7 100644 ---- a/xcursor/xcursor.c -+++ b/xcursor/xcursor.c -@@ -602,7 +602,7 @@ xcursor_build_fullname(const char *dir, const char *subdir, const char *file) - static const char * - xcursor_next_path(const char *path) - { -- char *colon = strchr(path, ':'); -+ const char *colon = strchr(path, ':'); - - if (!colon) - return NULL; --- -GitLab - diff --git a/backend-libinput-fix-build-with-libinput-1.31.patch b/backend-libinput-fix-build-with-libinput-1.31.patch deleted file mode 100644 index ff30e78..0000000 --- a/backend-libinput-fix-build-with-libinput-1.31.patch +++ /dev/null @@ -1,48 +0,0 @@ -From c1452d88114710f5772662b1d8efb9c71edaa34c Mon Sep 17 00:00:00 2001 -From: Aleksei Bavshin -Date: Sat, 7 Feb 2026 17:48:16 -0800 -Subject: [PATCH] backend/libinput: fix build with libinput 1.31 - ---- - backend/libinput/meson.build | 4 ++++ - backend/libinput/switch.c | 5 +++++ - 2 files changed, 9 insertions(+) - -diff --git a/backend/libinput/meson.build b/backend/libinput/meson.build -index c244eb77a..091b0e0eb 100644 ---- a/backend/libinput/meson.build -+++ b/backend/libinput/meson.build -@@ -29,3 +29,7 @@ features += { 'libinput-backend': true } - wlr_deps += libinput - - internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0')) -+internal_config.set10( -+ 'HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE', -+ libinput.version().version_compare('>=1.30.901') -+) -diff --git a/backend/libinput/switch.c b/backend/libinput/switch.c -index abeec86d7..9dde3c9cb 100644 ---- a/backend/libinput/switch.c -+++ b/backend/libinput/switch.c -@@ -2,6 +2,7 @@ - #include - #include - #include "backend/libinput.h" -+#include "config.h" - - const struct wlr_switch_impl libinput_switch_impl = { - .name = "libinput-switch", -@@ -36,6 +37,10 @@ void handle_switch_toggle(struct libinput_event *event, - case LIBINPUT_SWITCH_TABLET_MODE: - wlr_event.switch_type = WLR_SWITCH_TYPE_TABLET_MODE; - break; -+#if HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE -+ case LIBINPUT_SWITCH_KEYPAD_SLIDE: -+ return; -+#endif - } - switch (libinput_event_switch_get_switch_state(sevent)) { - case LIBINPUT_SWITCH_STATE_OFF: --- -GitLab - diff --git a/examples.meson.build b/examples.meson.build index 4f3156e..b738157 100644 --- a/examples.meson.build +++ b/examples.meson.build @@ -1,18 +1,28 @@ # Client examples are now available from a separate repository, # https://gitlab.freedesktop.org/wlroots/wlr-clients project( - 'wlroots-examples', - 'c', - meson_version: '>=0.58.0', - default_options: [ - 'c_std=c11', - 'warning_level=2', - 'werror=false', - ], + 'wlroots-examples', + 'c', + meson_version: '>=0.58.0', + default_options: [ + 'c_std=c11', + 'warning_level=2', + 'werror=false', + ], ) +add_project_arguments([ + '-D_POSIX_C_SOURCE=200809L', + '-DWLR_USE_UNSTABLE', +], language: 'c') + cc = meson.get_compiler('c') -add_global_arguments('-DWLR_USE_UNSTABLE', language : 'c') + +add_project_arguments(cc.get_supported_arguments([ + '-Wno-missing-braces', + '-Wno-missing-field-initializers', + '-Wno-unused-parameter' +]), language: 'c') cairo = dependency('cairo') drm = dependency('libdrm') @@ -29,7 +39,7 @@ wayland_scanner = find_program( native: true, ) wayland_server = dependency('wayland-server') -wlroots = dependency('wlroots-0.18') +wlroots = dependency('wlroots-0.20') xkbcommon = dependency('xkbcommon') wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') @@ -37,9 +47,6 @@ wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') protocols = { # Stable upstream protocols 'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml', - - # Unstable upstream protocols - 'fullscreen-shell-unstable-v1': wl_protocol_dir / 'unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml', } protocols_code = {} @@ -94,10 +101,6 @@ compositors = { 'output-layout': { 'src': ['output-layout.c', 'cat.c'], }, - 'fullscreen-shell': { - 'src': 'fullscreen-shell.c', - 'proto': ['fullscreen-shell-unstable-v1'], - }, 'scene-graph': { 'src': 'scene-graph.c', 'proto': ['xdg-shell'], diff --git a/sources b/sources index 84a6c9a..e2a7b36 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.19.2.tar.gz) = 8228bdd463f3b79c02cc36311f93eb3a2fe2c8406222316a9996abebfbefa39cc4a9587ea800d677961d59b27c82ae906e538dceaf565403bbb3f2b1ae19eff1 -SHA512 (wlroots-0.19.2.tar.gz.sig) = c9f2bc6413c19e1fd52f151779a80513a72f0b9d1df706ad3d77df74f0736c22e12122fe08c3f24c908649ca1f3adad5aee8f8cc65fa0b24155353ca66f6e240 +SHA512 (wlroots-0.20.0-rc2.tar.gz) = 44a98731d1685385d7b3fb0d52cdd0d4659f8c9fa59d796d99171740516fcc86c84044aa997b3f05cf3e38b401120b33c16410acca7803ea6917af63d018798f +SHA512 (wlroots-0.20.0-rc2.tar.gz.sig) = 08e4ed50a52cab65e42a25932f5c8f0b5e62c703467b937a5ea22f7b32ce64f260a7b72fce509d5d704b97b87f392f73a122745194dc7fd0f4e783a459779254 diff --git a/wlroots.spec b/wlroots.spec index 7ba06e2..8481e0b 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,14 +1,15 @@ # Version of the .so library -%global abi_ver 0.19 +%global abi_ver 0.20 # libliftoff does not bump soname on API changes %global liftoff_ver 0.5.0 -%global tag 0.19.2 Name: wlroots -Version: 0.19.2 -Release: 4%{?dist} +Version: 0.20.0~rc2 +Release: 1%{?dist} Summary: A modular Wayland compositor library +%global tag %{gsub %{version} ~ -} + # Source files/overall project licensed as MIT, but # - HPND-sell-variant # * protocol/drm.xml @@ -37,9 +38,6 @@ Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk Source3: examples.meson.build # Upstream patches -# https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5203 -Patch: Fix-discarded-const-qualifier.patch -Patch: %{url}/-/commit/c1452d88.patch#/backend-libinput-fix-build-with-libinput-1.31.patch # Fedora patches # Following patch is required for phoc. @@ -52,21 +50,21 @@ BuildRequires: meson >= 1.3 BuildRequires: (pkgconfig(libliftoff) >= %{liftoff_ver} with pkgconfig(libliftoff) < 0.6) BuildRequires: pkgconfig(egl) -BuildRequires: pkgconfig(gbm) >= 17.1.0 +BuildRequires: pkgconfig(gbm) >= 21.1 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(hwdata) BuildRequires: pkgconfig(lcms2) -BuildRequires: pkgconfig(libdisplay-info) -BuildRequires: pkgconfig(libdrm) >= 2.4.122 +BuildRequires: pkgconfig(libdisplay-info) >= 0.2.0 +BuildRequires: pkgconfig(libdrm) >= 2.4.129 BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libudev) -BuildRequires: pkgconfig(pixman-1) >= 0.43.0 +BuildRequires: pkgconfig(pixman-1) >= 0.46.0 BuildRequires: pkgconfig(vulkan) >= 1.2.182 BuildRequires: pkgconfig(wayland-client) -BuildRequires: pkgconfig(wayland-protocols) >= 1.41 +BuildRequires: pkgconfig(wayland-protocols) >= 1.47 BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-server) >= 1.23.1 +BuildRequires: pkgconfig(wayland-server) >= 1.24.0 BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-composite) @@ -79,9 +77,9 @@ BuildRequires: pkgconfig(xcb-render) BuildRequires: pkgconfig(xcb-renderutil) BuildRequires: pkgconfig(xcb-res) BuildRequires: pkgconfig(xcb-shm) -BuildRequires: pkgconfig(xcb-xfixes) +BuildRequires: pkgconfig(xcb-xfixes) >= 1.15 BuildRequires: pkgconfig(xcb-xinput) -BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(xkbcommon) >= 1.8.0 BuildRequires: pkgconfig(xwayland) # libliftoff does not bump soname on API changes Requires: libliftoff%{?_isa} >= %{liftoff_ver} @@ -124,6 +122,7 @@ MESON_OPTIONS=( %install %{meson_install} +install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/*.[ch] install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build' @@ -144,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Sat Feb 14 2026 Aleksei Bavshin - 0.20.0~rc2-1 +- Update to 0.20.0-rc2 + * Thu Feb 12 2026 Aleksei Bavshin - 0.19.2-4 - Apply upstream patch for libinput 1.31 compatibility From 07351d6b733e0e99e02201af9636c775ec14bf38 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 19 Mar 2026 19:05:45 -0700 Subject: [PATCH 57/61] Update to 0.20.0~rc5 --- sources | 4 ++-- wlroots.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index e2a7b36..a7f0dc6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.20.0-rc2.tar.gz) = 44a98731d1685385d7b3fb0d52cdd0d4659f8c9fa59d796d99171740516fcc86c84044aa997b3f05cf3e38b401120b33c16410acca7803ea6917af63d018798f -SHA512 (wlroots-0.20.0-rc2.tar.gz.sig) = 08e4ed50a52cab65e42a25932f5c8f0b5e62c703467b937a5ea22f7b32ce64f260a7b72fce509d5d704b97b87f392f73a122745194dc7fd0f4e783a459779254 +SHA512 (wlroots-0.20.0-rc5.tar.gz) = 947880133abae9ca6946e162e02acea61b8281b5ec459d534b81b2725276bdfc0ccd9e5d4b43f4174549920bf69dccf533a09d7cb92d6a909e0611548164d35a +SHA512 (wlroots-0.20.0-rc5.tar.gz.sig) = b7778e60d038f945bf4c57c7a4a6a69e07c1a8c7c93acfbee5e1d409c4be3ed799a9f3da90625be8e88ea7c41caddd739ea89d832bc9ede616380a6ff4054cf5 diff --git a/wlroots.spec b/wlroots.spec index 8481e0b..ea5a9f5 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -4,7 +4,7 @@ %global liftoff_ver 0.5.0 Name: wlroots -Version: 0.20.0~rc2 +Version: 0.20.0~rc5 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Thu Mar 19 2026 Aleksei Bavshin - 0.20.0~rc5-1 +- Update to 0.20.0-rc5 + * Sat Feb 14 2026 Aleksei Bavshin - 0.20.0~rc2-1 - Update to 0.20.0-rc2 From 460ac433508c7064a8e732b4761f4ef214292ec2 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 26 Mar 2026 19:27:15 -0700 Subject: [PATCH 58/61] Update to 0.20.0 (#2435845) --- sources | 4 ++-- wlroots.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a7f0dc6..c049601 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.20.0-rc5.tar.gz) = 947880133abae9ca6946e162e02acea61b8281b5ec459d534b81b2725276bdfc0ccd9e5d4b43f4174549920bf69dccf533a09d7cb92d6a909e0611548164d35a -SHA512 (wlroots-0.20.0-rc5.tar.gz.sig) = b7778e60d038f945bf4c57c7a4a6a69e07c1a8c7c93acfbee5e1d409c4be3ed799a9f3da90625be8e88ea7c41caddd739ea89d832bc9ede616380a6ff4054cf5 +SHA512 (wlroots-0.20.0.tar.gz) = c951c9f6f9d720f994ee49a937ae8ed63f733a4fa1ce71f7e6ce1513f2cd91616ce8bd8cbb844aa1e46e62f3b46b028f3004bab94eca5ef8899cbaa3134ac314 +SHA512 (wlroots-0.20.0.tar.gz.sig) = 9241568120700b7dadd92ee212ee7c78d1d1fcfe3873250d09c97b9207a7cb8687b393ce8ce9f258698c17caf924ff2c91571e235580fcd7b8618d68e87e690b diff --git a/wlroots.spec b/wlroots.spec index ea5a9f5..f643140 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -4,7 +4,7 @@ %global liftoff_ver 0.5.0 Name: wlroots -Version: 0.20.0~rc5 +Version: 0.20.0 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Thu Mar 26 2026 Aleksei Bavshin - 0.20.0-1 +- Update to 0.20.0 (#2435845) + * Thu Mar 19 2026 Aleksei Bavshin - 0.20.0~rc5-1 - Update to 0.20.0-rc5 From 9e3cf5a0cfc6f0f892f8849c79580b06fbe26a20 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 19 May 2026 22:46:13 -0700 Subject: [PATCH 59/61] Update to 0.20.1 (#2480014) --- sources | 4 ++-- wlroots.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index c049601..a64ff05 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.20.0.tar.gz) = c951c9f6f9d720f994ee49a937ae8ed63f733a4fa1ce71f7e6ce1513f2cd91616ce8bd8cbb844aa1e46e62f3b46b028f3004bab94eca5ef8899cbaa3134ac314 -SHA512 (wlroots-0.20.0.tar.gz.sig) = 9241568120700b7dadd92ee212ee7c78d1d1fcfe3873250d09c97b9207a7cb8687b393ce8ce9f258698c17caf924ff2c91571e235580fcd7b8618d68e87e690b +SHA512 (wlroots-0.20.1.tar.gz) = 9114dd1638cbe2f4762eeae099aa7d92f28a0895ea495c34ff23e581c7fd400ec91c53fc573dab433fc7558b8c56bcef9d9c96a09dacd01b1c55b47356e82ea1 +SHA512 (wlroots-0.20.1.tar.gz.sig) = 882536ebe9e8d0684a58b453674bfe10a6effe553be0201cc2abd46e388d7fb08d726ac751918bde73c15585a08285c6482d01c7c8b6a951411900b581e6215f diff --git a/wlroots.spec b/wlroots.spec index f643140..327ec12 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -4,7 +4,7 @@ %global liftoff_ver 0.5.0 Name: wlroots -Version: 0.20.0 +Version: 0.20.1 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Tue May 19 2026 Aleksei Bavshin - 0.20.1-1 +- Update to 0.20.1 (#2480014) + * Thu Mar 26 2026 Aleksei Bavshin - 0.20.0-1 - Update to 0.20.0 (#2435845) From b7b643804e9ba319d6d95765a6d5cd5ee1e8a9ed Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 7 Jul 2026 20:03:34 -0700 Subject: [PATCH 60/61] Update to 0.20.2 (#2497891) --- sources | 4 ++-- wlroots.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a64ff05..c7cac09 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (wlroots-0.20.1.tar.gz) = 9114dd1638cbe2f4762eeae099aa7d92f28a0895ea495c34ff23e581c7fd400ec91c53fc573dab433fc7558b8c56bcef9d9c96a09dacd01b1c55b47356e82ea1 -SHA512 (wlroots-0.20.1.tar.gz.sig) = 882536ebe9e8d0684a58b453674bfe10a6effe553be0201cc2abd46e388d7fb08d726ac751918bde73c15585a08285c6482d01c7c8b6a951411900b581e6215f +SHA512 (wlroots-0.20.2.tar.gz) = 634345e23d0b6c28cb501c0dd0ef9c50d529a92ae5c8455e99e876f3f37ee244ac19dd097f76416b2ae4fd7c3f02e39a92a9322cf5a0caf8da21c31cd900e508 +SHA512 (wlroots-0.20.2.tar.gz.sig) = e74dc0abfabed7f40ba4f0e5edfc30ef92b95ebcf4a6aca3b2a605b04b5f2345a6a842cdf56819ce1f050c6181b646eae19dbef835354df7b09562cebbdaa474 diff --git a/wlroots.spec b/wlroots.spec index 327ec12..43e5041 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -4,7 +4,7 @@ %global liftoff_ver 0.5.0 Name: wlroots -Version: 0.20.1 +Version: 0.20.2 Release: 1%{?dist} Summary: A modular Wayland compositor library @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Tue Jul 07 2026 Aleksei Bavshin - 0.20.2-1 +- Update to 0.20.2 (#2497891) + * Tue May 19 2026 Aleksei Bavshin - 0.20.1-1 - Update to 0.20.1 (#2480014) From e479909c1df4a952a384a21fa693aa6a3d772a83 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:52:15 +0000 Subject: [PATCH 61/61] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- wlroots.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wlroots.spec b/wlroots.spec index 43e5041..0ce3b16 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -5,7 +5,7 @@ Name: wlroots Version: 0.20.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular Wayland compositor library %global tag %{gsub %{version} ~ -} @@ -143,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 0.20.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Tue Jul 07 2026 Aleksei Bavshin - 0.20.2-1 - Update to 0.20.2 (#2497891)