Re: FVWM: Icon Placement

From: Thomas Thyberg <tt_at_bengt.algonet.se>
Date: Thu, 23 Jan 1997 21:13:30 +0100

: From: "Michael Kirby" <kirby_at_ess.mc.xerox.com>
:
: > Is there a way to change the icon placement. Right now, When I
: > create a new window and iconify, it defaults to the left hand side.
: > I would like to be able to set it like an iconbox can be set, but I
: > don't want an iconbox.
:
: Never Mind,
:
: The IconBox command on Style is not the same as the FvwmIconBox Module
: that also comes with the distribution. An important semantic
: difference.
:
: But now how do I get the icons to stick in the same place once I've
: iconified them?
:
: For example, open 3 windows. Iconify 2, open the first one and
: iconify the third (the one that wasn't originally iconified), it goes
: into the slot of the window that was just opened.
:
: Is there a way for icon placement to be reserved for the life of the
: window, regardless of whether or not the window is currently
: iconified?

Hi all!

I don't know if there is a configurable option (.fvwm2rc) for this,
but one way I just tried is to mark all new icons as ICON_MOVED, since
moved icons seems to stay put. I also wanted the spot where the icon
of a deiconfied window occupie to be to be left alone.

The following patch implements this. I don't know if this is the right
way of doing this but it works for me. Maybe this should be configurable.

I also wanted to have the icon title to raise when given focus so one
can read the whole iconname without explicit raise of the icon.
I usually end up with several emacs icons (~20) at the bottom of
the screen and having the icontitle "pop up" makes it much easier
to find the correct one.

If it is possible to do all this in the .fvwm2rc file, please let me know.

Sorry for the contextdiff, but the diff at work didn't have -n.


/TT -- tt_at_algonet.se

--------------
This is for 2.0.44.

*** focus.c.orig Fri Dec 06 18:17:25 1996
--- focus.c Fri Jan 17 14:20:41 1997
***************
*** 34,39 ****
--- 34,40 ----
  
  void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
  {
+ int raise = FALSE;
    int i;
    extern Time lastTimestamp;
  
***************
*** 116,122 ****
        Scr.Ungrabbed = Fw;
      }
    if((Fw)&&(Fw->flags & ICONIFIED)&&(Fw->icon_w))
! w= Fw->icon_w;
    
    if((Fw)&&(Fw->flags & Lenience))
      {
--- 117,126 ----
        Scr.Ungrabbed = Fw;
      }
    if((Fw)&&(Fw->flags & ICONIFIED)&&(Fw->icon_w))
! {
! w= Fw->icon_w;
! raise = TRUE;
! }
    
    if((Fw)&&(Fw->flags & Lenience))
      {
***************
*** 129,134 ****
--- 133,140 ----
      {
        /* Window will accept input focus */
        XSetInputFocus (dpy, w, RevertToParent, lastTimestamp);
+ if (raise)
+ XRaiseWindow(dpy, w);
        Scr.Focus = Fw;
        Scr.UnknownWinFocused = None;
      }
*** icons.c.orig Mon Dec 23 23:07:47 1996
--- icons.c Thu Jan 23 16:14:01 1997
***************
*** 438,445 ****
                    {
                      if(test_window->Desk == t->Desk)
                        {
! if((test_window->flags&ICONIFIED)&&
! (test_window->icon_w||test_window->icon_pixmap_w)&&
                             (test_window != t))
                            {
                              tw=test_window->icon_p_width;
--- 438,444 ----
                    {
                      if(test_window->Desk == t->Desk)
                        {
! if((test_window->icon_w||test_window->icon_pixmap_w)&&
                             (test_window != t))
                            {
                              tw=test_window->icon_p_width;
***************
*** 465,470 ****
--- 464,470 ----
        return;
        t->icon_x_loc = real_x;
        t->icon_y_loc = real_y;
+ t->flags |= ICON_MOVED;
        
        if(t->icon_pixmap_w)
        XMoveWindow(dpy,t->icon_pixmap_w,t->icon_x_loc, t->icon_y_loc);



--
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 Thu Jan 23 1997 - 14:17:23 GMT

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