Compare commits

...

10 Commits

Author SHA1 Message Date
f41bc1ec9f fvwm 2.7.0-3.10 for Callisto Desktop 2025-05-08 23:23:36 -07:00
2151c0ddfb Callisto FVWM patches 2025-05-08 23:22:30 -07:00
Jaimos Skriletz
6a32c3188b Add patch to fix build with gcc-14. 2024-07-27 15:21:29 -06:00
Jaimos Skriletz
f7bd09ea19 Update obslete depends. 2024-07-27 15:21:29 -06:00
Jaimos Skriletz
f3f53e7ced Bump standards to 4.7.0. 2024-07-27 15:21:29 -06:00
Jaimos Skriletz
0a9da3c34d Update debian/copyright licesens. 2024-07-27 15:21:29 -06:00
Jaimos Skriletz
d4d1a7d8f6 Add patch to fix crashes with thread locking and libX11 1.8.1. 2023-05-02 16:54:21 -06:00
Jaimos Skriletz
7904018c2b Add header to spelling-error-fix.patch 2022-10-29 19:25:57 -06:00
somiaj
5eade3f250 Spelling error fix in man page. 2022-10-20 23:48:37 -06:00
somiaj
6fbbde9ac0 Update obsolete build-deps. 2022-10-20 23:33:33 -06:00
17 changed files with 958 additions and 28 deletions

25
debian/changelog vendored
View File

@ -1,7 +1,32 @@
fvwm (1:2.7.0-3.10) unstable; urgency=medium
* Callisto FVWM patches
-- Maia <maia@tsundoku.ne.jp> Thu, 08 May 2025 23:22:47 -0700
fvwm (1:2.7.0-3) unstable; urgency=medium
* Update standards to 4.7.0.
- Update comment for how x-window-manager priority is computed.
* Update debian/copyright to state correct licesens.
* Update obsolete depends.
* Add patch to fix build with gcc-14. Closes: #1074974
-- Jaimos Skriletz <jaimosskriletz@gmail.com> Thu, 25 Jul 2024 11:07:17 -0600
fvwm (1:2.7.0-2) unstable; urgency=medium
* Fix an issue with thread locking and libX11 1.8 that
causes fvwm to crash. Closes: #1034054
-- Jaimos Skriletz <jaimosskriletz@gmail.com> Tue, 02 May 2023 16:15:27 -0600
fvwm (1:2.7.0-1) unstable; urgency=low
* New upstream bugfix release.
* Remove debian/patches applied upstream.
* Update obsolete build depends.
* Fix spelling error found by lintian.
-- Jaimos Skriletz <jaimosskriletz@gmail.com> Thu, 20 Oct 2022 11:00:00 -0600

13
debian/control vendored
View File

@ -8,10 +8,10 @@ Build-Depends: debhelper (>= 13.0.0),
file,
fontconfig,
gettext,
libfontconfig1-dev | libfontconfig-dev,
libfreetype6-dev,
libfontconfig-dev,
libfreetype-dev,
libfribidi-dev (>= 0.10.7),
libncurses5-dev,
libncurses-dev,
libpng-dev,
libreadline-dev,
librplay3-dev,
@ -28,17 +28,18 @@ Build-Depends: debhelper (>= 13.0.0),
libxrandr-dev,
libxrender-dev,
libxt-dev,
pkg-config,
pkgconf,
sharutils,
xsltproc
Standards-Version: 4.6.1
Standards-Version: 4.7.0
Homepage: https://www.fvwm.org/
Vcs-Browser: https://github.com/somiaj/fvwm2-debian
Vcs-Git: https://github.com/somiaj/fvwm2-debian.git
Package: fvwm
Architecture: any
Depends: libperl4-corelibs-perl | perl (<< 5.12.3-7),
Depends: libperl4-corelibs-perl,
${perl:Depends},
${misc:Depends},
${shlibs:Depends}
Recommends: lxmenu-data | gnome-menus,

42
debian/copyright vendored
View File

