Subject: Re: button drawing bug

From: Dominik Vogt <[email-masked]>
Date: Mon, 22 Mar 1999 20:37:15 +0100

On Mon, Mar 22, 1999 at 10:14:47AM +0000, Tim Phipps wrote:
> Dominik Vogt wrote:
> > 
> > Tim, did you see this mail about the title button drawing bug?
> > Has this something to do with your recent changes or was it
> > in 2.2 already?
> 
> I don't think it's me.  The code in borders.c draws parts of the frame
> pressed when their windowId matches the global PressedW. This is set in
> events.c and it probably isn't getting cleared on button release.

I checked HandleButtonPress in events.c and it looks good. I think
the problem is that the buttons are simply not redrawn although
SetBorder is called. This is easy to verify:

  1) Choose 'Move' from the windowops menu of a raised window.
  2) Title button 1 is still up.
  3) Move the window so that tb1 is obscured by the move feedback
     window.
  4) Title button 1 is now depressed.

Tim, are you familiar with SetBorder? Can you figure out why this is
happening?

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Tim Phipps <[email-masked]>
Date: Tue, 23 Mar 1999 12:44:46 +0000

> SetBorder is called. This is easy to verify:

I gave you a bit of a red herring saying that parts of the border are
redrawn if their windowID matched PressedW.  They are redrawn if
PressedW matches the windowId of the InputOnly window corresponding to
that part of the border.  I'v commited a fix for this (pass None as the
expose_win and the entire border is redrawn).

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Mar 1999 15:21:45 +0100

> expose_win and the entire border is redrawn).

I have made a patch from the other side: instead of using Tmp_win
I pass PressedW as the  expose window. might this break something else?

Bye

Dominik ^_^

P.S.: Can anybody explain whet 'red herring' means? I've seen that
many times but could never figure out the exact meaning.

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Tue, 23 Mar 1999 09:26:43 -0500

> many times but could never figure out the exact meaning.

We have this oh so cool online dictionary at work:

*red 'herring n (a) smoke-cured herring. (b) (fig)
 irrelevant matter  introduced to distract attention from the  subject  being 
 discussed.  neither  fish,  flesh,  nor  good red herring, of a doubtful or
 ambiguous nature, which  cannot be defined.  draw a red herring across the
 trail, introduce  irrelevant  matter  to  distract attention from the subject
 being discussed.

Hope this clears it up.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Tim Phipps <[email-masked]>
Date: Tue, 23 Mar 1999 14:55:20 +0000

> I pass PressedW as the  expose window. might this break something else?

Yes, it breaks the drawing of borders. The resize handles are now
InputOnly, these are what PressedW will be set to when you press a
button in the resize handles. SetBorder draws in tmp_win->frame if
expose_win = tmp_win->frame. Passing expose_win == PressedW does nothing
which is why you see the button pressing having no effect until you move
the window of screen or under the feedback window (which generates
expose events on ->frame if you're lucky).

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Mar 1999 16:05:45 +0100

> expose events on ->frame if you're lucky).

But expose_win == PressedW *fixes* the problem. With that the pressed
button *is* redrawn. And still I think the expose_win should be the
title button window the button was pressed in to minimize redrawing.
Correct?

Bye

Dominik ^_^

---

From: [email-masked] (Paul D. Smith)
Date: 23 Mar 1999 10:05:44 -0500

%% Dan Espen <[email-masked]> writes:

  >> many times but could never figure out the exact meaning.

  de> We have this oh so cool online dictionary at work:

If you don't have one at work, try http://www.m-w.com/ ; it's great.
Has a thesaurus, too.  I actually bound a button on my button bar to a
script that grabs the current selection and sends it to Netscape to pop
up this site, so I just select some word and click mouse-2 on the
button, and bingo!

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Mar 1999 16:19:12 +0100

> up this site, so I just select some word and click mouse-2 on the

Hey, that's perfect for the 'hints from the developers' section
of the FAQ. Could you hack in a description there?

Bye

Dominik ^_^

---

From: Tim Phipps <[email-masked]>
Date: Tue, 23 Mar 1999 15:22:59 +0000

> title button window the button was pressed in to minimize redrawing.

This is correct for the title bar and buttons but not for the resize
handles. It would minimize redraws to pass the PressedW as expose_win
but only for the title bar and buttons.  If you can think of a way to do
that and pass Nonw for the resize handles then do it.  I'm beginning to
think that making the resize handles InputOnly was a mistake.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Mar 1999 16:33:37 +0100

On Tue, Mar 23, 1999 at 03:22:59PM +0000, Tim Phipps wrote:
> that and pass Nonw for the resize handles then do it.

Nothing a for loop can't handle :)

> I'm beginning to think that making the resize handles InputOnly
> was a mistake.

Did you do that in your border changes? Where is the border drawn
now. Into the frame?

Bye

Dominik ^_^

---

From: Tim Phipps <[email-masked]>
Date: Tue, 23 Mar 1999 15:40:16 +0000

> Did you do that in your border changes? Where is the border drawn

Yes & Yes. After I took tmp_win->bw away FvwmBorder styles were broken. 
It was easier to get the FvwmBorder look into the frame than put it in
all 8 resize handles plus the frame but the cost is extra drawing. I
also had the mad idea that it would be easier to implement gradient
borderstyles if there was only one window to worry about.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Mar 1999 16:44:18 +0100

> borderstyles if there was only one window to worry about.

And now you think you were wrong? I don't think so. Don't let a few
problems discourage you.

Bye

Dominik ^_^