Re: Include GdkRegion in expose events - bug 51288 [PATCH]
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list gnome org
- Subject: Re: Include GdkRegion in expose events - bug 51288 [PATCH]
- Date: 28 Feb 2001 12:48:54 -0500
Alexander Larsson <alla lysator liu se> writes:
> Here is a patch that implements a GdkExposeEvent.region field, in addition
> to the old area field. This lets app authors make more intelligent expose
> handlers in case they draw something that takes a lot of time.
>
> I think this is a great idea.
In general this patch looks good. I have some reservations about
the handling of synthetic exposes.
As I see it:
- Any code that currently sends a synthetic expose is broken
with the change.
- Unless they were intializing the event with
GdkEventExpose *event = { 0 };
That breakage may not reliably be detected. (Also,
you have the check in gtkmain.c, but most people have sent
synthetic exposes with gtk_widget_event())
- Sending synthetic exposes is basically not the best way to
do things anymore.
I think if we are going to break synthetic exposes, then we
should break them in a clear, reliable way and tell people
need to
So, I'd propose make calling gtk_widget_event() with an
event of type GDK_EXPOSE illegal and if that is done
print out a informative message like:
"Events of type GDK_EXPOSE cannot be synthesized. To get
the same effect, call gdk_window_invalidate_rect/region(),
followed by gdk_window_process_updates()."
With that change (and fixing gtknotebook.c to simple invalidate_rect
and not process_updates()), it should be fine to commit.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]