@ -47,7 +47,7 @@ Copyright: 1988-2021 Fvwm-workers <fvwm-workers@fvwm.org>
Joey Shutup, Scott James Remnant, Dan Nicholson, Dave Gabmle,
sJSON contributors, Alan Richardson, Carsten Haitzler, Sir Boris,
The Open Group, Nicholas Marriott, Todd C. Miller, and others.
License: GPL-2
License: GPL-2+
Comment: Addditional copyright block from COPYING file.
Additional copyrights of the fvwm main module:
.
@ -77,6 +77,10 @@ Comment: Addditional copyright block from COPYING file.
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
Files: libs/ColorUtils.*
Copyright: 1995 Free Software Foundation, Inc.
License: LGPL-2+
Files: default-config/images/icons/*
Copyright: Google Material Design
License: Apache-2.0
@ -88,28 +92,12 @@ Files: debian/*
Copyright: 2000 Alexander Kotelnikov <sacha@debian.org>
2004-2007 Manoj Srivastava <srivasta@debian.org>
2012 Vincent W. Chen <vinmun@gmail.com>
2016-2022 Jaimos Skriletz <jaimosskriletz@gmail.com>
2016-2024 Jaimos Skriletz <jaimosskriletz@gmail.com>
License: GPL-2+
Comment:
This package was debianized by Alexander Kotelnikov <sacha@debian.org> on
Thu, 14 Dec 2000 14:30:25 +0300.
License: GPL-2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -127,6 +115,24 @@ License: GPL-2+
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
License: LGPL-2+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the comlete text of the GNU Library General Public License
version 2 can be found in "/usr/share/common-licenses/LGPL-2".
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

19
debian/patches/3001-focus_desktop.patch vendored Normal file
View File

@ -0,0 +1,19 @@
Description: Allow EWMH desktop windows to receive focus on mouseover
Upstream FVWM's HandleEnterNotify returns early when it encounters
an EWMH desktop window, preventing a focus change from taking place.
We remove this return instruction to allow processing to continue
as for other window types. This is necessary for strict MouseFocus
when running file managers that draw a desktop over the root window.
Origin: Callisto Desktop
Author: Maia <maia@tsundoku.ne.jp>
Last-Update: 2019-02-19
--- a/fvwm/events.c
+++ b/fvwm/events.c
@@ -2255,7 +2255,6 @@
BroadcastPacket(
MX_ENTER_WINDOW, 3, (long)Scr.Root, (long)NULL,
(long)NULL);
- return;
}
if (ewp->window == FW_W_FRAME(fw) ||
ewp->window == FW_W_ICON_TITLE(fw) ||

View File

@ -0,0 +1,22 @@
Description: Keep dialog windows on top
A trivial patch to the EWMH special cases that keeps dialog windows above others,
modeled after the way desktop windows are kept on the bottom. Implemented to resolve
issues with caja (née nautilus) dialogs spawning under other applications' windows,
probably a side effect of unanticipated MouseFocus.
Origin: Callisto Desktop
Author: Maia <maia@tsundoku.ne.jp>
Last-Update: 2019-02-19
--- a/fvwm/ewmh.c
+++ b/fvwm/ewmh.c
@@ -1412,6 +1412,11 @@
{
fw->ewmh_window_type = EWMH_WINDOW_TYPE_DIALOG_ID;
+ SSET_LAYER(*style, 6);
+ style->flags.use_layer = 1;
+ style->flag_mask.use_layer = 1;
+ style->change_mask.use_layer = 1;
+
return 0;
}

View File

@ -0,0 +1,53 @@
Description: Do not draw stippled lines on sticky windows
FVWM is hardcoded to draw a pattern of recessed lines on the titlebars of
sticky windows. Our decorations have a sticky button that indicates state with
MwmDecorStick instead.
Origin: Callisto Desktop
Author: Maia <maia@tsundoku.ne.jp>
Last-Update: 2019-02-19
--- a/fvwm/borders.c
+++ b/fvwm/borders.c
@@ -3751,7 +3751,6 @@
border_draw_title_deep(fw, td, &tdd, &fstr, *dest_pix, w);
}
border_draw_title_relief(fw, td, &tdd, *dest_pix);
- border_draw_title_stick_lines(fw, td, &tdd, *dest_pix);
return;
}
--- a/fvwm/icons.c
+++ b/fvwm/icons.c
@@ -1084,33 +1084,6 @@
ICON_HEIGHT(fw) - 1,
(fw->icon_title_relief > 0)? Relief:Shadow,
(fw->icon_title_relief > 0)? Shadow:Relief, relief);
- if (is_stippled)
- {
- /* an odd number of lines every 4 pixels */
- int pseudo_height = ICON_HEIGHT(fw)- 2*relief + 2;
- int num = (pseudo_height /
- ICON_TITLE_STICK_VERT_DIST / 2) * 2 - 1;
- int min = ICON_HEIGHT(fw) / 2 -
- num * 2 + 1;
- int max = ICON_HEIGHT(fw) / 2 +
- num * 2 - ICON_TITLE_STICK_VERT_DIST + 1;
- int i;
-
- for(i = min; w_stipple > 0 && i <= max;
- i += ICON_TITLE_STICK_VERT_DIST)
- {
- RelieveRectangle(
- dpy, FW_W_ICON_TITLE(fw), x_stipple,
- i, w_stipple - 1, 1, Shadow,
- Relief, ICON_TITLE_STICK_HEIGHT);
- RelieveRectangle(
- dpy, FW_W_ICON_TITLE(fw),
- w_title_w - x_stipple - w_stipple, i,
- w_stipple - 1, 1, Shadow, Relief,
- ICON_TITLE_STICK_HEIGHT);
- }
- }
-
return;
}

View File

