Hmm, how many times... :-)
chuck_hines> Restoring has been on the TO-DO list. More than enough
chuck_hines> people have missed it to warrant that...
Here is a patch against 2.0.40, a sample implementation of TogglePage
based on the code of fvwm-1.24r.
- -
Makoto 'MAR_kun' MATSUSHITA
--- fvwm/builtins.c.orig Thu Dec 21 04:00:31 1995
+++ fvwm/builtins.c Sun Dec 24 15:33:56 1995
_at_@ -821,6 +821,18 @@
}
}
+void FixEdgeScroll(XEvent *eventp,Window w,FvwmWindow *tmp_win,
+ unsigned long context, char *action,int* Module)
+{
+ if(Scr.FixEdgeScroll)
+ Scr.FixEdgeScroll = 0;
+ else
+ Scr.FixEdgeScroll = 1;
+
+ Broadcast(M_TOGGLE_PAGING,1,Scr.FixEdgeScroll,0,0,0,0,0,0);
+ checkPanFrames();
+}
+
void SetEdgeScroll(XEvent *eventp,Window w,FvwmWindow *tmp_win,
unsigned long context, char *action,int* Module)
{
--- fvwm/functions.c.orig Thu Dec 21 01:08:35 1995
+++ fvwm/functions.c Sun Dec 24 15:35:08 1995
_at_@ -95,6 +95,7 @@
{"Style", ProcessNewStyle, F_STYLE, FUNC_NO_WINDOW},
{"Title", Nop_func, F_TITLE, FUNC_TITLE},
{"Titlestyle", SetTitleStyle, F_TITLESTYLE, FUNC_NO_WINDOW},
+ {"TogglePage", FixEdgeScroll, F_TOGGLE_PAGE, FUNC_NO_WINDOW},
{"Wait", wait_func, F_WAIT, FUNC_NO_WINDOW},
{"WindowFont", LoadWindowFont, F_WINDOWFONT, FUNC_NO_WINDOW},
{"WindowList", do_windowList, F_WINDOWLIST, FUNC_NO_WINDOW},
--- fvwm/fvwm.c.orig Thu Dec 21 01:49:25 1995
+++ fvwm/fvwm.c Sun Dec 24 15:33:57 1995
_at_@ -719,6 +719,7 @@
}
Scr.EdgeScrollX = Scr.EdgeScrollY = 100;
+ Scr.FixEdgeScroll = 0;
Scr.ScrollResistance = Scr.MoveResistance = 0;
Scr.OpaqueSize = 5;
Scr.ClickTime = 150;
--- fvwm/misc.h.orig Thu Dec 21 03:26:44 1995
+++ fvwm/misc.h Sun Dec 24 15:33:57 1995
_at_@ -301,6 +301,8 @@
void SetBox(char *text, FILE *fd, char **arg,int *);
void set_func(char *, FILE *, char **,int *);
void copy_config(FILE **config_fd);
+void FixEdgeScroll(XEvent *eventp,Window w,FvwmWindow *tmp_win,
+ unsigned long context, char *action,int *Module);
void SetEdgeScroll(XEvent *eventp,Window w,FvwmWindow *tmp_win,
unsigned long context, char *action,int *Module);
void SetEdgeResistance(XEvent *eventp,Window w,FvwmWindow *tmp_win,
--- fvwm/module.c.orig Tue Nov 7 01:54:50 1995
+++ fvwm/module.c Sun Dec 24 15:33:57 1995
_at_@ -729,6 +729,7 @@
Scr.Hilite->frame,(unsigned long)Scr.Hilite,
Scr.HiColors.fore,Scr.HiColors.back,0,0);
}
+ SendPacket(*Module,M_TOGGLE_PAGING,1,Scr.FixEdgeScroll,0,0,0,0,0,0);
SendPacket(*Module,M_END_WINDOWLIST,0,0,0,0,0,0,0,0);
}
}
--- fvwm/module.h.orig Thu Apr 20 03:21:18 1995
+++ fvwm/module.h Sun Dec 24 15:33:57 1995
_at_@ -38,7 +38,8 @@
#define M_END_CONFIG_INFO (1<<19)
#define M_ICON_FILE (1<<20)
#define M_DEFAULTICON (1<<21)
-#define MAX_MESSAGES 22
+#define M_TOGGLE_PAGING (1<<22)
+#define MAX_MESSAGES 23
#define MAX_MASK ((1<<MAX_MESSAGES)-1)
#define HEADER_SIZE 4
--- fvwm/screen.h.orig Thu Dec 21 03:21:09 1995
+++ fvwm/screen.h Sun Dec 24 15:33:57 1995
_at_@ -163,6 +163,7 @@
int EntryHeight; /* menu entry height */
int EdgeScrollX; /* #pixels to scroll on screen edge */
int EdgeScrollY; /* #pixels to scroll on screen edge */
+ int FixEdgeScroll; /* fix EdgeScroll or not */
unsigned char buttons2grab; /* buttons to grab in click to focus mode */
unsigned long flags;
int NumBoxes;
--- fvwm/virtual.c.orig Tue Nov 7 01:55:25 1995
+++ fvwm/virtual.c Sun Dec 24 15:33:58 1995
_at_@ -26,6 +26,7 @@
*delta_x = 0;
*delta_y = 0;
+ if(!Scr.FixEdgeScroll) {
if((Scr.ScrollResistance >= 10000)||
((HorWarpSize ==0)&&(VertWarpSize==0)))
return;
_at_@ -166,6 +167,7 @@
if(Grab)
XUngrabServer(dpy);
}
+ }
}
_at_@ -196,21 +198,21 @@
/* Remove Pan frames if paging by edge-scroll is permanently or
* temporarily disabled */
- if(Scr.EdgeScrollY == 0)
+ if((Scr.EdgeScrollY == 0) || Scr.FixEdgeScroll)
{
XUnmapWindow(dpy,Scr.PanFrameTop.win);
Scr.PanFrameTop.isMapped=False;
XUnmapWindow (dpy,Scr.PanFrameBottom.win);
Scr.PanFrameBottom.isMapped=False;
}
- if(Scr.EdgeScrollX == 0)
+ if((Scr.EdgeScrollX == 0) || Scr.FixEdgeScroll)
{
XUnmapWindow(dpy,Scr.PanFrameLeft.win);
Scr.PanFrameLeft.isMapped=False;
XUnmapWindow (dpy,Scr.PanFrameRight.win);
Scr.PanFrameRight.isMapped=False;
}
- if((Scr.EdgeScrollX == 0)&&(Scr.EdgeScrollY == 0))
+ if(((Scr.EdgeScrollX == 0)&&(Scr.EdgeScrollY == 0)) || Scr.FixEdgeScroll)
return;
/* LEFT, hide only if EdgeWrap is off */
--- modules/FvwmAudio/FvwmAudio.c.orig Wed May 17 21:55:00 1995
+++ modules/FvwmAudio/FvwmAudio.c Sun Dec 24 15:33:58 1995
_at_@ -128,6 +128,7 @@
"end_config_info",
"icon_file",
"default_icon",
+ "toggle_paging",
/* add builtins here */
"startup",
"shutdown",
--- modules/FvwmButtons/FvwmButtons.c.orig Thu Nov 30 23:19:36 1995
+++ modules/FvwmButtons/FvwmButtons.c Sun Dec 24 15:33:58 1995
_at_@ -71,6 +71,7 @@
int new_desk = 0;
int ready = 0;
int xneg = 0, yneg = 0;
+int fixedgescroll = 0;
int CurrentButton = -1;
int fd[2];
_at_@ -163,7 +164,7 @@
SetMessageMask(fd, M_NEW_DESK | M_END_WINDOWLIST|
M_MAP| M_RES_NAME| M_RES_CLASS| M_CONFIG_INFO|
- M_END_CONFIG_INFO| M_WINDOW_NAME);
+ M_END_CONFIG_INFO| M_WINDOW_NAME | M_TOGGLE_PAGING);
ParseOptions();
if(num_buttons == 0)
_at_@ -527,6 +528,13 @@
}
}
if((Buttons[button].action)&&
+ (mystrncasecmp(Buttons[button].action,"TogglePage",10)==0)&&
+ (fixedgescroll == 1))
+ {
+ RelieveWindow(main_win, j*ButtonWidth, i*ButtonHeight,
+ BW, BH, ShadowGC,ReliefGC);
+ }
+ else if((Buttons[button].action)&&
(mystrncasecmp(Buttons[button].action,"Desk",4)==0))
{
sscanf(&Buttons[button].action[4],"%d %d",&val1,&val2);
_at_@ -1391,6 +1399,10 @@
case M_RES_CLASS:
case M_WINDOW_NAME:
CheckForHangon(body);
+ break;
+ case M_TOGGLE_PAGING:
+ fixedgescroll = body[0];
+ RedrawWindow(-1);
break;
default:
break;
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Jan 29 1996 - 09:35:10 GMT