Subject: Re: 'Sticky' problem during restart

From: Giuseppe Della Ricca <[email-masked]>
Date: Tue, 26 Dec 2000 15:34:46 +0100 (CET)

Hi Dominik,

I have to confirm two of the problems I've reported:

....
1- when restarting from a desktop different from the first one some Sticky
   windows disappear (works ok on the 1st desktop). After a second
   restart, they reappear iconified. After a 3rd restart, they disappear
   again (even if left iconified). And so on ...

3- when starting FvwmRestartVerify to perform a restart sometimes the
   process starts but the window is not visible. This happens more
   often if I'm in a desk different from the first one.
...

I've already sent the 'xwininfo' from the affected windows: please let me
know if/how I can provide more informations, if needed.

Instead, the problem I've reported in the past as '2.' disappeared after
2000-12-17:

* fvwm/events.c (HandleMapRequestKeepRaised):
        (HandleReparentNotify):
        fake a MAP packet when a window is created on a different desk to
        allow FvwmButtons to swallow it

Cheers,
Giuseppe.

from my .fvwm2rc:

{stuff maybe related to 1.]

ColormapFocus FollowsFocus
Style * ClickToFocus
Style Fvwm*          NoTitle, NoHandles, Sticky, WindowListSkip
Style Fvwm*          BorderWidth 2, CirculateSkipIcon
Style Fvwm*          MiniIcon mini.fvwm.xpm
Style Fvwm*          FvwmBorder

Style Mxconns        BorderWidth 0, NoHandles, Sticky
Style Mxconns        WindowListSkip, NeverFocus
Style Mxconns        NoButton 1, NoButton 2, NoButton 3
Style Mxconns        NoButton 4, NoButton 5, NoButton 6

Style ASClock        NoTitle, NoHandles, Sticky
Style ASClock        WindowListSkip, NeverFocus

Style Pload          NoTitle, NoHandles, Sticky
Style Pload          WindowListSkip, NeverFocus

(mxconns and pload show the problem, while asclock is fine !! also no
 problems if I remove the Sticky flags)

[stuff maybe related with 3.]

# FvwmForm alias - query restart ala mwm
DestroyModuleConfig FvwmForm-Restart: *
*FvwmForm-Restart: GrabServer
*FvwmForm-Restart: WarpPointer
*FvwmForm-Restart: Back       grey60
*FvwmForm-Restart: Fore       black
*FvwmForm-Restart: ItemBack   grey60
*FvwmForm-Restart: ItemFore   black
*FvwmForm-Restart: Font       -adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*
*FvwmForm-Restart: ButtonFont -adobe-helvetica-bold-r-*-*-11-*-*-*-*-*-*-*
*FvwmForm-Restart: InputFont  -adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*
# begin items
*FvwmForm-Restart: Line       center
*FvwmForm-Restart: Text       "Do you really want to restart FVWM?"
*FvwmForm-Restart: Line       expand
*FvwmForm-Restart: Button     quit "Restart" ^M
*FvwmForm-Restart: Command    Restart fvwm2
*FvwmForm-Restart: Button     quit "Cancel"
*FvwmForm-Restart: Command    Nop

--
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: Wed, 27 Dec 2000 04:21:57 +0100

>    again (even if left iconified). And so on ...

I don't see this problem.  Please try to find a minimal fvwm
config file and an exact step by step description when this
happens.  Especially, I suspect that 'some sticky windows' refers
only to one or more specific applications.  Also, I need to know
if these applications have any icon specific configuration (e.g.
you can configure ddd to iconify all its windows when one of it is
iconified).

> know if/how I can provide more informations, if needed.

I can't reproduce this either.  Perhaps a few printfs may shed a
light on this.  First, add a printf that prints out the initial
window posistion and desk.  In add_windows.c you will find this
code (around line 1348):

  /****** window placement ******/
  do_resize_too = setup_window_placement(tmp_win, &style);

  /* set up geometry */
  tmp_win->frame_g.x = tmp_win->attr.x;
  tmp_win->frame_g.y = tmp_win->attr.y;
  tmp_win->frame_g.width = tmp_win->attr.width + 2 * tmp_win->boundary_width;
  tmp_win->frame_g.height = tmp_win->attr.height + tmp_win->title_g.height
    + 2 * tmp_win->boundary_width;
  gravity_constrain_size(
    tmp_win->hints.win_gravity, tmp_win, &tmp_win->frame_g);

  update_absolute_geometry(tmp_win);

Please add a fprintf to print out the tmp_win->frame_g members:

  fprintf(stderr, "new frame: %d %d %dx%d d=%d\n", tmp_win->frame_g.x, 
          tmp_win->frame_g.y, tmp_win->frame_g.width,
          tmp_win->frame_g.height, tmp_win->Desk);

(untested).  This should tell us if the window is mapped at all
and if yes, where and on which desk.

Next, in FvwmForm.c around line 1600 add an fprintf after this
code:

  if (preload_yorn == 'n') {            /* if not a preload */
    XMapRaised(dpy, CF.frame);
    XMapSubwindows(dpy, CF.frame);
    if (CF.warp_pointer) {
      XWarpPointer(dpy, None, CF.frame, 0, 0, 0, 0,
                   CF.max_width / 2, CF.total_height - 1);
    }
  }

add:

  else fprintf(stderr, "ff: preload, don't map window\n");

after the final closing curly brace.

Finally, it seems unlikely that I will be able to reproduce the
problem, so if you feel comfortable enough to attach a debugger to
FvwmForm, that may help a lot.  Since you can't simply start
modules from the command line, you have to attach to the running
module.  To do this, add a

  sleep(30);

after the call to XOpenDisplay in FvwmForm.c.  Now, when you start
the module, you have 30 seconds to fire up the debugger and attach
it to the process.  Please pay close attention to the contents of
the 'preload_yorn' variable and everything related to window
placement.

Again, a stripped down config file and step by step instructions
may allow me to see thin on my system.

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]