Subject: Re: Menu Styles

From: Dominik Vogt <[email-masked]>
Date: Thu, 18 Feb 1999 22:08:48 +0100

In-Reply-To: <[email-masked]>; from Tim Phipps on Thu, Feb 18, 1999 at 05:14:26PM +0000

Here's the patch. It's so trivial that I'll commit it
before 2.2 and without any testing.

Bye

Dominik

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

--- menus.c.orig	Thu Feb 18 21:08:30 1999
+++ menus.c	Thu Feb 18 21:09:28 1999
@@ -1184,8 +1184,8 @@
       Bool fDefaultLeft;
       Bool fEmergencyLeft;
 
-      x_offset = prev_width * menu->ms->feel.PopupOffsetPercent / 100 +
-	menu->ms->feel.PopupOffsetAdd;
+      x_offset = prev_width * menuPrior->ms->feel.PopupOffsetPercent / 100 +
+	menuPrior->ms->feel.PopupOffsetAdd;
       left_x = prev_x - menu->width + 2;
       right_x = prev_x + x_offset;
       if (x_offset > prev_width - 2)

--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
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: [email-masked] (Paul D. Smith)
Date: 18 Feb 1999 16:45:59 -0500

%% Dominik Vogt <[email-masked]> writes:

I haven't looked at the actual code, so I'll just ask:
 
  dv> -      x_offset = prev_width * menu->ms->feel.PopupOffsetPercent / 100 +
  dv> -	menu->ms->feel.PopupOffsetAdd;
  dv> +      x_offset = prev_width * menuPrior->ms->feel.PopupOffsetPercent / 100 +
  dv> +	menuPrior->ms->feel.PopupOffsetAdd;

Are you sure menuPrior is always a valid pointer whenever menu is?  That
is, is there any case where there isn't a prior menu and menuPrior is
NULL, or something?

-- 
-------------------------------------------------------------------------------
 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://fvwm.math.uh.edu/>.
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: Fri, 19 Feb 1999 00:20:57 +0100

> is, is there any case where there isn't a prior menu and menuPrior is

Yes, I'm absolutely sure since this lines are inside this
if-statement:

  if (menuPrior != NULL) {
  ...
    x_offset = prev_width * menuPrior->ms->feel.PopupOffsetPercent / 100 +
               menuPrior->ms->feel.PopupOffsetAdd;
  ...
  }

Bye

Dominik