On Fri, 30 Sep 2005, Dominik Vogt wrote:
On Fri, Sep 30, 2005 at 06:55:16AM +0200, Viktor Griph wrote:
On Thu, 29 Sep 2005, Dominik Vogt wrote:
On Thu, Sep 29, 2005 at 02:09:49AM -0500, fvwm-workers wrote:
CVSROOT:        /home/cvs/fvwm
Module name:    fvwm
Changes by:     griph   05/09/29 02:09:48

Modified files:
        .              : ChangeLog NEWS
        fvwm           : frame.c move_resize.c

Log message:
fixes for resizing shaded windows, and windows changed by complex
functions
as
AddToFunc ResizeShadedOpaque
+ I WindowShade off
+ I Resize
+ I WindowShade on

Can you please post the diffs on frame.c and explain what you
did?  I've been working on some resize-when-shaded issues a
while ago but had to stop because the patch became too
difficult to manage and I wanted to think more about it first.

The diffs is attached. The first two hunks are for the complex function
fix. There I simply unset the pressed window part if it has moved, to
avoid it being used as a starting point for resizes.

But that breaks

 Style * DepressableBorder

for resize.  And if the complex function looks like this:

 addtofunc foo
 + i resize
 + i menu somemenu

the menu will not stick to the border because the context window
is gone.  (Actually that currently works only with the title and
the title buttons, not with the window border, but I think that is
a bug).

I think this part of the patch should be removed.  Can you please
demonstrate the problem you tried to solve?

I've reverted the patch, and will try to look for a more complete (and probably more complex) solution when I find the time.

The problem is that if you do for example
DestroyFunc ResizeFunction
AddToFunc ResizeFunction
+ M ThisWindow (Shaded) WindowShade off
+ M Resize
+ M TestRc (Match) WindowShade on

Mouse 1 SF ResizeFunction to resize shaded windows opaque you end up with reference point making it resize to double it's size at start, and move up to above it's starting point. If you move the pointer down beneth the old lower border it will just be double sized. I'll look into another solution.

The last hunk is for the resizing of the client area of shaded windows.
The only change is that, for shaded windows, the get_client_geometry
function (that calculates the client geometry based on the frame and
border) is used instead of querying the geometry of the client window.
That makes the unshading to resize the client window to the correct size
during the unshade, and not to the size it had when the window was first
shaded.

Very good patch!  I tried to fix it myself but ended up with a far
more complex solution that did not work either.  I never thought
of such a simple approach :-)

Thanks.
My first try was to atack the resize code, but didn't get that to work, and decided to check on what happened when the window was unshaded.

Also, latest CVS does not compile without warnings:
[snip]
Ooops. Sorry about that. What was the compiler flags that should be used
to disable all ignorable warnings?

gcc-2.95.x:

 make CFLAGS="-g -O2 -Wall -Werror"

gcc-3.x and gcc-4.x:

 make CFLAGS="-g -O2 -Wall -Wpointer-arith -fno-stric-aliasing -Werror"

Thanks.

/Viktor

Reply via email to