Message ID | 20230427172036.863789-5-rs@ti.com |
---|---|
State | Superseded |
Delegated to: | Ryan Eatmon |
Headers | show |
Series | Vulkan prep and some cleanup | expand |
On Thu, Apr 27, 2023 at 12:20:35PM -0500, rs@ti.com wrote: > From: Randolph Sapp <rs@ti.com> > > This seems like it was a needless patch to guard against garbage from > being shown if the window icon request failed to return any useful icon. > Not necessary. > > Add some info about why this bbappend still exists. It's to prefer > wayland over x11 and remove some unoptimized components. > > Signed-off-by: Randolph Sapp <rs@ti.com> > --- > ...ons-bradient-display-window-icon-onl.patch | 42 ------------------- > .../recipes-qt/qt5/qtwayland_git.bbappend | 8 ++-- > 2 files changed, 3 insertions(+), 47 deletions(-) > delete mode 100644 meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch > > diff --git a/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch b/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch > deleted file mode 100644 > index 33f28390..00000000 > --- a/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch > +++ /dev/null > @@ -1,42 +0,0 @@ > -From 547fd678ba55025c3578f021b40c96b1e91b839e Mon Sep 17 00:00:00 2001 > -From: Eric Ruei <e-ruei1@ti.com> > -Date: Fri, 9 Sep 2016 16:54:02 -0400 > -Subject: [PATCH] plugins/decorations/bradient: display window icon only if > - icon.pixmap not null > - > -Signed-off-by: Eric Ruei <e-ruei1@ti.com> > ---- > - src/plugins/decorations/bradient/main.cpp | 17 ++++++++++------- > - 1 file changed, 10 insertions(+), 7 deletions(-) > - > -diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp > -index ea29869..279bff1 100644 > ---- a/src/plugins/decorations/bradient/main.cpp > -+++ b/src/plugins/decorations/bradient/main.cpp > -@@ -222,13 +222,16 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device) > - // Window icon > - QIcon icon = waylandWindow()->windowIcon(); > - if (!icon.isNull()) { > -- QPixmap pixmap = icon.pixmap(QSize(128, 128)); > -- QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); > -- > -- QRectF iconRect(0, 0, 22, 22); > -- p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, > -- margins().left() + BUTTON_SPACING, 4), > -- scaled, iconRect); > -+ QPixmap pixmap = icon.pixmap(QSize(128, 128)); > -+ if(!pixmap.isNull()) > -+ { > -+ QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); > -+ > -+ QRectF iconRect(0, 0, 22, 22); > -+ p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, > -+ margins().left() + BUTTON_SPACING, 4), > -+ scaled, iconRect); > -+ } > - } > - > - // Window title > --- > -1.9.1 > - > diff --git a/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend b/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend > index df8b5eff..11d8e2ce 100644 > --- a/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend > +++ b/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend > @@ -1,8 +1,6 @@ > -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" > -PR:append = ".arago2" > +# This append exists to modify the PACKAGECONFIG such that the wayland backend > +# is preferred over x11 and unoptimized components are removed. If changing PACKAGECONFIG is the only need for a bbappend, then you should rather do it in the distro config: https://git.yoctoproject.org/meta-arago/tree/meta-arago-distro/conf/distro/arago.conf#n72 > -SRC_URI += " \ > - file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ > -" > +PR:append = ".arago3" > > PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx" > -- > 2.40.0
On 4/27/23 14:53, Denys Dmytriyenko wrote: > On Thu, Apr 27, 2023 at 12:20:35PM -0500, rs@ti.com wrote: >> From: Randolph Sapp <rs@ti.com> >> >> This seems like it was a needless patch to guard against garbage from >> being shown if the window icon request failed to return any useful icon. >> Not necessary. >> >> Add some info about why this bbappend still exists. It's to prefer >> wayland over x11 and remove some unoptimized components. >> >> Signed-off-by: Randolph Sapp <rs@ti.com> >> --- >> ...ons-bradient-display-window-icon-onl.patch | 42 ------------------- >> .../recipes-qt/qt5/qtwayland_git.bbappend | 8 ++-- >> 2 files changed, 3 insertions(+), 47 deletions(-) >> delete mode 100644 meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch >> >> diff --git a/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch b/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch >> deleted file mode 100644 >> index 33f28390..00000000 >> --- a/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch >> +++ /dev/null >> @@ -1,42 +0,0 @@ >> -From 547fd678ba55025c3578f021b40c96b1e91b839e Mon Sep 17 00:00:00 2001 >> -From: Eric Ruei <e-ruei1@ti.com> >> -Date: Fri, 9 Sep 2016 16:54:02 -0400 >> -Subject: [PATCH] plugins/decorations/bradient: display window icon only if >> - icon.pixmap not null >> - >> -Signed-off-by: Eric Ruei <e-ruei1@ti.com> >> ---- >> - src/plugins/decorations/bradient/main.cpp | 17 ++++++++++------- >> - 1 file changed, 10 insertions(+), 7 deletions(-) >> - >> -diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp >> -index ea29869..279bff1 100644 >> ---- a/src/plugins/decorations/bradient/main.cpp >> -+++ b/src/plugins/decorations/bradient/main.cpp >> -@@ -222,13 +222,16 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device) >> - // Window icon >> - QIcon icon = waylandWindow()->windowIcon(); >> - if (!icon.isNull()) { >> -- QPixmap pixmap = icon.pixmap(QSize(128, 128)); >> -- QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); >> -- >> -- QRectF iconRect(0, 0, 22, 22); >> -- p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, >> -- margins().left() + BUTTON_SPACING, 4), >> -- scaled, iconRect); >> -+ QPixmap pixmap = icon.pixmap(QSize(128, 128)); >> -+ if(!pixmap.isNull()) >> -+ { >> -+ QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); >> -+ >> -+ QRectF iconRect(0, 0, 22, 22); >> -+ p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, >> -+ margins().left() + BUTTON_SPACING, 4), >> -+ scaled, iconRect); >> -+ } >> - } >> - >> - // Window title >> --- >> -1.9.1 >> - >> diff --git a/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend b/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend >> index df8b5eff..11d8e2ce 100644 >> --- a/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend >> +++ b/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend >> @@ -1,8 +1,6 @@ >> -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" >> -PR:append = ".arago2" >> +# This append exists to modify the PACKAGECONFIG such that the wayland backend >> +# is preferred over x11 and unoptimized components are removed. > > If changing PACKAGECONFIG is the only need for a bbappend, then you should > rather do it in the distro config: > > https://git.yoctoproject.org/meta-arago/tree/meta-arago-distro/conf/distro/arago.conf#n72 > Fair enough. Expect a v3. > >> -SRC_URI += " \ >> - file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ >> -" >> +PR:append = ".arago3" >> >> PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx" >> -- >> 2.40.0
diff --git a/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch b/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch deleted file mode 100644 index 33f28390..00000000 --- a/meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 547fd678ba55025c3578f021b40c96b1e91b839e Mon Sep 17 00:00:00 2001 -From: Eric Ruei <e-ruei1@ti.com> -Date: Fri, 9 Sep 2016 16:54:02 -0400 -Subject: [PATCH] plugins/decorations/bradient: display window icon only if - icon.pixmap not null - -Signed-off-by: Eric Ruei <e-ruei1@ti.com> ---- - src/plugins/decorations/bradient/main.cpp | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp -index ea29869..279bff1 100644 ---- a/src/plugins/decorations/bradient/main.cpp -+++ b/src/plugins/decorations/bradient/main.cpp -@@ -222,13 +222,16 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device) - // Window icon - QIcon icon = waylandWindow()->windowIcon(); - if (!icon.isNull()) { -- QPixmap pixmap = icon.pixmap(QSize(128, 128)); -- QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -- -- QRectF iconRect(0, 0, 22, 22); -- p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -- margins().left() + BUTTON_SPACING, 4), -- scaled, iconRect); -+ QPixmap pixmap = icon.pixmap(QSize(128, 128)); -+ if(!pixmap.isNull()) -+ { -+ QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -+ -+ QRectF iconRect(0, 0, 22, 22); -+ p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -+ margins().left() + BUTTON_SPACING, 4), -+ scaled, iconRect); -+ } - } - - // Window title --- -1.9.1 - diff --git a/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend b/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend index df8b5eff..11d8e2ce 100644 --- a/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +++ b/meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend @@ -1,8 +1,6 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -PR:append = ".arago2" +# This append exists to modify the PACKAGECONFIG such that the wayland backend +# is preferred over x11 and unoptimized components are removed. -SRC_URI += " \ - file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ -" +PR:append = ".arago3" PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx"