- build with gcc14

- use existing openSUSE wallpaper image file
- use FvwmBacker module for background instead of external program
- do not depend on xli anymore
- modified sources
  % system.fvwm2rc
- added patches
  fix https://github.com/fvwmorg/fvwm/pull/100
  + fvwm2-gcc14.patch

OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/fvwm2?expand=0&rev=55
This commit is contained in:
Michael Vetter 2024-11-25 08:22:49 +00:00 committed by Git OBS Bridge
commit 03e3a48f7b
15 changed files with 2183 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

17
fvwm-2.5.26-sv_SE.patch Normal file
View File

@ -0,0 +1,17 @@
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: configure.ac
===================================================================
--- configure.ac.orig
+++ configure.ac
@@ -1263,7 +1263,7 @@ AC_ARG_ENABLE(perllib,
AC_SUBST(FVWM_PERLLIB)
# ******* gettext
-ALL_LINGUAS="ar da de fr sv_SE zh_CN ru es"
+ALL_LINGUAS="ar da de fr sv zh_CN ru es"
FVWM_DOMAIN="fvwm"
FVWMSCRIPT_DOMAIN="FvwmScript"
ALL_DOMAINS="$FVWM_DOMAIN $FVWMTASKBAR_DOMAIN $FVWMSCRIPT_DOMAIN"

3
fvwm-2.7.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:66826dd60b774447170037d9078fd43e75f7230a49acfb84a988eebce7e3418b
size 3933529

View File

@ -0,0 +1,11 @@
--- modules/FvwmAuto/FvwmAuto.c.orig
+++ modules/FvwmAuto/FvwmAuto.c
@@ -340,6 +340,8 @@ main(int argc, char **argv)
{
len = max(len, strlen(leave_fn));
}
+ /* add space for newline and trailing 0 */
+ len += 2;
if (do_pass_id)
{
len += 32;

17
fvwm-configure.patch Normal file
View File

@ -0,0 +1,17 @@
Index: configure.ac
===================================================================
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- configure.ac
+++ configure.ac 2017-02-07 10:53:27.290904016 +0000
@@ -104,7 +104,7 @@ AC_ARG_ENABLE(package-subdirs,
fi], [])
-FVWM_MODULEDIR='${libexecdir}'"$FVWM_MODULESUBDIR"
+FVWM_MODULEDIR='${libexecdir}'
FVWM_DATADIR='${datadir}'"$FVWM_DATASUBDIR"
FVWM_DOCDIR='${datadir}'"$FVWM_DOCSUBDIR"
FVWM_PERLLIBDIR='${datadir}'"$FVWM_DATASUBDIR/perllib"

29
fvwm-no-date-time.patch Normal file
View File

@ -0,0 +1,29 @@
---
fvwm/fvwm.c | 4 ++--
fvwm/session.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- fvwm/fvwm.c
+++ fvwm/fvwm.c 2017-02-07 11:11:29.990180773 +0000
@@ -1295,8 +1295,8 @@ static void setVersionInfo(void)
int support_len;
/* Set version information string */
- sprintf(version_str, "fvwm %s%s compiled on %s at %s",
- VERSION, VERSIONINFO, __DATE__, __TIME__);
+ sprintf(version_str, "fvwm %s%s",
+ VERSION, VERSIONINFO);
Fvwm_VersionInfo = safestrdup(version_str);
sprintf(license_str,
--- fvwm/session.c
+++ fvwm/session.c 2017-02-07 11:11:29.990180773 +0000
@@ -136,7 +136,7 @@ static char *get_version_string(void)
{
/* migo (14-Mar-2001): it is better to manually update a version string
* in the stable branch, otherwise saving sessions becomes useless */
- return CatString3(VERSION, ", ", __DATE__);
+ return CatString3(VERSION, ", ", "??? ?? ????");
/* return "2.6-0"; */
}

97
fvwm2-gcc14.patch Normal file
View File

@ -0,0 +1,97 @@
From 0b4daddf6b88b696daf54714448b8d89a615abf2 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 24 Nov 2022 13:06:50 +0100
Subject: [PATCH 1/3] configure: Do not require support for implicit ints
Implicit ints have not been part of C since 1999, and future
compilers will disable support for them by default. Fortunatenly,
only one configure check needs adjusting.
---
acinclude.m4 | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 8b74ff1e5..b66042f9f 100644
--- acinclude.m4
+++ acinclude.m4
@@ -30,7 +30,7 @@ if test "$ac_cv_func_select" = yes; then
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif],
-[extern select ($ac_cv_type_fd_set_size_t,
+[extern int select ($ac_cv_type_fd_set_size_t,
$ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *,
$ac_type_timeval *);],
[ac_found=yes ; break 3],ac_found=no)
diff --git a/configure.ac b/configure.ac
index 97ab9e7a1..c9fcede6a 100644
--- configure.ac
+++ configure.ac
@@ -220,7 +220,7 @@ AC_MINIX
# catch -Werror and similar options when running configure
AC_TRY_COMPILE([#include <stdio.h>],
-[int i; static j; int *p; char *c;
+[int i; int *p; char *c;
switch (*p = p = *c) { case 0: printf("%Q", c, p); }
*c = &i; c = p;
while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
From 6b9d100ae4e784821b5189474dc58e646417bcf6 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 24 Nov 2022 13:07:56 +0100
Subject: [PATCH 2/3] acinclude.m4: Add missing <unistd.h> to
AM_SAFETY_CHECK_MKSTEMP
Otherwise, the check fails on a compiler which does not support
implicit function declarations (a language feature removed in 1999).
---
acinclude.m4 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/acinclude.m4 b/acinclude.m4
index b66042f9f..4dee2abeb 100644
--- acinclude.m4
+++ acinclude.m4
@@ -1154,6 +1154,9 @@ AC_DEFUN([AM_SAFETY_CHECK_MKSTEMP],[
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main(void)
{
char template[128];
From 33537b8ae5a302e4016dc1c6cfe5577fb3fa36c9 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 19 Dec 2023 13:24:50 +0100
Subject: [PATCH 3/3] configure: Further defang the -Werror check
Incompatible pointer types are actually errors (in the sense
that they are invalid C). Compilers have merely tolerated them as
warnings for backwards compatibility. This is changing with Clang 16
and GCC 14, so relax the check a little.
---
configure.ac | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index c9fcede6a..2e9615b2b 100644
--- configure.ac
+++ configure.ac
@@ -220,9 +220,8 @@ AC_MINIX
# catch -Werror and similar options when running configure
AC_TRY_COMPILE([#include <stdio.h>],
-[int i; int *p; char *c;
- switch (*p = p = *c) { case 0: printf("%Q", c, p); }
- *c = &i; c = p;
+[int unused; int *p; char *c;
+ printf("%Q", c, p);
while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
], , AC_MSG_ERROR("
configure is not able to compile programs with warnings. Please

1146
fvwm2.changes Normal file

File diff suppressed because it is too large Load Diff

57
fvwm2.desktop Normal file
View File

@ -0,0 +1,57 @@
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=fvwm
TryExec=fvwm
Name=FVWM
Name[hi]=
Name[xx]=xxFVWMxx
Comment=A powerful ICCCM-compliant multiple virtual desktop window manager
Comment[ar]=مدير نوافذ قوي ومتوافق مع ICCCM ذي أسطح مكتب وهمية متعددة
Comment[bn]= ি ি ICCCM-compliant , ি
Comment[bs]=Moćan ICCCM-sukladan window manager sa podrškom za više virtuelnih desktopa
Comment[ca]=Un poderós gestor de finestres per a múltiples escriptoris virtuals que compleix amb ICCCM
Comment[cy]=Trefnydd ffenestri pwerus efo penbyrddau rhith lluosol, sy'n cydymffurfio â ICCCM
Comment[da]=En kraftig ICCCM-kompliant vindueshåndtering med flere virtuelle desktoppe
Comment[de]=Ein mächtiger ICCCM-kompatibler Fenstermanager mit vielen virtuellen Arbeitsflächen
Comment[el]=Ένας πολύ δυνατός, συμβατός με το ICCCM, διαχειριστής παραθύρων με πολλαπλές εικονικές επιφάνειες εργασίας
Comment[eo]=Fenestroadministrilo
Comment[es]=Un potente administrador de ventanas, compatible con ICCCM y que soporta varios escritorios virtuales
Comment[et]=Võimas ICCCM nõuetele vastav mitme virtuaalse töölauaga aknahaldur
Comment[eu]=ICCCM konpatiblea den, eta mahaigain birtual ugari dituen leiho kudeatzaile bortitza
Comment[fi]=Tehokas ICCCM-mukautuva virtuaalityöpöytiä tukeva ikkunaohjelma
Comment[fr]=Un gestionnaire de fenêtres puissant compatible ICCCM avec gestion de bureaux virtuels multiples
Comment[fy]=In krêftige ICCCM-compliant finstersmanager mei meardere buroblêden
Comment[gl]=Un xestor de fiestras potente acorde coa ICCCM con múltiples escritorios virtuais
Comment[he]=מנהל חלונות עצמתי עם תאימות ל־ICCCM בעל שולחנות עבודה וירטואליים רבים
Comment[hi]=ि - ि
Comment[hr]=Moćni, ICCCM kompatibilni, upravitelj prozora s više virtualnih radnih površina
Comment[hu]=Egy sokoldalú, ICCCM-kompatibilis ablakkezelő, virtuális munkaasztal-kezeléssel
Comment[is]=Öflugur ICCCM samhæfður gluggastjóri með sýndarskjáborðum
Comment[it]=Un window manager molto potente e ICCCM-compatibile che supporta i desktop virtuali
Comment[ja]=ICCCM
Comment[lt]=galinga, su ICCCM suderinama daugelio virtualių darbastalių langų tvarkyklė
Comment[mk]=Моќен менаџер на прозорци со повеќе виртуелни површини во согласност со ICCCM
Comment[mt]=Window manager b'saħħtu, konformi ma' ICCCM, b'desktops virtwali.
Comment[nb]=En slagkraftig vindusbehandler med flere virtuelle skrivbord, som støtter ICCCM
Comment[nds]=En kraftvulle, ICCCM-kompatible Finsterpleger, mit vele virtuelle Schriefdischen
Comment[nl]=Een krachtige ICCCM-compliant windowmanager met meerdere bureaubladen
Comment[nn]=Ein slagkraftig vindaugssjef med fleire virtuelle skrivebord, som støttar ICCCM
Comment[pa]= ICCCM- - ਿਿ
Comment[pl]=Potężny menedżer okien zgodny z ICCCM obsługujący wirtualne pulpity
Comment[pt]=Um gestor de janelas poderoso em conformidade com o ICCCM e que suporta vários ecrãs virtuais
Comment[pt_BR]=Um poderoso gerenciador de janelas compatível com o ICCM, com suporte a múltiplas áreas de trabalho virtuais
Comment[ro]=Un manager de ferestre puternic compliant ICCCM ce suportă ecrane virtuale
Comment[ru]=Мощный ICCCM-совместимый оконный менеджер, поддерживающий виртуальные рабочие столы
Comment[sk]=Výkonný správca okien kompatibilný s ICCCM s podporou virtuálnych plôch
Comment[sl]=Močan okenski upravitelj z večimi navideznimi namizji in popolnoma v skladu z ICCCM
Comment[sr]=Моћни, ICCCM-сагласни, менаџер прозора са више виртуелних радних површина
Comment[sr@Latn]=Moćni, ICCCM-saglasni, menadžer prozora sa više virtuelnih radnih površina
Comment[sv]=Kraftfull fönsterhanterare med flera virtuella skrivbord som följer ICCCM
Comment[ta]=ICCCM-ி ி
Comment[tr]=Güçlü ICCCM-uyumlu çoklu sanal masaüstü yöneticisi
Comment[uk]=Потужний, сумісний з ICCCM менеджер вікон, з підтримкою віртуальних стільниць
Comment[vi]=Trình qun lý ca s ICCCM tương thích đa desktop o
Comment[xx]=xxA powerful ICCCM-compliant multiple virtual desktop window managerxx
Comment[zh_CN]= ICCCM
Comment[zh_TW]= ICCCM

175
fvwm2.spec Normal file
View File

@ -0,0 +1,175 @@
#
# spec file for package fvwm2
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: fvwm2
Version: 2.7.0
Release: 0
Summary: The F Virtual Window Manager
License: GPL-2.0-or-later
Group: System/GUI/Other
URL: http://www.fvwm.org
Source0: https://github.com/fvwmorg/fvwm/releases/download/%{version}/fvwm-%{version}.tar.gz
Source1: fvwm_icons.tar.bz2
Source3: %{name}.desktop
Source4: system.fvwm2rc
Source6: openSUSE.xpm
Patch0: fvwm-configure.patch
Patch1: fvwm-2.5.26-sv_SE.patch
Patch2: fvwm-no-date-time.patch
Patch3: fvwm-FvwmAuto-overflow.patch
Patch4: threadlocking.patch
# https://github.com/fvwmorg/fvwm/pull/100
Patch5: fvwm2-gcc14.patch
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libpng-devel
BuildRequires: libstroke-devel
BuildRequires: libxslt-tools
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: readline-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(fribidi)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xrender)
#not actually used but includes its headers anyway..
BuildRequires: pkgconfig(xt)
Requires: desktop-data
Requires: mktemp
Requires: wallpaper-branding
Requires: xdg-menu
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: fvwm
Provides: fvwmicns
Provides: windowmanager
Provides: xpmroot
Obsoletes: fvwm
Obsoletes: xpmroot
%description
FVWM is a virtual desktop window manager for the X Window System.
FVWM is intended to have a small memory footprint but a rich feature
set, to be extremely customizable and extendible, and to be very
compatible with the Motif Window Manager (mwm).
%prep
%setup -q -n fvwm-%{version}
%autopatch -p0
find . -name *sv_SE* -exec rename --verbose sv_SE sv '{}' \+
mkdir icons
tar -C icons -j -x -v -f $RPM_SOURCE_DIR/fvwm_icons.tar.bz2
cp %{SOURCE6} icons
%build
autoreconf -fvi
%configure \
--sysconfdir=%{_sysconfdir}/X11/fvwm2 \
--libexecdir=%{_prefix}/lib/X11/fvwm2 \
--with-imagepath=%{_datadir}/X11/fvwm2/pixmaps:%{_datadir}/X11/fvwm2/bitmaps:%{_datadir}/pixmaps:%{_datadir}/wallpapers
make %{?_smp_mflags}
%install
%make_install
# missed main manual page
install -m 644 doc/fvwm/fvwm.1 %{buildroot}%{_mandir}/man1
# default config
install -d -m 755 %{buildroot}%{_sysconfdir}/X11/fvwm2
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/X11/fvwm2/system.fvwm2rc
# documentation for modules
rm -vf sample.fvwmrc/Makefile* sample.fvwmrc/system.fvwm2rc-sample-95
rm -vf docs/Makefile*
install -d -m 755 docu-module
for i in $(find -name "README*" -not -name "*,v" -and -not -name "*.orig")
do
TMPDIR=$(dirname ${i#./})
if [ "x$TMPDIR" = "x." ]; then
install -m 644 $i docu-module/${i#./}
else
install -m 644 $i docu-module/README.$(basename "$TMPDIR")
fi
done
# forbidden links
pushd %{buildroot}/
find . -type l -printf '%%P %%l\n' | while read dst src
do
case "$src" in
%{buildroot}/*)
src=${src#%{buildroot}/}
rm -vf $dst
ln -frsv $src $dst
;;
*)
;;
esac
done
popd
# icons
install -d -m 755 %{buildroot}%{_datadir}/X11/fvwm2/pixmaps
install -m 644 icons/* %{buildroot}%{_datadir}/X11/fvwm2/pixmaps
# install kdm/gdm entry
install -m 0755 -d %{buildroot}%{_datadir}/xsessions/
install -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/xsessions/
# removing the useless README.vms file
rm -f %{buildroot}/%{_docdir}/fvwm2/README.vms
%suse_update_desktop_file %{buildroot}%{_datadir}/xsessions/%{name}.desktop
%find_lang fvwm %{name}.lang
%find_lang FvwmScript %{name}.lang
%post
%{_sbindir}/update-alternatives --install %{_datadir}/xsessions/default.desktop \
default-xsession.desktop %{_datadir}/xsessions/fvwm2.desktop 20
%postun
[ -f %{_datadir}/xsessions/lxqt.desktop ] || %{_sbindir}/update-alternatives \
--remove default-xsession.desktop %{_datadir}/xsessions/fvwm2.desktop
%files -f %{name}.lang
%license COPYING
%doc NEWS docs docu-module/*
%dir %{_sysconfdir}/X11/fvwm2
%config %{_sysconfdir}/X11/fvwm2/system.fvwm2rc
%{_bindir}/*
%{_prefix}/lib/X11/fvwm2/*
%{_datadir}/X11/fvwm2/pixmaps/*
%dir %{_prefix}/lib/X11/fvwm2
%{_datadir}/fvwm
%dir %{_datadir}/X11/fvwm2
%dir %{_datadir}/X11/fvwm2/pixmaps
%{_mandir}/man1/*
%{_datadir}/xsessions/*desktop
%changelog

3
fvwm_icons.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:741c1100478177d1989203cb04ff1332e8280789d5c76b42d945b8b9d040fa64
size 329871

39
openSUSE.xpm Normal file
View File

@ -0,0 +1,39 @@
/* XPM */
static char * openSUSE1_xpm[] = {
"51 34 2 1",
" c None",
". c #084404",
" ",
" ",
" ",
" ",
" ",
" ",
" ........ ",
" ................. .... ",
" .............................. ",
" ............................ . ",
" ............................. ..... ",
" ............................... . . . ",
" ................................ ... . ",
" .............................. ... ... ",
" ............................... ...... ",
" .................................. ",
" ..... ................................ ",
" .... ............................ ",
" .... ..... ................. ",
" ... ....... ..... ..... ",
" ... .. ... ... .... ",
" ... .. .. ... .... ",
" ... .... .. ... ... ",
" ... ... .. . . ",
" .... ... ",
" .......... ",
" ........ ",
" ... ",
" ",
" ",
" ",
" ",
" ",
" "};

460
system.fvwm2rc Normal file
View File

@ -0,0 +1,460 @@
## Major cleanup.
##
## Thomas Adam <thomas.adam22@gmail.com>
# window buttons
#
#Large up Triangle for Maximize
## The least we can do here is define a decor.
DestroyDecor DefaultDecor
AddToDecor DefaultDecor
+ ButtonStyle 2 4 50x24@1 75x74@0 25x74@0 50x24@1
+ ButtonStyle 4 4 50x74@1 75x24@0 25x24@1 50x74@1
+ ButtonStyle 3 13 20x60@1 20x40@1 40x40@1 40x20@1 60x20@1 60x40@0 80x40@1 80x60@0 60x60@0 60x80@0 40x80@0 40x60@1 20x60@0
+ BorderStyle Inactive -- HiddenHandles NoInset
#general configuration
DeskTopSize 3x2
EdgeResistance 250 10
EdgeScroll 0 0
ClickTime 750
ColormapFocus FollowsMouse
IgnoreModifiers L2
## Having this set to unlimited ensures potential users aren't confused due
## to the XGrabServer() call when having to draw the rubber-band which would
## have happened had OpaqueMoveSize been set to the default.
OpaqueMoveSize -1
#paths specific to fvwm2
#
## The difference between X.org 6.x and 7.x
## If you switch to X.org version 6.9 or below change the paths for ImagePath
## /usr/lib/X11/fvwm2 -> /usr/X11R6/lib...
## /usr/share/X11/fvwm2/pixmaps -> /usr/X11R6/lib/X11/fvwm2/pixmaps
### No, redefining ModulePath is the wrong thing to do.
##ModulePath /usr/lib/X11/fvwm2
## Adding $[FVWM_USERDIR] here doesn't hurt, and neither does prepending the
## *internal* ImagePath.
ImagePath /usr/share/X11/fvwm2/pixmaps:/usr/share/wallpapers:$[FVWM_USERDIR]:+
#colors
# 0 = Default colors
# 1 = Inactive windows
# 2 = Active windows
# 3 = Inactive menu entry and menu background
# 4 = Active menu entry
# 5 = greyed out menu entry (only bg used)
# 6 = module foreground and background)
# 7 = hilight colors
Colorset 0 fg black, bg rgb:6f/a1/dc
Colorset 1 fg black, bg rgb:a1/b2/c8
Colorset 2 fg black, bg rgb:70/a2/dd
Colorset 3 fg black, bg rgb:c8/d3/e5
Colorset 4 fg black, bg rgb:91/ae/d6
Colorset 5 fg rgb:d2/bf/a8, bg rgb:b4/aa/94
Colorset 6 fg black, bg rgb:b4/aa/94
Colorset 7 fg black, bg rgb:94/ab/bf
# run FvwmTheme before anything else is done
##ModuleSynchronous Timeout 5 FvwmTheme
#
# general setup
#
Style * Colorset 1
Style * HilightColorset 2
MenuStyle * MenuColorset 3
MenuStyle * ActiveColorset 4
MenuStyle * GreyedColorset 5
XORvalue 255
#fonts
DefaultFont "StringEncoding=UTF-8:xft:sans-serif:encoding=iso10646-1:size=10;-misc-*-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1"
IconFont "StringEncoding=UTF-8:xft:sans-serif:encoding=iso10646-1:size=8;-misc-fixed-medium-r-normal-*-10-*-*-*-*-*-iso10646-1"
#fvwm system functions
AddToFunc QuitSave
+ "I" Quit
AddToFunc StartFunction
+ I Test (Init) Module FvwmBanner
+ I Test (Init) Exec exec xterm -ls -geometry +150+85
+ I Module FvwmButtons
AddToFunc ExitFunction
+ I Exec xsetroot
+ I Exec xsetroot
#fvwm window modifier functions
AddToFunc MoveOrRaise
+ C Raise
+ M Raise
+ M Move
+ D Lower
AddToFunc ResizeOrRaise
+ C Raise
+ M Raise
+ M Resize
+ D Lower
AddToFunc MaximizeFunc
+ M Maximize 0 100
+ C Maximize 0 80
+ D Maximize 100 100
## all.
AddToFunc MoveOrIconify
+ I Raise
+ M Move
+ D Iconify
#buttonbar menu
AddToMenu bargraphicspopup "Graphics" Title
+ "Gimp" Exec exec gimp
+ "Inkscape" Exec exec inkscape
+ "XV" Exec exec xv
AddToMenu bartoolspopup "Tools" Title
+ "Firefox" Exec exec firefox
+ "OpenOffice" Exec exec soffice
AddToMenu barshellspopup "Shell in XTerm" Title
+ "Shell in XTerm" Exec exec xterm -ls
+ "Root shell" Exec exec xterm -ls -vb -sb -sl 2000 -T Root -n Root -j -rw +vb -bg \#ff8c6d -e su -
AddToMenu barsusepopup "openSUSE" Title
+ "Control Center" Exec exec xterm -e su - -cyast2
+ "Help" Exec exec susehelp
+ "openSUSE menu" Popup xdg_menu
## Adding Pick here ensures we always ensure a window context.
AddToMenu windowops "Window menu (Shift-Alt-Space)" Title
+ "Mo&ve (Alt-F5) " Pick Move
+ "Resi&ze (Alt-F6) " Pick Resize
+ "&Iconify (Alt-F4) " Pick Iconify
+ "&Maximize/Normal (Shift-Alt-F3) " Pick Maximize
+ "(Un)St&ick (Shift-Alt-F4) " Pick Stick
+ "" Nop
+ "Window &list (Alt-F11) " WindowList
+ "" Nop
+ "&Close (Alt-F9) " Pick Delete
+ "&Kill (Alt-F11) " Pick Destroy
#Menu: Fvwm-Manpages
AddToMenu manpages_popup "Fvwm-Manpages" Title
+ "FvwmEvent" Exec exec xterm -e man FvwmEvent
+ "FvwmAuto" Exec exec xterm -e man FvwmAuto
+ "FvwmBacker" Exec exec xterm -e man FvwmBacker
+ "FvwmBanner" Exec exec xterm -e man FvwmBanner
+ "FvwmButtons" Exec exec xterm -e man FvwmButtons
## + "FvwmCascade" Exec exec xterm -e man FvwmCascade
+ "FvwmCommand" Exec exec xterm -e man FvwmCommand
+ "FvwmConfig" Exec exec xterm -e man fvwm-config
+ "FvwmConsole" Exec exec xterm -e man FvwmConsole
+ "FvwmConsoleC" Exec exec xterm -e man FvwmConsoleC
+ "FvwmCpp" Exec exec xterm -e man FvwmCpp
+ "FvwmDebug" Exec exec xterm -e man FvwmDebug
+ "FvwmForm" Exec exec xterm -e man FvwmForm
## + "FvwmGoodStuff" Exec exec xterm -e man FvwmGoodStuff
+ "FvwmIconBox" Exec exec xterm -e man FvwmIconBox
+ "FvwmIconMan" Exec exec xterm -e man FvwmIconMan
+ "FvwmIdent" Exec exec xterm -e man FvwmIdent
+ "FvwmM4" Exec exec xterm -e man FvwmM4
+ "FvwmPager" Exec exec xterm -e man FvwmPager
+ "FvwmSave" Exec exec xterm -e man FvwmSave
+ "FvwmSaveDesk" Exec exec xterm -e man FvwmSaveDesk
+ "FvwmScript" Exec exec xterm -e man FvwmScript
+ "FvwmScroll" Exec exec xterm -e man FvwmScroll
## + "FvwmTalk" Exec exec xterm -e man FvwmTalk
+ "FvwmTaskBar" Exec exec xterm -e man FvwmTaskBar
+ "FvwmTile" Exec exec xterm -e man FvwmTile
+ "FvwmWharf" Exec exec xterm -e man FvwmWharf
+ "FvwmWinList" Exec exec xterm -e man FvwmWinList
#Menu: Modules
AddToMenu modules_popup "Modules" Title
+ "Event" Module FvwmEvent
+ "Autoraise off" KillModule FvwmAuto
+ "Autoraise 500ms" Module FvwmAuto 500
+ "Banner" Module FvwmBanner
+ "Buttons" Module FvwmButtons
+ "Cascade" Module FvwmCascade
+ "Command" Module FvwmCommandS
##+ "Config" Module FvwmConfig
+ "Console" Module FvwmConsole
+ "Debug" Module FvwmDebug
+ "Form" Module FvwmForm
## + "GoodStuff" Module FvwmGoodStuff
+ "IconBox" Module FvwmIconBox
+ "IconMan" Module FvwmIconMan
+ "Ident" Module FvwmIdent
+ "M4" Module FvwmM4
+ "Pager" Module FvwmPager 0 0
## + "Pipe" Module FvwmPipe
+ "Save" Module FvwmSave
## + "SaveDesk" Module FvwmSaveDesk
+ "Script" Module FvwmScript
+ "Scroll" Module FvwmScroll
+ "Talk" Module FvwmTalk
+ "TaskBar" Module FvwmTaskBar
+ "Tile" Module FvwmTile
+ "Wharf" Module FvwmWharf
+ "WindowMenu" Module FvwmWindowMenu
+ "WinList" Module FvwmWinList
#Menu: WindowManager
AddToMenu THISWM_MENU_popup "WindowManager" Title
+ "Modules" Popup modules_popup
+ "Fvwm-Manpages" Popup manpages_popup
+ "" Nop
+ "Fvwm2-Manpage" Exec exec xterm -e man fvwm
+ "" Nop
+ "Restart Fvwm2" Restart
+ "" Nop
+ "Exit" Quit
#Menu: Keyboardclicks
AddToMenu settings_kbdclick_popup "Keyboardclicks" Title
+ "hard" Exec exec xset c 100
+ "Off" Exec exec xset c off
+ "soft" Exec exec xset c on
#Menu: Mouse
AddToMenu settings_mouse_popup "Mouse" Title
+ "fast" Exec exec xset m 4 2
+ "Left handed mouse" Exec exec xmodmap -e
+ "normal" Exec exec xset m 2 5
+ "slow" Exec exec xset m 1 1
#Menu: Speaker
AddToMenu settings_speaker_popup "Speaker" Title
+ "loud" Exec exec xset b 100 600 50
+ "normal" Exec exec xset b on
+ "loud and long" Exec exec xset b 100 600 300
+ "Off" Exec exec xset b off
#Menu: Screensaver
AddToMenu screen_popup "Screensaver" Title
+ "Blank" Exec exec xset s blank
+ "Off" Exec exec xset s off
+ "Pattern after 5 min" Exec exec xset s noblank s 300 300
+ "Immediately" Exec exec xset s activate
+ "Default" Exec exec xset s default
#Menu: Settings
AddToMenu settings_popup "Settings" Title
+ "Keyboardclicks" Popup settings_kbdclick_popup
+ "Mouse" Popup settings_mouse_popup
+ "Speaker" Popup settings_speaker_popup
+ "Screensaver" Popup screen_popup
#Menu: Work
PipeRead 'xdg_menu --charset UTF-8 --format fvwm2'
AddToMenu WORK_MENU_popup "Work Menu" Title
+ "xterm" Exec exec xterm
+ "Firefox" Exec exec firefox
+ "" Nop
+ "Top" Exec exec xterm -e top
+ "" Nop
+ "Settings" Popup settings_popup
+ "WindowManager" Popup THISWM_MENU_popup
+ "openSUSE" Popup xdg_menu
Style "FvwmPager" !Title, Sticky, WindowListSkip
*FvwmPager: Rows 1
*FvwmPager: Columns 1
*FvwmPager: Geometry -0+0
*FvwmPager: Fore Black
*FvwmPager: Back grey67
*FvwmPager: Hilight grey50
*FvwmPager: Font none
*FvwmPager: SmallFont "StringEncoding=UTF-8:xft:sans-serif:encoding=iso10646-1:size=6;-misc-fixed-medium-r-normal--7-*-*-*-*-*-iso10646-1"
AddToFunc barthiswmpopupfunc
+ "I" Popup THISWM_MENU_popup
AddToFunc barsusepopupfunc
+ "I" Popup barsusepopup
AddToFunc bargraphicspopupfunc
+ "I" Popup bargraphicspopup
AddToFunc bartoolspopupfunc
+ "I" Popup bartoolspopup
AddToFunc barshellspopupfunc
+ "I" Popup barshellspopup
*FvwmButtons: Font "StringEncoding=UTF-8:xft:sans-serif:encoding=iso10646-1:size=9;-*-*-medium-*-semicondensed-*-12-*-*-*-*-*-iso10646-1"
#*FvwmButtonsFore Black
*FvwmButtons: Back rgb:91/ae/d6
*FvwmButtons: Geometry +0+0
*FvwmButtons: Rows 1
*FvwmButtons: (2x1 Frame 0 Swallow(UseOld, Respawn, NoClose) "FvwmPager" "Module FvwmPager 0 0")
*FvwmButtons: (Swallow FvwmXeyes 'Exec xeyes -name "FvwmXeyes" -geometry +0+0 -bg grey67 &')
*FvwmButtons: (Swallow FvwmXclock 'Exec xclock -name "FvwmXclock" -geometry +0+0 -padding 1 -bg rgb:91/ae/d6 &')
*FvwmButtons:(Title "Fvwm2", Icon fvwm.xpm, Action (Mouse 0) Function barthiswmpopupfunc)
*FvwmButtons: (Title "openSUSE", Icon openSUSE.xpm, Action (Mouse 0) Function barsusepopupfunc)
*FvwmButtons: (Title "Graphics", Icon gimp.xpm, Action (Mouse 0) Function bargraphicspopupfunc)
*FvwmButtons (Title "Tools", Icon toolbox.xpm, Action (Mouse 0) Function bartoolspopupfunc)
*FvwmButtons (Title "Shells", Icon xterm.xpm, Action (Mouse 0) Function barshellspopupfunc)
#style options for modules and programs in fvwm2
##Style "*" BackColor Grey
##Style "*" ForeColor DimGrey
Style * UseDecor DefaultDecor
Style * SloppyFocus
Style * DecorateTransient
Style * IconBox +55 +85 +130 +480
Style * StickyIcon
Style * SmartPlacement, RandomPlacement, ActivePlacement
Style * NoPPosition
Style FvwmWinList !Title, WindowListSkip
Style FvwmButtons !Title, Sticky, WindowListSkip
Style FvwmBanner !Title, Sticky, StaysOnTop, WindowListSkip
Style IconManModule !Title, Sticky, !Handles, Icon toolbox.xpm
Style "xeyes" SmartPlacement, RandomPlacement
Style "xclock" SmartPlacement, RandomPlacement
# see bug n#51189
Style "AcroRead" SmartPlacement, RandomPlacement
# see bug n#51188
# Style "OpenOffice*" NoPPosition, RandomPlacement, EWMHIgnoreStrutHints, EWMHMaximizeIgnoreWorkingArea, EWMHPlacementIgnoreWorkingArea, IgnoreGravity
Module FvwmBacker
Colorset 10 Pixmap /usr/share/wallpapers/openSUSEdefault/contents/images/1600x1200.png
*FvwmBacker: Command (Desk *) Colorset 10
*FvwmIdent: Back MidnightBlue
*FvwmIdent: Fore Yellow
*FvwmIdent: Font "StringEncoding=UTF-8:xft:sans-serif:encoding=iso10646-1:size=10;-misc-fixed-medium-r-normal--13-*-*-*-*-*-iso10646-1"
*FvwmWinList: Back Grey
*FvwmWinList: Fore Black
*FvwmWinList: FocusBack Black
*FvwmWinList: FocusFore Grey
*FvwmWinList: IconBack LightGrey
*FvwmWinList: IconFore DimGrey
*FvwmWinList: Font "StringEncoding=UTF-8:xft:sans-serif:encoding=iso10646-1:size=11;-misc-fixed-medium-r-normal--15-*-*-*-*-*-iso10646-1"
*FvwmWinList: Action Click1 Iconify -1,Focus
*FvwmWinList: Action Click2 Iconify
*FvwmWinList: Action Click3 Module "FvwmIdent" FvwmIdent
*FvwmWinList: Geometry +0-1
*FvwmWinList: UseSkipList
*FvwmWinList: UseIconNames
# Key bindings
Key Left A SM Scroll -100 +0
Key Left A C CursorMove -1 0
Key Left A SC CursorMove -10 +0
Key Right A SM Scroll +100 +0
Key Right A C CursorMove +1 0
Key Right A SC CursorMove +10 +0
Key Up A SM Scroll +0 -100
Key Up A C CursorMove +0 -1
Key Up A SC CursorMove +0 -10
Key Down A SM Scroll +0 +100
Key Down A C CursorMove +0 +1
Key Down A SC CursorMove +0 +10
Key F1 A M Menu WORK_MENU_popup
Key F2 A M WindowList
Key F3 A M Menu xdg_menu
Key F4 A M Pick Iconify
Key F5 A M Pick Move
Key F6 A M Pick Resize
Key F7 A M Pick Raise
Key F8 A M Pick Lower
Key F9 A M Pick Delete
Key F10 A M Pick Destroy
Key F11 A M Prev (AcceptsFocus) focus
Key F12 A M Next (AcceptsFocus) focus
Key Tab A 4 Next (AcceptsFocus) focus
Key Tab A S4 Prev (AcceptsFocus) focus
Key F3 A SM Pick Maximize
Key F4 A SM Pick Stick
Key F5 A SM Pick RefreshWindow
Key BackSpace A SM Function QuitSave
#button bar popup menus
Key s A SM Function barsusepopupfunc
Key g A SM Function bargraphicpopupfunc
Key t A SM Function bartoolspopupfunc
Key l A SM Function barshellpopupfunc
Key m A SM Function MailFunc
Key F1 A SM Restart
# Mouse bindings
Mouse 1 R A Menu WORK_MENU_popup Nop
Mouse 2 R A Module FvwmWinList Transient
Mouse 3 R A Menu xdg_menu Nop
Mouse 2 FST A Menu windowops Nop
Mouse 1 1 A Menu windowops Delete
Mouse 2 1 A Menu windowops Destroy
Mouse 3 1 A Menu windowops Nop
Mouse 1 SF A Function "ResizeOrRaise"
Mouse 1 T A Function "MoveOrRaise"
Mouse 1 I A Iconify
Mouse 2 I A Iconify
Mouse 3 TSIF A RaiseLower
Mouse 1 2 A Maximize 0 100
Mouse 2 2 A Maximize 100 100
Mouse 3 2 A Maximize 100 0
Mouse 0 4 A Iconify
Mouse 1 3 A Stick

105
threadlocking.patch Normal file
View File

@ -0,0 +1,105 @@
From 58cc099368de9b0dd8bf5d2daa0f31d5c373f812 Mon Sep 17 00:00:00 2001
From: Thomas Adam <thomas@xteddy.org>
Date: Tue, 2 May 2023 16:53:10 +0100
Subject: [PATCH] debian bug 1034054: backport fvwm3 xthreadlock()
Backport this fix from fvwm3 to fvwm2:
https://github.com/fvwmorg/fvwm3/commit/5c17c83df4605d2d97999740cf180af983298896
XCheckIfEvent() holds the X display lock and the predicate
function it calls is not allowed to call any Xlib function that
would re-enter the lock.
libX11 1.8.1 enables X display locks unconditionnaly (it was only
enabled by XInitThreads() when called explicitely before) and
thus exposes the issue.
So don't process events in the FCheckPeekIfEvent() predicate, but
instead use a separate handler that is called for the returned event
out of the lock.
---
fvwm/events.c | 9 ++++++++-
libs/FEvent.c | 22 ++++++++++++++++++++++
libs/FEvent.h | 8 ++++++++
3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/fvwm/events.c b/fvwm/events.c
index a2d024068..7a3d06c3b 100644
--- fvwm/events.c
+++ fvwm/events.c
@@ -258,6 +258,12 @@ static int _pred_weed_accumulate_expose(
return 1;
}
+static int _pred_weed_is_expose(
+ Display *display, XEvent *event, XPointer arg)
+{
+ return (event->type == Expose);
+}
+
static int _pred_weed_handle_expose(
Display *display, XEvent *event, XPointer arg)
{
@@ -4542,7 +4548,8 @@ void handle_all_expose(void)
saved_event = fev_save_event();
FPending(dpy);
- FWeedIfEvents(dpy, _pred_weed_handle_expose, NULL);
+ FWeedAndHandleIfEvents(dpy, _pred_weed_is_expose,
+ _pred_weed_handle_expose, NULL);
fev_restore_event(saved_event);
return;
diff --git a/libs/FEvent.c b/libs/FEvent.c
index 24d019dd1..ec31728a9 100644
--- libs/FEvent.c
+++ libs/FEvent.c
@@ -532,6 +532,28 @@ int FWeedIfEvents(
return weed_args.count;
}
+int FWeedAndHandleIfEvents(
+ Display *display,
+ int (*weed_predicate) (Display *display, XEvent *event, XPointer arg),
+ int (*handler) (Display *display, XEvent *event, XPointer arg),
+ XPointer arg)
+{
+ _fev_weed_args weed_args;
+ XEvent e;
+
+ assert(fev_is_invalid_event_type_set);
+ memset(&weed_args, 0, sizeof(weed_args));
+ weed_args.weed_predicate = weed_predicate;
+ weed_args.arg = arg;
+ if (FCheckPeekIfEvent(display, &e, _fev_pred_weed_if,
+ (XPointer)&weed_args)) {
+ handler(display, &e, arg);
+ }
+ _fev_pred_weed_if_finish(&weed_args);
+
+ return weed_args.count;
+}
+
int FWeedIfWindowEvents(
Display *display, Window window,
int (*weed_predicate) (
diff --git a/libs/FEvent.h b/libs/FEvent.h
index 821aef51a..2622f4474 100644
--- libs/FEvent.h
+++ libs/FEvent.h
@@ -113,6 +113,14 @@ int FWeedIfEvents(
Display *display, XEvent *current_event, XPointer arg),
XPointer arg);
+/* Same as FWeedIfEvents but with a second callback out of XLockDisplay()
+ * to handle events in a lock-safe manner */
+int FWeedAndHandleIfEvents(
+ Display *display,
+ int (*weed_predicate) (Display *display, XEvent *event, XPointer arg),
+ int (*handler) (Display *display, XEvent *event, XPointer arg),
+ XPointer arg);
+
/* Same as FWeedIfEvents but weeds only events for the given window. The
* weed_predicate is only called for events with a matching window. */
int FWeedIfWindowEvents(