FVWM: Patch to 2.0.43 for transient placement

From: Grant McDorman <grant_at_isgtec.com>
Date: Tue, 09 Jul 1996 12:12:42 -0400 (EDT)

The enclosed patch changes fvwm's placement of transient windows which do
*not* have any PPosition.

With this patch, transient windows (i.e. popups) which have no location
specified have RandomPlacement forced on. SmartPlacement, if specified in
the window flags, will take precedence.

Prior to this, any transient with no location specified would be placed in
the upper left corner.

I made this change so our application wouldn't have to, in effect, duplicate
RandomPlacement code.

Note, however, that neither mwm (Motif) nor twm do this; they both put the
window at (0,0). I haven't checked other window managers.

It may be desirable to delay this until after the Great Style Flags Rewrite
so that this behavior can be controlled on a per-window basis, just like the
other placement options.

Grant McDorman <grant_at_isgtec.com>
                                ISG Technologies, Inc.


*** placement.c Mon Apr 24 14:14:08 1995
--- ../../../incoming/fvwm-2.0.41-ISG/fvwm/placement.c Mon May 27 12:34:21 1996
***************
*** 162,168 ****
     * If RandomPlacement was specified,
     * then place the window in a psuedo-random location
     */
! if (!(tmp_win->flags & TRANSIENT) &&
        !(tmp_win->hints.flags & USPosition) &&
        ((tflag & NO_PPOSITION_FLAG)||
         !(tmp_win->hints.flags & PPosition)) &&
--- 162,168 ----
     * If RandomPlacement was specified,
     * then place the window in a psuedo-random location
     */
! if (!((tmp_win->flags & TRANSIENT) && (tmp_win->hints.flags & PPosition)) &&
        !(tmp_win->hints.flags & USPosition) &&
        ((tflag & NO_PPOSITION_FLAG)||
         !(tmp_win->hints.flags & PPosition)) &&
***************
*** 172,178 ****
          (tmp_win->wmhints->initial_state == IconicState)) )
      {
        /* Get user's window placement, unless RandomPlacement is specified */
 
! if(tflag & RANDOM_PLACE_FLAG)
          {
            if(tflag & SMART_PLACE_FLAG)
              SmartPlacement(tmp_win,tmp_win->frame_width+2*tmp_win->bw,
--- 172,178 ----
          (tmp_win->wmhints->initial_state == IconicState)) )
      {
        /* Get user's window placement, unless RandomPlacement is specified */
 
! if(tflag & RANDOM_PLACE_FLAG || (tmp_win->flags & TRANSIENT))
          {
            if(tflag & SMART_PLACE_FLAG)
              SmartPlacement(tmp_win,tmp_win->frame_width+2*tmp_win->bw,

End of MIME message
--
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 Tue Jul 09 1996 - 11:32:56 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST