Re: Drop WM_ERASEBKGND handling in gdkevents-win32.c?

On Mon, 2005-03-21 at 07:46 -0500, Owen Taylor wrote:
> On Mon, 2005-03-21 at 12:53 +0200, Tor Lillqvist wrote:
> > It was suggested to me on IRC that it is unnecessary (thanks!), and it
> > indeed seems so.
> > 
> > But anyway, before I zap it, a request to fellow gtk/win32 hackers:
> > Please verify. Comment out the WM_ERASEBKGND case in gdkevents-win32.c:
> > gdk_event_translate().
> > 
> > (Please test in the gtk-2-6 branch, as the HEAD branch is somwewhat in
> > a flux currently with the cairo work going on, and I get odd window
> > update bugs occasionally with it anyway regardless of whether
> > WM_ERASEBKGND is handled or not.)
> You certainly can't do that on windows that don't have have expose
> events in their event mask, since they'll never get repainted.

I don't think there are any examples of this in the GTK+ standard
widgets. But you should be to create an example. Create a drawing
area, then do:
 gtk_widget_set_double_buffered (darea, FALSE);
 gtk_widget_realize (darea);
 gdk_window_set_events (darea->window, 0);

> I don't think you can do it on other windows either, since GDK doesn't
> have sufficient knowledge to know whether drawing to a window will
> be double buffered or not.

Hmm, let me drop this second objection ... we require all windows to
be painted from the background up, even in the absence of double
buffering. (To avoid flicker when unmapping windows and similar)

There is a third possible issue - if you are moving another window over
a window, does windows send:


Or is ERASEBKGN only sent immediately before PAINT? If the former, then
not handling ERASEBKGND may produce objectionable "trailing" of windows
moved across a GTK+ window. (Like an X program that uses bg=None ona
all it's windows.)


Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]