Re: FVWM: Patch: balloon help for Pager

From: Richard Lister <ric_at_giccs.georgetown.edu>
Date: Wed, 27 Aug 1997 12:18:23 -0400

On Wed, 27 Aug 1997 10:15:46 +0100 (BST)
Martin Cartwright <M.Cartwright_at_Queens-Belfast.AC.UK>
wrote concerning 'Re: FVWM: Patch: balloon help for Pager':
>
> I downloaded the tar file from the URL given but that appeared to
> still have the bug that caused a silent fail whenever the pointer
> entered the window.

Odd, as I generated the files in the tar from the patch. I'll check on it.

> However the patch included in the e-mail works
> fine on this Solaris 2.5 Ultra 1. Cool addition! I like it. I have two
> further comments
>
> 1) It doesn't seem to be picking up on the *FvwmPagerBalloonFore black
> statement in my .fvwmrc. I specified black but it insists on white. I
> think it unlikely that it can't allocate a colourmap entry to "black".
> That's okay, I'll just switch my colours around.

It was a silly bug. I'll include a small patch to go on top of the
previous one at the end of this mail. I'll also update the web page
versions sometime in the next hour.


> 2) My pager is in the top right of the screen. Any windows in the
> right most pages of the desktop have unreadable balloons, as they go
> off the screen. A temporary fix, would be to move the pager I suppose,
> but that means moving all sorts of stuff and resetting my IconBox etc
> etc..

I knew people would ask for this. Things look the way they do at the
moment because I have the pager at top left :-)

There are a few things to consider:

1. It should be very easy to code so that a balloon that would project
off the screen to left or right is moved horizontally to be visible.
I'll have a go at that tonight.

2. Vertically is slightly more complicated. There is a very good reason
why balloons are always *outside* the window they are describing. It's
to avoid an EnterNotify/LeaveNotify event loop between the balloon
and the window. It would be possible to code around the loop but it
would make the event handling code for the whole module more complex.
I could have the balloon switch to being above the window if below
causes it to be off the screen.

3. How about two more options:

   *FvwmPagerBalloonPlacement: Above | Below
   *FvwmPagerHorizontalOffset: +x | -x

where the offset would determine the placement of the centre of the balloon
relative to the centre of the window. This would be shifted on the fly
to keep the balloon on the screen horizontally as well.

This doesn't feel generic enough ...

I'm very open to suggestions.



Ric

P.S. patch to x_pager.c below. Apply in the fvwm-2.0.46/modules/FvwmPager/
directory.


Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC.
Phone: 202-687 2878
Email: ric_at_giccs.georgetown.edu
Web: http://www.giccs.georgetown.edu/



-------------------------------Cut here-----------------------------------
*** x_pager.c.prev Wed Aug 27 00:06:27 1997
--- x_pager.c Wed Aug 27 11:07:30 1997
***************
*** 444,454 ****
                                CWOverrideRedirect | CWEventMask | CWBackPixel,
                                &attributes);
  
! /* make gc for balloon */
      gcv.font = balloon.font->fid;
  
      BalloonGC = XCreateGC(dpy, balloon.w,
! GCFont,
                            &gcv);
    } /* ShowBalloons */
  }
--- 444,457 ----
                                CWOverrideRedirect | CWEventMask | CWBackPixel,
                                &attributes);
  
! /* set font */
      gcv.font = balloon.font->fid;
  
+ /* if fore given in config set now, otherwise it'll be set later */
+ gcv.foreground = (BalloonFore == NULL) ? 0 : GetColor(BalloonFore);
+
      BalloonGC = XCreateGC(dpy, balloon.w,
! GCFont | GCForeground,
                            &gcv);
    } /* ShowBalloons */
  }
--
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 Wed Aug 27 1997 - 11:17:39 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST