Subject: Re: Flashing Windows

From: Dominik Vogt <[email-masked]>
Date: Tue, 3 Aug 1999 04:23:58 +0200

On Mon, Aug 02, 1999 at 01:35:21PM +0100, [email-masked] wrote:
> Dominik Vogt wrote:
> > I'm quite clueless regarding this expose problem. Could you try
> > this with a 1x1 desktop? I.e. use
> > 
> >   DeskTopSize 1x1
> > 
> > And try moving windows. Does the problem go away? (A 1x1 desktop
> > switches off paging during window moves - this is the only related
> > code I remember I changed since 2.2).
> 
>   Nah, still happens. I just tried again on my old 2.2 build & it doesn't
> happen. Looking at my original posting (couldn't find it in the archive),
> it must have come in between 2.2 & snap 1990516 of 2.3.3.

Could you narrow it down to 2.3.1/2.3.2/2.3.3 please?

>   From what I can remember, the window gets loads of updates to tell it
> it's moved in both instances, then under 2.2 there's an expose event at
> the end.
> 
>   Now, there's an explosion of expose events throughout the entire move.
> 
>   I reall only notice it on this particular app. since it uses a naff GUI
> builder that redraws the whole window every time.

Which application was causing this trouble again? I can't remember.

>   I've just had *another* play, and I can't get *any* other app. to do the
> same thing. According to xscope, only my main app. gets these excess of
> Expose events under fvwm2.2+ ... so although something in fvwm's changed
> to 'cause' it, I can only assume that there's something funny in the app.
> that's now being shown up.

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [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]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 3 Aug 1999 04:52:33 +0200

> it must have come in between 2.2 & snap 1990516 of 2.3.3.

Okay, let's try something different. In the file move_resize.c you will
find this passage (current CVS):

      if (opaque_move && !IS_ICONIFIED(tmp_win) && !IS_SHADED(tmp_win))
        {
	  /* send configure notify event for windows that care about their
	   * location */
          XEvent client_event;
          client_event.type = ConfigureNotify;
          client_event.xconfigure.display = dpy;
          client_event.xconfigure.event = tmp_win->w;
          client_event.xconfigure.window = tmp_win->w;
          client_event.xconfigure.x = xl + tmp_win->boundary_width;
          client_event.xconfigure.y = yt + tmp_win->title_g.height +
	    tmp_win->boundary_width;
          client_event.xconfigure.width = Width - 2 * tmp_win->boundary_width;
          client_event.xconfigure.height = Height -
	    2 * tmp_win->boundary_width - tmp_win->title_g.height;
          client_event.xconfigure.border_width = 0;
          /* Real ConfigureNotify events say we're above title window, so... */
          /* what if we don't have a title ????? */
          client_event.xconfigure.above = tmp_win->frame;
          client_event.xconfigure.override_redirect = False;
          XSendEvent(dpy, tmp_win->w, False, StructureNotifyMask,
		     &client_event);
#ifdef FVWM_DEBUG_MSGS
          fvwm_msg(DBG,"SetupFrame","Sent ConfigureNotify (w == %d, h == %d)",
                   client_event.xconfigure.width,
		   client_event.xconfigure.height);
#endif
	}

I guess if you remove this part your application will work smoothly
again.

Bye

Dominik ^_^

---

From: Neil Bird <[email-masked]>
Date: Tue, 03 Aug 1999 09:39:10 +0100

Dominik Vogt wrote:
>       ...

  Changed to "if (0 && opqaue_move && ...".

  That's the ticket! So - what's this bit of code do? I mean, I can see
roughly what it's about, but what's its raison d'être?

  In particular, why would it cause a spew of expose events to this one
particular app. and no others that I've tried (including the demo one that
comes with the GUI builder in question)?

-- 
=====================- http://www.racaldefence.com/ -===================
 Neil Bird                   |   This is who we are     The time is near
                             |
 mailto:[email-masked] |        There are 151 days remaining
--
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: Tue, 3 Aug 1999 10:59:53 +0200

> comes with the GUI builder in question)?

It *doesn't* cause expose events. It sends ConfigureNotify events to the
application, i.e. it informs the application of poistion and size changes.
The application should not redraw itself if it was not resized. So I guess
it's the fault of this application. Probably written wuite minimalistic:
It simply redraws itself whenever something happens with it (expose/move/
resize ...).

If you can get your hands on the sourced I bet you'll see that
it redrawn when it gets a ConfigureNotify event. Perhaps the
ConfigureNotify handler is even the same as the Expose
handler.

Sending ConfigureNotify events is really the right thing to do
(I believe it's even required by the ICCCM). If I remeber
correctly this is important for apps that have a transparent
background that they draw themselves depending on their position
on the screen.

Bye

Dominik ^_^

---

From: Neil Bird <[email-masked]>
Date: Tue, 03 Aug 1999 10:19:38 +0100

> It simply redraws itself whenever something happens with it (expose/move/

  I'm misunderstanding something, then. I only got this info. by running
the app. via xscope, and *that* reports truckloads of expose events
hitting the app. from the server ... I wasn't looking for ConfigureNotify
events (I'll try later), so I guess it could be possible that these are
turning up, then the app.'s doing something that causes the server to send
loads of exposes ... but I looked for something suspicious going back the
other way and couldn't see anything likely. Oh well.

> ConfigureNotify handler is even the same as the Expose

  No chance of that, unfortunately.

> background that they draw themselves depending on their position

  Fair enough. I'll either live with it, or (more likely) patch my fvwm
whenever I build it.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 3 Aug 1999 13:11:28 +0200

>   Fair enough. I'll either live with it, or (more likely) patch my fvwm

Might a bug report to the application developers help?

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 14 Aug 1999 01:50:51 +0200

> Might a bug report to the application developers help?

I have created a configure option (--enable-move-bug-workaround) for
this problem.

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]