@ -0,0 +1,25 @@
Description: Allow EnvIsSet tests to be performed on InfoStore variables
A patch from upstream for a minor oversight, not yet released.
Origin: https://github.com/fvwmorg/fvwm/commit/d950dabf4d815fb59babe2b40200f52b248a04c8
Author: Maia <maia@tsundoku.ne.jp>
Last-Update: 2019-02-19
--- a/fvwm/conditional.c
+++ b/fvwm/conditional.c
@@ -2101,8 +2101,15 @@
flags_ptr = GetNextSimpleOption(flags_ptr, &var_name);
if (var_name)
{
- const char *value = getenv(var_name);
-
+ const char *value;
+ if ( (strlen(var_name) > 10) && (memcmp(var_name,"infostore.",10) == 0) )
+ {
+ value = get_metainfo_value(var_name + 10);
+ }
+ else
+ {
+ value = getenv(var_name);
+ }
match = (value != NULL) ? 1 : 0;
}
else

View File

@ -0,0 +1,244 @@
Description: Add support for EWMH focused hint
Set the hint used by GTK+ 3 to draw widgets in unfocused windows
in the backdrop state. This patch is not very good, and it should
be reworked at some point to toggle the hint at a more appropriate
occasion. A side effect of this patch's sloppiness is that the hint
is not set when the cursor is in the titlebar, for example.
Source: Callisto Desktop
Author: Maia <maia@tsundoku.ne.jp>
Last-Update: 2020-08-18
--- a/fvwm/events.c
+++ b/fvwm/events.c
@@ -2291,6 +2291,7 @@
/* Event is for the frame...*/
SetFocusWindow(fw, True, FOCUS_SET_BY_ENTER);
}
+ SET_EWMH_FOCUSED(fw, True);
}
else if (focus_is_focused(fw) && focus_does_accept_input_focus(fw))
{
@@ -2819,6 +2820,11 @@
/* handle a subwindow cmap */
LeaveSubWindowColormap(te->xany.window);
}
+ if (fw != NULL && IS_EWMH_FOCUSED(fw))
+ {
+ SET_EWMH_FOCUSED(fw, False);
+ EWMH_SetWMState(fw, False);
+ }
if (fw != NULL &&
(lwp->window == FW_W_FRAME(fw) ||
lwp->window == FW_W_ICON_TITLE(fw) ||
--- a/fvwm/ewmh.c
+++ b/fvwm/ewmh.c
@@ -143,6 +143,9 @@
"_NET_WM_STATE_BELOW", XA_ATOM,
ewmh_WMStateStaysOnBottom),
ENTRY(
+ "_NET_WM_STATE_FOCUSED", XA_ATOM,
+ ewmh_WMStateFocused),
+ ENTRY(
"_NET_WM_STATE_FULLSCREEN", XA_ATOM,
ewmh_WMStateFullScreen),
ENTRY("_NET_WM_STATE_HIDDEN", XA_ATOM, ewmh_WMStateHidden),
@@ -621,6 +624,7 @@
void EWMH_SetWMState(FvwmWindow *fw, Bool do_restore)
{
+ DBUG("EWMH_SetWMState", "Routine Entered");
Atom wm_state[EWMH_NUMBER_OF_STATE];
int i = 0;
ewmh_atom *list = ewmh_atom_wm_state;
@@ -634,18 +638,9 @@
list++;
}
- if (i > 0)
- {
- ewmh_ChangeProperty(
- FW_W(fw), "_NET_WM_STATE", EWMH_ATOM_LIST_CLIENT_WIN,
- (unsigned char *)wm_state, i);
- }
- else
- {
- ewmh_DeleteProperty(
- FW_W(fw), "_NET_WM_STATE",
- EWMH_ATOM_LIST_CLIENT_WIN);
- }
+ ewmh_ChangeProperty(
+ FW_W(fw), "_NET_WM_STATE", EWMH_ATOM_LIST_CLIENT_WIN,
+ (unsigned char *)wm_state, i);
return;
}
--- a/fvwm/ewmh_events.c
+++ b/fvwm/ewmh_events.c
@@ -564,6 +564,16 @@
return 0;
}
+int ewmh_WMStateFocused(
+ FvwmWindow *fw, XEvent *ev, window_style *style, unsigned long any)
+{
+ if (ev == NULL && style == NULL)
+ {
+ return (IS_EWMH_FOCUSED(fw));
+ }
+ /* Read only value for clients. We do not set it here */
+}
+
int ewmh_WMStateFullScreen(
FvwmWindow *fw, XEvent *ev, window_style *style, unsigned long any)
{
--- a/fvwm/ewmh_intern.h
+++ b/fvwm/ewmh_intern.h
@@ -138,6 +138,8 @@
int ewmh_WMState(
FvwmWindow *fw, XEvent *ev, window_style *style, unsigned long any);
+int ewmh_WMStateFocused(
+ FvwmWindow *fw, XEvent *ev, window_style *style, unsigned long any);
int ewmh_WMStateFullScreen(
FvwmWindow *fw, XEvent *ev, window_style *style, unsigned long any);
int ewmh_WMStateHidden(
--- a/fvwm/focus.c
+++ b/fvwm/focus.c
@@ -963,6 +963,15 @@
}
set_focus_to_fwin(FW_W(fw), fw, &sf_args);
+ DBUG("SetFocusWindow", "_NET_WM_STATE_FOCUSED");
+ /* Set _NET_WM_STATE_FOCUSED for window to receive focus */
+ /* Not for icons because they would keep it when being deiconified */
+ if (!IS_ICONIFIED(fw))
+ {
+ SET_EWMH_FOCUSED(fw, True);
+ EWMH_SetWMState(fw, False);
+ }
+
return;
}
@@ -985,6 +994,7 @@
void _DeleteFocus(Bool do_allow_force_broadcast)
{
sftfwin_args_t sf_args;
+ FvwmWindow *t;
memset(&sf_args, 0, sizeof(sf_args));
sf_args.do_allow_force_broadcast = !!do_allow_force_broadcast;
@@ -995,12 +1005,22 @@
sf_args.set_by = FOCUS_SET_FORCE;
set_focus_to_fwin(Scr.NoFocusWin, NULL, &sf_args);
+ for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
+ {
+ if (IS_EWMH_FOCUSED(t))
+ {
+ SET_EWMH_FOCUSED(t, False);
+ EWMH_SetWMState(t, False);
+ }
+ }
+
return;
}
void _ForceDeleteFocus(void)
{
sftfwin_args_t sf_args;
+ FvwmWindow *t;
memset(&sf_args, 0, sizeof(sf_args));
sf_args.do_allow_force_broadcast = 1;
@@ -1011,6 +1031,15 @@
sf_args.set_by = FOCUS_SET_FORCE;
set_focus_to_fwin(Scr.NoFocusWin, NULL, &sf_args);
+ for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
+ {
+ if (IS_EWMH_FOCUSED(t))
+ {
+ SET_EWMH_FOCUSED(t, False);
+ EWMH_SetWMState(t, False);
+ }
+ }
+
return;
}
--- a/fvwm/fvwm.h
+++ b/fvwm/fvwm.h
@@ -382,10 +382,12 @@
/* the ewmh icon is used as icon pixmap */
unsigned use_ewmh_icon : 1;
unsigned is_ewmh_modal : 1;
+ unsigned is_ewmh_focused : 1;
unsigned is_ewmh_fullscreen : 1;
#define EWMH_STATE_UNDEFINED_HINT 0
#define EWMH_STATE_NO_HINT 1
#define EWMH_STATE_HAS_HINT 2
+ unsigned has_ewmh_init_focused_state : 2;
unsigned has_ewmh_init_fullscreen_state : 2;
unsigned has_ewmh_init_hidden_state : 2;
unsigned has_ewmh_init_maxhoriz_state : 2;
--- a/fvwm/icons.c
+++ b/fvwm/icons.c
@@ -2512,6 +2512,15 @@
SET_ICONIFIED(t, 1);
SET_ICON_UNMAPPED(t, 1);
SET_ICONIFIED_BY_PARENT(t, 1);
+
+ /* Remove _NET_WM_STATE_FOCUSED atom if present */
+ DBUG("Iconify", "unfocus t");
+ if (IS_EWMH_FOCUSED(t))
+ {
+ SET_EWMH_FOCUSED(t, False);
+ EWMH_SetWMState(t, False);
+ }
+
get_icon_geometry(t, &g);
BroadcastPacket(
M_ICONIFY, 7, (long)FW_W(t),
@@ -2575,6 +2584,15 @@
}
SET_ICONIFIED(fw, 1);
SET_ICON_UNMAPPED(fw, 0);
+
+ /* Remove _NET_WM_STATE_FOCUSED atom if present */
+ if (IS_EWMH_FOCUSED(fw))
+ {
+ DBUG("Iconify", "unfocus fw");
+ SET_EWMH_FOCUSED(fw, False);
+ EWMH_SetWMState(fw, False);
+ }
+
get_icon_geometry(fw, &icon_rect);
/* if this fails it does not overwrite icon_rect */
EWMH_GetIconGeometry(fw, &icon_rect);
--- a/fvwm/window_flags.h
+++ b/fvwm/window_flags.h
@@ -680,12 +680,24 @@
(fw)->flags.is_ewmh_modal = !!(x)
#define SETM_EWMH_MODAL(fw,x) \
(fw)->flag_mask.is_ewmh_modal = !!(x)
+#define IS_EWMH_FOCUSED(fw) \
+ ((fw)->flags.is_ewmh_focused)
+#define SET_EWMH_FOCUSED(fw,x) \
+ (fw)->flags.is_ewmh_focused = !!(x)
+#define SETM_EWMH_FOCUSED(fw,x) \
+ (fw)->flag_mask.is_ewmh_focused = !!(x)
#define IS_EWMH_FULLSCREEN(fw) \
((fw)->flags.is_ewmh_fullscreen)
#define SET_EWMH_FULLSCREEN(fw,x) \
(fw)->flags.is_ewmh_fullscreen = !!(x)
#define SETM_EWMH_FULLSCREEN(fw,x) \
(fw)->flag_mask.is_ewmh_fullscreen = !!(x)
+#define SET_HAS_EWMH_INIT_FOCUSED_STATE(fw,x) \
+ (fw)->flags.has_ewmh_init_focused_state = (x)
+#define SETM_HAS_EWMH_INIT_FOCUSED_STATE(fw,x) \
+ (fw)->flag_mask.has_ewmh_init_focused_state = (x)
+#define HAS_EWMH_INIT_FOCUSED_STATE(fw) \
+ ((fw)->flags.has_ewmh_init_focused_state)
#define SET_HAS_EWMH_INIT_FULLSCREEN_STATE(fw,x) \
(fw)->flags.has_ewmh_init_fullscreen_state = (x)
#define SETM_HAS_EWMH_INIT_FULLSCREEN_STATE(fw,x) \

