Re: Allow exposure compression across configure events [1.2.x]
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list gnome org
- Subject: Re: Allow exposure compression across configure events [1.2.x]
- Date: 01 Jun 2001 18:34:26 -0400
Alex Larsson <alexl redhat com> writes:
> In Gtk+ 1.2 there is a problem with expose compression when dragging a
> window from an app over another window from the same app. In this case the
> exposure compression won't work, since every other event is a configure
> notify for the dragged window.
>
> This patch allows compression across configure event targeted to a window
> other than the toplevel window of the expose event window.
>
> This really speeds up nautilus redrawing performance, is this OK to apply
> to the stable Gtk+ branch?
You can go ahead and commit this. I'm pretty certain it should be
safe, and it is a pretty big win.
(The only case I'm a little worried about is if someone has mucked
around with the event masks at the X level and is listening for
ConfigureNotify events on subwindows. I don't think anybody is doing
this, but I could be wrong. You might want to do some thorough testing
with Mozilla to make sure that everything still works there.)
Regards,
Owen
>
> Index: gdkevents.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gdk/gdkevents.c,v
> retrieving revision 1.20.2.11
> diff -u -p -r1.20.2.11 gdkevents.c
> --- gdkevents.c 2000/12/03 16:50:04 1.20.2.11
> +++ gdkevents.c 2001/06/01 22:11:34
> @@ -383,6 +383,7 @@ typedef struct _GdkExposeInfo GdkExposeI
> struct _GdkExposeInfo
> {
> Window window;
> + Window toplevel_window;
> gboolean seen_nonmatching;
> };
>
> @@ -401,7 +402,9 @@ expose_predicate (Display *display,
> * expose events.
> */
> if (xevent->xany.type != Expose &&
> - xevent->xany.type != GravityNotify)
> + xevent->xany.type != GravityNotify &&
> + (xevent->xany.type != ConfigureNotify ||
> + xevent->xany.window == info->toplevel_window))
> {
> info->seen_nonmatching = TRUE;
> }
> @@ -429,6 +432,7 @@ gdk_compress_exposures (XEvent *xeven
> GdkEvent event;
>
> info.window = xevent->xany.window;
> + info.toplevel_window = GDK_WINDOW_XWINDOW (gdk_window_get_toplevel (window));
> info.seen_nonmatching = FALSE;
>
> rect1.x = xevent->xexpose.x;
>
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]