I really like my OpaqueResize. :)
This is a very trivial patch that puts back the OpaqueResize code from
1.24r. It is enabled by putting in .fvwn2rc "GlobalOpts OpaqueResize"
There should be no trouble putting this in the current distribution; it
should be trivial to modify to support per-window opaque resizing after
the "great style rewrite"
Please cc: responses directly to me, since I'm not subscribed to the
mailing list.
- Louis
=========================cut here=======================================
diff -u -r fvwm-2.0.45.bak/fvwm/builtins.c fvwm-2.0.45/fvwm/builtins.c
--- fvwm-2.0.45.bak/fvwm/builtins.c Wed Jan 22 08:37:28 1997
+++ fvwm-2.0.45/fvwm/builtins.c Sun Mar 30 23:58:16 1997
_at_@ -3111,6 +3111,10 @@
{
Scr.SmartPlacementIsClever = True;
}
+ if (StrEquals(opt,"OPAQUERESIZE"))
+ {
+ Scr.OpaqueResize = True;
+ }
else if (StrEquals(opt,"SMARTPLACEMENTISNORMAL"))
{
Scr.SmartPlacementIsClever = False;
diff -u -r fvwm-2.0..45.bak/fvwm/fvwm.c fvwm-2.0.45/fvwm/fvwm.c
--- fvwm-2.0.45.bak/fvwm/fvwm.c Wed Jan 22 08:37:44 1997
+++ fvwm-2.0.45/fvwm/fvwm.c Sun Mar 30 23:58:29 1997
_at_@ -1235,6 +1235,7 @@
#endif
Scr.SmartPlacementIsClever = False;
+ Scr.OpaqueResize = False;
Scr.ClickToFocusPassesClick = True;
Scr.ClickToFocusRaises = True;
Scr.MouseFocusClickRaises = False;
diff -u -r fvwm-2.0.45.bak/fvwm/resize.c fvwm-2.0.45/fvwm/resize.c
--- fvwm-2.0.45.bak/fvwm/resize.c Fri Jan 17 09:32:26 1997
+++ fvwm-2.0.45/fvwm/resize.c Mon Mar 31 00:07:34 1997
_at_@ -22,6 +22,11 @@
#include "screen.h"
#include "parse.h"
+/* Condition for opaque resizing (can be changed after "great style rewrite") */
+#define NOOPAQUERESIZE ((!(Scr.OpaqueResize))|| \
+ ((Scr.OpaqueResize)&&(!(tmp_win->flags & MAPPED))))
+
+
static int dragx; /* all these variables are used */
static int dragy; /* in resize operations */
static int dragWidth;
_at_@ -112,7 +117,9 @@
return;
}
- MyXGrabServer(dpy);
+
+ if(NOOPAQUERESIZE)
+ MyXGrabServer(dpy);
/* handle problems with edge-wrapping while resizing */
_at_@ -170,7 +177,9 @@
}
}
/* draw the rubber-band window */
- MoveOutline (Scr.Root, dragx - tmp_win->bw, dragy - tmp_win->bw,
+
+ if(NOOPAQUERESIZE)
+ MoveOutline (Scr.Root, dragx - tmp_win->bw, dragy - tmp_win->bw,
dragWidth + 2 * tmp_win->bw,
dragHeight + 2 * tmp_win->bw);
_at_@ -239,18 +248,20 @@
}
if(!done)
{
- MoveOutline(Scr.Root,0,0,0,0);
+ if(NOOPAQUERESIZE)
+ MoveOutline(Scr.Root,0,0,0,0);
DispatchEvent();
-
- MoveOutline(Scr.Root, dragx - tmp_win->bw, dragy - tmp_win->bw,
+ if(NOOPAQUERESIZE)
+ MoveOutline(Scr.Root, dragx - tmp_win->bw, dragy - tmp_win->bw,
dragWidth + 2 * tmp_win->bw, dragHeight + 2 * tmp_win->bw);
}
}
/* erase the rubber-band */
- MoveOutline(Scr.Root, 0, 0, 0, 0);
+ if(NOOPAQUERESIZE)
+ MoveOutline(Scr.Root, 0, 0, 0, 0);
/* pop down the size window */
XUnmapWindow(dpy, Scr.SizeWindow);
_at_@ -331,8 +342,16 @@
if (ymotion == 1)
dragy = origy + origHeight - dragHeight;
- MoveOutline(Scr.Root, dragx - tmp_win->bw,dragy - tmp_win->bw,
- dragWidth + 2 * tmp_win->bw, dragHeight + 2 * tmp_win->bw);
+ if(NOOPAQUERESIZE)
+ {
+ MoveOutline(Scr.Root, dragx - tmp_win->bw,dragy - tmp_win->bw,
+ dragWidth + 2 * tmp_win->bw, dragHeight + 2 * tmp_win->bw);
+ }
+ else
+ {
+ SetupFrame (tmp_win, dragx - tmp_win->bw,
+ dragy - tmp_win->bw, dragWidth, dragHeight,FALSE);
+ }
}
DisplaySize(tmp_win, dragWidth, dragHeight,False);
}
diff -u -r fvwm-2.0.45.bak/fvwm/screen.h fvwm-2.0.45/fvwm/screen.h
--- fvwm-2.0.45.bak/fvwm/screen.h Wed Jan 22 08:37:49 1997
+++ fvwm-2.0.45/fvwm/screen.h Sun Mar 30 23:56:49 1997
_at_@ -317,6 +317,7 @@
** specific options later on:
*/
int SmartPlacementIsClever;
+ int OpaqueResize;
int ClickToFocusPassesClick;
int ClickToFocusRaises;
int MouseFocusClickRaises;
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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 Sun Mar 30 1997 - 23:24:08 BST