View File

@ -0,0 +1,18 @@
Description: Reduce geometry window relief
FVWM has a harccoded relief of 2 pixels for the geometry window.
Our style uses a relief of 1 pixel across the board, so the
geometry window should match.
Origin: Callisto Desktop
Author: Maia <maia@tsundoku.ne.jp>
Last-Update: 2019-02-19
--- a/libs/defaults.h
+++ b/libs/defaults.h
@@ -153,7 +153,7 @@
#define BROKEN_MINSIZE_LIMIT 30000
/* geometry window */
-#define GEOMETRY_WINDOW_BW 2 /* pixels */
+#define GEOMETRY_WINDOW_BW 1 /* pixel */
#define GEOMETRY_WINDOW_STRING " +8888 x +8888 "
#define GEOMETRY_WINDOW_POS_STRING " %+-4d %+-4d "
#define GEOMETRY_WINDOW_SIZE_STRING " %4d x %-4d "

View File

@ -0,0 +1,208 @@
Description: Adjust hardcoded menu style to match Callisto GTK theme
Some aspects of menu drawing that are needed in order to match
Callisto themes are not exposed through the configuration interface.
Origin: Callisto Desktop
Author: Maia <maia@tsundoku.ne.jp>
Last-Update: 2019-02-19
--- a/fvwm/menuitem.c
+++ b/fvwm/menuitem.c
@@ -81,10 +81,11 @@
*
*/
static void draw_separator(
- Window w, GC TopGC, GC BottomGC, int x1, int y, int x2)
+ Window w, GC TopGC, GC LineGC, GC BottomGC, int x1, int y, int x2)
{
- XDrawLine(dpy, w, TopGC , x1, y, x2, y);
- XDrawLine(dpy, w, BottomGC, x1-1, y+1, x2+1, y+1);
+ XDrawLine(dpy, w, TopGC , x1 + 1, y - 1, x2, y - 1);
+ XDrawLine(dpy, w, LineGC , x1, y, x2, y);
+ XDrawLine(dpy, w, BottomGC , x1, y + 1, x2 - 1, y + 1);
return;
}
@@ -373,6 +374,7 @@
int lit_x_start;
int lit_x_end;
gc_quad_t gcs;
+ gc_quad_t active_gcs;
gc_quad_t off_gcs;
int cs = -1;
int off_cs;
@@ -464,6 +466,8 @@
{
gcs = ST_MENU_INACTIVE_GCS(ms);
off_gcs = ST_MENU_INACTIVE_GCS(ms);
+ active_gcs = ST_MENU_ACTIVE_GCS(ms);
+
}
if (is_item_selected)
{
@@ -542,8 +546,8 @@
}
else if (MI_IS_TITLE(mi))
{
- lit_x_start = MDIM_ITEM_X_OFFSET(*dim);
- lit_x_end = lit_x_start + MDIM_ITEM_WIDTH(*dim);
+ lit_x_start = MDIM_HILIGHT_X_OFFSET(*dim);
+ lit_x_end = lit_x_start + MDIM_HILIGHT_WIDTH(*dim);
/* Hilight the background. */
if (
MDIM_HILIGHT_WIDTH(*dim) > 0 &&
@@ -551,9 +555,9 @@
{
draw_highlight_background(
mpip, lit_x_start,
- y_offset + relief_thickness,
+ y_offset,
lit_x_end - lit_x_start,
- y_height - relief_thickness,
+ y_height,
(cs >= 0 ? &Colorset[cs] : NULL),
gcs.back_gc);
item_cleared = True;
@@ -601,9 +605,8 @@
/* Calculate the separator offsets. */
if (ST_HAS_LONG_SEPARATORS(ms))
{
- sx1 = MDIM_ITEM_X_OFFSET(*dim) + relief_thickness;
- sx2 = MDIM_ITEM_X_OFFSET(*dim) + MDIM_ITEM_WIDTH(*dim) - 1 -
- relief_thickness;
+ sx1 = MDIM_ITEM_X_OFFSET(*dim) - relief_thickness;
+ sx2 = MDIM_ITEM_X_OFFSET(*dim) + MDIM_ITEM_WIDTH(*dim);
}
else
{
@@ -618,8 +621,8 @@
{
/* It's a separator. */
draw_separator(
- mpip->w, gcs.shadow_gc, gcs.hilight_gc, sx1,
- y_offset + y_height - MENU_SEPARATOR_HEIGHT,
+ mpip->w, gcs.shadow_gc, active_gcs.hilight_gc, gcs.hilight_gc, sx1,
+ (y_offset + y_height - MENU_SEPARATOR_HEIGHT) + 2,
sx2);
/* Nothing else to do. */
}
@@ -660,7 +663,7 @@
if (sx1 < sx2)
{
draw_separator(
- mpip->w, gcs.shadow_gc, gcs.hilight_gc,
+ mpip->w, gcs.shadow_gc, active_gcs.hilight_gc, gcs.hilight_gc,
sx1, y, sx2);
}
}
@@ -674,7 +677,7 @@
{
y = y_offset + y_height - MENU_SEPARATOR_HEIGHT;
draw_separator(
- mpip->w, gcs.shadow_gc, gcs.hilight_gc,
+ mpip->w, gcs.shadow_gc, active_gcs.hilight_gc, gcs.hilight_gc,
sx1, y, sx2);
}
break;
--- a/fvwm/menus.c
+++ b/fvwm/menus.c
@@ -1151,6 +1151,7 @@
int left_objects = 0;
int right_objects = 0;
int x;
+ int xsub;
unsigned char icons_placed = 0;
Bool sidepic_placed = False;
Bool triangle_placed = False;
@@ -1265,6 +1266,7 @@
if (*format == 'r')
{
right_objects++;
+ xsub = x;
}
else
{
@@ -1368,13 +1370,11 @@
triangle_placed = True;
if (msp->max.i.triangle_width > 0)
{
- x += gap_left;
+ x = xsub;
MR_TRIANGLE_X_OFFSET(
- msp->menu) = x;
+ msp->menu) = xsub - msp->max.i.triangle_width + 1;
MR_IS_LEFT_TRIANGLE(msp->menu) =
(*format == '<');
- x += msp->max.i.triangle_width +
- gap_right;
item_order[used_objects++] =
&(MR_TRIANGLE_X_OFFSET(
msp->menu));
@@ -1797,7 +1797,7 @@
/* don't propagate sidepic, sidecolor, popup and
* popdown actions */
/* And add the entry pointing to the new menu */
- gt_name = gettext("More&...");
+ gt_name = gettext("継続...");
name = safestrdup(gt_name);
AddToMenu(
msp->menu, name, tempname,
@@ -2706,10 +2706,15 @@
* redrawing several menu items. */
RelieveRectangle(
dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1,
- MR_HEIGHT(mr) - 1, (Pdepth < 2) ?
+ MR_HEIGHT(mr) - 1,
+ HILIGHT_GC(MST_MENU_ACTIVE_GCS(mr)),
+ HILIGHT_GC(MST_MENU_ACTIVE_GCS(mr)), bw);
+ RelieveRectangle(
+ dpy, MR_WINDOW(mr), 1, 1, MR_WIDTH(mr) - 3,
+ MR_HEIGHT(mr) - 3, (Pdepth < 2) ?
SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) :
HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)),
- SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw);
+ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw - 1);
{
return;
}
@@ -2759,11 +2764,16 @@
}
} /* if (ms) */
/* draw the relief */
- RelieveRectangle(dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1,
- MR_HEIGHT(mr) - 1, (Pdepth < 2) ?
+ RelieveRectangle(
+ dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1,
+ MR_HEIGHT(mr) - 1,
+ HILIGHT_GC(MST_MENU_ACTIVE_GCS(mr)),
+ HILIGHT_GC(MST_MENU_ACTIVE_GCS(mr)), bw);
+ RelieveRectangle(dpy, MR_WINDOW(mr), 1, 1, MR_WIDTH(mr) - 3,
+ MR_HEIGHT(mr) - 3, (Pdepth < 2) ?
SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) :
HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)),
- SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw);
+ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw - 1);
/* paint the menu items */
for (mi = MR_FIRST_ITEM(mr); mi != NULL; mi = MI_NEXT_ITEM(mi))
{
--- a/libs/defaults.h
+++ b/libs/defaults.h
@@ -61,16 +61,16 @@
#define DEFAULT_MENU_ITEM_FORMAT "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|"
#define DEFAULT_LEFT_MENU_ITEM_FORMAT "%.1|%3.2<%5i%5l%5l%5r%5i%1|%s"
/* size of the submenu triangle. */
-#define MENU_TRIANGLE_WIDTH 5 /* pixels */
-#define MENU_TRIANGLE_HEIGHT 9 /* pixels */
+#define MENU_TRIANGLE_WIDTH 7 /* pixels */
+#define MENU_TRIANGLE_HEIGHT 11 /* pixels */
/* menu underline parameters */
#define MENU_UNDERLINE_THICKNESS 1 /* pixels */
#define MENU_UNDERLINE_GAP 1 /* pixels */
#define MENU_UNDERLINE_HEIGHT (MENU_UNDERLINE_THICKNESS + MENU_UNDERLINE_GAP)
/* menu separator parameters */
-#define MENU_SEPARATOR_SHORT_X_OFFSET 5 /* pixels */
+#define MENU_SEPARATOR_SHORT_X_OFFSET 2 /* pixels */
#define MENU_SEPARATOR_Y_OFFSET 2 /* pixels */
-#define MENU_SEPARATOR_HEIGHT 2 /* pixels */
+#define MENU_SEPARATOR_HEIGHT 5 /* pixels */
#define MENU_SEPARATOR_TOTAL_HEIGHT \
(MENU_SEPARATOR_HEIGHT + MENU_SEPARATOR_Y_OFFSET)
/* menu tear off bar parameters */

View File

@ -0,0 +1,150 @@
Description: Modify WindowList style and contents
We want to customize WindowList in ways that are not exposed
through the configuration interface. In addition to style tweaks,
we also add submenus for actions targeting all windows on a desk.
Author: Maia <maia@tsundoku.ne.jp>
Date: 2022-06-11
diff -urN a/fvwm/windowlist.c b/fvwm/windowlist.c
--- a/fvwm/windowlist.c 2018-05-26 04:35:26.000000000 -0700
+++ b/fvwm/windowlist.c 2022-06-11 16:30:47.168556240 -0700
@@ -87,24 +87,22 @@
if (desk_name != NULL)
{
- if (flags & NO_NUM_IN_DESK_TITLE)
+ if (flags & SHOW_ALLDESKS)
{
- sprintf(tlabel, "%s%s", desk_name,
- (is_top_title && (flags & SHOW_GEOMETRY)) ?
- _("\tGeometry") : "");
+ sprintf(tlabel, "%s%s", desk_name, _("\t %ops/every.png%"));
}
else
{
- sprintf(tlabel,"%d: %s%s", desk, desk_name,
- (is_top_title && (flags & SHOW_GEOMETRY)) ?
- _("\tGeometry") : "");
+ sprintf(tlabel, "%s%s", desk_name,
+ (is_top_title && (flags & SHOW_ICONIC)) ?
+ _("\t非表示%ops/hidden_group.png%") : _("\t %team.png%"));
}
}
else
{
sprintf(tlabel,_("Desk: %d%s"),desk,
- (is_top_title && (flags & SHOW_GEOMETRY)) ?
- _("\tGeometry") : "");
+ (is_top_title && (flags & SHOW_ICONIC)) ?
+ _("\t非表示%ops/hidden_group.png%") : _("\t %ops/every.png%"));
}
return tlabel;
@@ -199,6 +197,8 @@
FvwmWindow **windowList;
FvwmWindow **iconifiedList = NULL;
int numWindows;
+ int numIcons;
+ int numNormal;
int ii;
char tname[128];
char loc[64];
@@ -576,12 +576,14 @@
mr = NewMenuRoot(tlabel);
if (!(flags & NO_CURRENT_DESK_TITLE))
{
- AddToMenu(mr, tlabel, "TITLE", False, False, False);
+ AddToMenu(mr, tlabel, "TITLE", True, False, False);
empty_menu = False;
}
free(tlabel);
numWindows = 0;
+ numIcons = 0;
+ numNormal = 0;
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
{
numWindows++;
@@ -743,6 +745,20 @@
for (ii = 0; ii < numWindows; ii++)
{
t = windowList[ii];
+
+ /* count icons to determine whether to build contents into the icon operations menu */
+ if ((t->Desk == desk) && !(DO_SKIP_WINDOW_LIST(t)))
+ {
+ if (IS_ICONIFIED(t))
+ {
+ numIcons++;
+ }
+ else
+ {
+ numNormal++;
+ }
+ }
+
if (t->Desk != next_desk && !(flags & NO_DESK_SORT))
{
continue;
@@ -815,7 +831,7 @@
t->Desk, flags, False);
AddToMenu(
mr, tlabel, "TITLE",
- False, False, False);
+ True, False, False);
free(tlabel);
}
}
@@ -825,7 +841,7 @@
{
tlabel = get_desk_title(t->Desk, flags, False);
AddToMenu(
- mr, tlabel, "TITLE", False, False,
+ mr, tlabel, "TITLE", True, False,
False);
free(tlabel);
}
@@ -1036,11 +1052,43 @@
}
}
+ /* add the universal operations header or a "no windows" entry if appropriate */
+ if (!(flags & NO_CURRENT_DESK_TITLE))
+ {
+
+ if (flags & SHOW_ICONIC)
+ {
+ if (numIcons)
+ {
+ AddToMenu(mr, "", "Nop", False, False, False);
+ AddToMenu(mr, "すべてを送る%ops/send_hidden.png%", "Popup DeskSendHidden", True, False, False);
+ AddToMenu(mr, "すべてを表示%ops/every.png%", "DeiconifyEvery", True, False, False);
+ }
+ else
+ {
+ AddToMenu(mr, "非表示ウィンドウがありません", "Nop", False, False, False);
+ }
+ }
+ else
+ {
+ if (numNormal)
+ {
+ AddToMenu(mr, "", "Nop", False, False, False);
+ AddToMenu(mr, "すべてを送る%ops/send_all.png%", "Popup DeskSendVisible", True, False, False);
+ AddToMenu(mr, "すべてを隠す%ops/hide_all.png%", "IconifyEvery", True, False, False);
+ }
+ else
+ {
+ AddToMenu(mr, "ウィンドウがありません", "Nop", False, False, False);
+ }
+ }
+ }
+
if (empty_menu)
{
/* force current desk title */
tlabel = get_desk_title(desk, flags, True);
- AddToMenu(mr, tlabel, "TITLE", False, False, False);
+ AddToMenu(mr, tlabel, "TITLE", True, False, False);
free(tlabel);
}

