diff options
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 62 | ||||
-rw-r--r-- | pr27-locale-pl.patch | 21 | ||||
-rw-r--r-- | pr27.patch | 67 |
5 files changed, 179 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ce2cc8bc8061 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = xfwm4-windowcenter + pkgdesc = Xfce's window manager, with a patch to allow titles to be centered relatively to the full window title. + pkgver = 4.18.0 + pkgrel = 1 + url = https://gitlab.xfce.org/xfce/xfwm4/-/merge_requests/27 + arch = x86_64 + groups = xfce4 + license = GPL2 + makedepends = intltool + makedepends = git + makedepends = xfce4-dev-tools + depends = libxfce4ui + depends = xfconf + depends = libwnck3 + depends = libepoxy + depends = libxpresent + depends = hicolor-icon-theme + provides = xfwm4=4.18.0 + conflicts = xfwm4 + source = xfwm4-windowcenter::git+https://gitlab.xfce.org/xfce/xfwm4#tag=xfwm4-4.18.0 + source = pr27.patch + source = pr27-locale-pl.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = xfwm4-windowcenter diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f1c3ed707b71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pkg.tar.* +*/
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9f57b0d83c56 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: SpacingBat3 <aur@spacingbat3.anonaddy.com> +# Contributor: Evangelos Foutras <evangelos@foutrelis.com> +# Contributor: tobias <tobias funnychar archlinux.org> + +# Based on PKGBUILD for package: extra/xfwm4 (4.18.0-1) +pkgname=xfwm4-windowcenter +pkgver=4.18.0 +pkgrel=1 +pkgdesc="Xfce's window manager, with a patch to allow titles to be centered relatively to the full window title." +arch=('x86_64') +url="https://gitlab.xfce.org/xfce/xfwm4/-/merge_requests/27" +license=('GPL2') +groups=('xfce4') +depends=('libxfce4ui' 'xfconf' 'libwnck3' 'libepoxy' 'libxpresent' + 'hicolor-icon-theme') +makedepends=('intltool' 'git' 'xfce4-dev-tools') +provides=("xfwm4=$pkgver") +conflicts=("xfwm4") +source=( + "$pkgname::git+https://gitlab.xfce.org/xfce/xfwm4#tag=xfwm4-$pkgver" + pr27{,-locale-pl}.patch +) +sha256sums=(SKIP{,,}) + +# Workaround #661: "Build with `--enable-compositor` fails due to missing headers" +# <https://gitlab.xfce.org/xfce/xfwm4/-/issues/661> +_workaround_661() { + make + make clean +} + +prepare(){ + cd $pkgname + # Original patch by Ryan Bester (see $url for the reference) + # Backported for 4.18.0 and localized to Polish by SpacingBat3 + git apply ../pr27{,-locale-pl}.patch + ./autogen.sh +} + +build() { + cd $pkgname + + _workaround_661 + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-startup-notification \ + --enable-randr \ + --enable-compositor \ + --enable-xsync \ + --disable-debug + make +} + +package() { + cd $pkgname + make DESTDIR="$pkgdir" install +} + +# vim:set ts=2 sw=2 et: diff --git a/pr27-locale-pl.patch b/pr27-locale-pl.patch new file mode 100644 index 000000000000..85d6bd8dbc4d --- /dev/null +++ b/pr27-locale-pl.patch @@ -0,0 +1,21 @@ +diff --git a/po/pl.po b/po/pl.po +index ae06747f4..00049ca25 100644 +--- a/po/pl.po ++++ b/po/pl.po +@@ -390,10 +390,14 @@ msgid "Left" + msgstr "Lewo" + + #: ../settings-dialogs/xfwm4-settings.c:229 +-msgid "Center" +-msgstr "Środek" ++msgid "Center in Free Space" ++msgstr "Środek (wolna przestrzeń)" + + #: ../settings-dialogs/xfwm4-settings.c:230 ++msgid "Center in Window" ++msgstr "Środek (okno)" ++ ++#: ../settings-dialogs/xfwm4-settings.c:231 + msgid "Right" + msgstr "Prawo" + diff --git a/pr27.patch b/pr27.patch new file mode 100644 index 000000000000..6bb7e6ec2501 --- /dev/null +++ b/pr27.patch @@ -0,0 +1,67 @@ +diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c +index 145551fd2..23b3f7c21 100644 +--- a/settings-dialogs/xfwm4-settings.c ++++ b/settings-dialogs/xfwm4-settings.c +@@ -226,7 +226,8 @@ static const MenuTemplate double_click_values[] = { + + static const MenuTemplate title_align_values[] = { + { N_("Left"), "left" }, +- { N_("Center"), "center" }, ++ { N_("Center in Free Space"), "center" }, ++ { N_("Center in Window"), "center_window" }, + { N_("Right"), "right" }, + { NULL, NULL }, + }; +diff --git a/src/frame.c b/src/frame.c +index 279baeecb..cdd530bc3 100644 +--- a/src/frame.c ++++ b/src/frame.c +@@ -253,6 +253,9 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap * + case ALIGN_CENTER: + hoffset = (w3 / 2) - (logical_rect.width / 2); + break; ++ case ALIGN_CENTER_WINDOW: ++ hoffset = (width / 2) - (logical_rect.width / 2) - left; ++ break; + } + if (hoffset < screen_info->params->title_horizontal_offset) + { +@@ -282,6 +285,9 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap * + case ALIGN_CENTER: + w1 = left + ((right - left) / 2) - (w3 / 2) - w2; + break; ++ case ALIGN_CENTER_WINDOW: ++ w1 = (width / 2) - (logical_rect.width / 2) - w2; ++ break; + } + if (w1 < left) + { +diff --git a/src/settings.c b/src/settings.c +index 8fa35cde5..653e1363a 100644 +--- a/src/settings.c ++++ b/src/settings.c +@@ -527,6 +527,10 @@ loadTheme (ScreenInfo *screen_info, Settings *rc) + { + screen_info->params->title_alignment = ALIGN_RIGHT; + } ++ else if (!g_ascii_strcasecmp ("center_window", getStringValue ("title_alignment", rc))) ++ { ++ screen_info->params->title_alignment = ALIGN_CENTER_WINDOW; ++ } + else + { + screen_info->params->title_alignment = ALIGN_CENTER; +diff --git a/src/settings.h b/src/settings.h +index 612ee2e8a..fecf474a9 100644 +--- a/src/settings.h ++++ b/src/settings.h +@@ -142,7 +142,8 @@ enum + { + ALIGN_LEFT, + ALIGN_RIGHT, +- ALIGN_CENTER ++ ALIGN_CENTER, ++ ALIGN_CENTER_WINDOW + }; + + enum |