View File

@ -0,0 +1,19 @@
Description: Raise the title position one pixel
With the upstream code and our specific setup of fonts and
titlebar settings, FVWM draws window title text slightly off
center. Subtract one pixel from the y coordinate for the draw
(counted downwards from the top of the titlebar) so that
titles are vertically centered.
Author: Maia <maia@tsundoku.ne.jp>
Date: 2022-05-30
diff -urN a/fvwm/borders.c b/fvwm/borders.c
--- a/fvwm/borders.c 2018-05-26 04:35:26.000000000 -0700
+++ b/fvwm/borders.c 2022-05-30 19:31:04.048007353 -0700
@@ -3610,6 +3610,7 @@
1);
}
}
+ tdd->fstr.y--;
FlocaleDrawString(dpy, fw->title_font, &tdd->fstr, 0);
return;

View File

@ -0,0 +1,29 @@
Description: Remove -Werror check which fails in gcc-14.
This fixes #1074974 by removing the unneeded check which fails
when building with gcc-14.
Author: Thomas Adam <thomas@fvwm.org>
Forwarded: https://github.com/fvwmorg/fvwm/pull/106
Debian-Bug: https://bugs.debian.org/1074974
Last-Update: 2024-07-25
diff --git a/configure.ac b/configure.ac
index 97ab9e7a1..a5452e152 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,17 +218,6 @@ fi
AC_ISC_POSIX
AC_MINIX
-# catch -Werror and similar options when running configure
-AC_TRY_COMPILE([#include <stdio.h>],
-[int i; static j; 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));
-], , AC_MSG_ERROR("
-configure is not able to compile programs with warnings. Please
-remove all offending options like -Werror from the CFLAGS and
-CPPFLAGS variables and run configure again."))
-
# check size of some types
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS"

12
debian/patches/series vendored
View File

@ -1,3 +1,15 @@
fix-TabCom.patch
xthread_fix.patch
fix-hardcoded-xterm.patch
default-config-fvwm2.patch
spelling-error-fix.patch
remove-Werror-check.patch
3001-focus_desktop.patch
3002-dialogs_on_top.patch
3003-disable_sticky_stipple.patch
3004-envisset_infostore.patch
3005-ewmh_focused_state.patch
3006-geometrywindow_relief.patch
3007-menustyle_callisto.patch
3008-windowlist_callisto.patch
3009-window_title_raise.patch

15
debian/patches/spelling-error-fix.patch vendored Normal file
View File

@ -0,0 +1,15 @@
Description: Fix spelling error caught by lintian.
Author: Jaimos Skriletz <jaimosskriletz@gmail.com>
Forwarded: not-needed
Last-Update: 2022-10-20
--- a/doc/commands/Maximize.xml
+++ b/doc/commands/Maximize.xml
@@ -58,7 +58,7 @@ dimension of the window is set to
If the value is smaller than 0 the size is subtracted from the
screen width, i.e. -25 is the same as 75. If
<replaceable>horizontal</replaceable>
-is "<fvwmopt cmd="Maximize" opt="grow"/>", it is maximized to curren
+is "<fvwmopt cmd="Maximize" opt="grow"/>", it is maximized to current
available space until
finding any obstacle. The vertical resizing is similar. If both
horizontal and vertical values are "grow", it expands vertically

84
debian/patches/xthread_fix.patch vendored Normal file
View File

@ -0,0 +1,84 @@
Description: Fix a crash due to changes in thread locks in libX11 1.8.1
Author: Matthieu Herrb <matthieu@herrb.eu>
Forwarded: not-needed
Debian-Bug: https://bugs.debian.org/1034054
Last-Update: 2023-05-02
diff --git a/fvwm/events.c b/fvwm/events.c
index a2d024068..7a3d06c3b 100644
--- a/fvwm/events.c
+++ b/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
--- a/libs/FEvent.c
+++ b/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
--- a/libs/FEvent.h
+++ b/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(

8
debian/postinst vendored
View File

@ -45,10 +45,10 @@ case "$1" in
--install /usr/bin/fvwm-perllib fvwm-perllib /usr/bin/fvwm2-perllib 200 \
--slave /usr/share/man/man1/fvwm-perllib.1.gz fvwm-perllib.1.gz \
/usr/share/man/man1/fvwm2-perllib.1.gz
# From debian-policy as of 2012-07-12, sec. 11.8.4.
# Priority: 20 + 20 (support Debian menu system) + 40 (complies with
# The Window Manager Specification Project) + 10 (defaults to
# permitting X session to be restarted with different window manager
# From debian-policy as of 2024-07-25, sec. 11.8.4.
# Priority: 40 + 40 (complies with The Window Manager
# Specification Project) + 10 (defaults to permitting X
# session to be restarted with different window manager
# without killing X server) = 90
update-alternatives \
--install /usr/bin/x-window-manager x-window-manager /usr/bin/fvwm2 90 \