From 99b9ce9de6f7f4db97f0a48b17047f0f7ee910bb Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 28 Jan 1999 03:48:04 +0000 Subject: [PATCH] Allow exposure compression across GravityNotify events to improve the Wed Jan 27 22:51:23 1999 Owen Taylor * gdk/gdkevents.c (expose_predicate): Allow exposure compression across GravityNotify events to improve the appearance of a GTK+ window unshading. --- ChangeLog | 8 +++++++- ChangeLog.pre-2-0 | 8 +++++++- ChangeLog.pre-2-10 | 8 +++++++- ChangeLog.pre-2-2 | 8 +++++++- ChangeLog.pre-2-4 | 8 +++++++- ChangeLog.pre-2-6 | 8 +++++++- ChangeLog.pre-2-8 | 8 +++++++- gdk/gdkevents.c | 14 ++++++++++++-- gdk/x11/gdkevents-x11.c | 14 ++++++++++++-- 9 files changed, 73 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a3a39a0ea..0a09c25045 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jan 27 22:51:23 1999 Owen Taylor + + * gdk/gdkevents.c (expose_predicate): Allow exposure + compression across GravityNotify events to improve + the appearance of a GTK+ window unshading. + Wed Jan 27 21:56:07 1999 Owen Taylor [ patch from Takashi Matsuda ] @@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999 Owen Taylor input method immediately, and only if that fails, register than instantiate callback. - * gdk/gdkentry.c: Some tweaks to make sure that we + * gtk/gtkentry.c: Some tweaks to make sure that we only get and set the IC attributes when appropriate. Wed Jan 27 20:08:54 1999 Owen Taylor diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 9a3a39a0ea..0a09c25045 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Wed Jan 27 22:51:23 1999 Owen Taylor + + * gdk/gdkevents.c (expose_predicate): Allow exposure + compression across GravityNotify events to improve + the appearance of a GTK+ window unshading. + Wed Jan 27 21:56:07 1999 Owen Taylor [ patch from Takashi Matsuda ] @@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999 Owen Taylor input method immediately, and only if that fails, register than instantiate callback. - * gdk/gdkentry.c: Some tweaks to make sure that we + * gtk/gtkentry.c: Some tweaks to make sure that we only get and set the IC attributes when appropriate. Wed Jan 27 20:08:54 1999 Owen Taylor diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9a3a39a0ea..0a09c25045 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Wed Jan 27 22:51:23 1999 Owen Taylor + + * gdk/gdkevents.c (expose_predicate): Allow exposure + compression across GravityNotify events to improve + the appearance of a GTK+ window unshading. + Wed Jan 27 21:56:07 1999 Owen Taylor [ patch from Takashi Matsuda ] @@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999 Owen Taylor input method immediately, and only if that fails, register than instantiate callback. - * gdk/gdkentry.c: Some tweaks to make sure that we + * gtk/gtkentry.c: Some tweaks to make sure that we only get and set the IC attributes when appropriate. Wed Jan 27 20:08:54 1999 Owen Taylor diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9a3a39a0ea..0a09c25045 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Wed Jan 27 22:51:23 1999 Owen Taylor + + * gdk/gdkevents.c (expose_predicate): Allow exposure + compression across GravityNotify events to improve + the appearance of a GTK+ window unshading. + Wed Jan 27 21:56:07 1999 Owen Taylor [ patch from Takashi Matsuda ] @@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999 Owen Taylor input method immediately, and only if that fails, register than instantiate callback. - * gdk/gdkentry.c: Some tweaks to make sure that we + * gtk/gtkentry.c: Some tweaks to make sure that we only get and set the IC attributes when appropriate. Wed Jan 27 20:08:54 1999 Owen Taylor diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9a3a39a0ea..0a09c25045 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Wed Jan 27 22:51:23 1999 Owen Taylor + + * gdk/gdkevents.c (expose_predicate): Allow exposure + compression across GravityNotify events to improve + the appearance of a GTK+ window unshading. + Wed Jan 27 21:56:07 1999 Owen Taylor [ patch from Takashi Matsuda ] @@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999 Owen Taylor input method immediately, and only if that fails, register than instantiate callback. - * gdk/gdkentry.c: Some tweaks to make sure that we + * gtk/gtkentry.c: Some tweaks to make sure that we only get and set the IC attributes when appropriate. Wed Jan 27 20:08:54 1999 Owen Taylor diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9a3a39a0ea..0a09c25045 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Wed Jan 27 22:51:23 1999 Owen Taylor + + * gdk/gdkevents.c (expose_predicate): Allow exposure + compression across GravityNotify events to improve + the appearance of a GTK+ window unshading. + Wed Jan 27 21:56:07 1999 Owen Taylor [ patch from Takashi Matsuda ] @@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999 Owen Taylor input method immediately, and only if that fails, register than instantiate callback. - * gdk/gdkentry.c: Some tweaks to make sure that we + * gtk/gtkentry.c: Some tweaks to make sure that we only get and set the IC attributes when appropriate. Wed Jan 27 20:08:54 1999 Owen Taylor diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9a3a39a0ea..0a09c25045 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Wed Jan 27 22:51:23 1999 Owen Taylor + + * gdk/gdkevents.c (expose_predicate): Allow exposure + compression across GravityNotify events to improve + the appearance of a GTK+ window unshading. + Wed Jan 27 21:56:07 1999 Owen Taylor [ patch from Takashi Matsuda ] @@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999 Owen Taylor input method immediately, and only if that fails, register than instantiate callback. - * gdk/gdkentry.c: Some tweaks to make sure that we + * gtk/gtkentry.c: Some tweaks to make sure that we only get and set the IC attributes when appropriate. Wed Jan 27 20:08:54 1999 Owen Taylor diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 75dd891ddd..e83b05086f 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -378,12 +378,22 @@ expose_predicate (Display *display, XEvent *xevent, XPointer arg) { GdkExposeInfo *info = (GdkExposeInfo *)arg; - if (xevent->xany.type != Expose) + /* Compressing across GravityNotify events is safe, because + * we completely ignore them, so they can't change what + * we are going to draw. Compressing across GravityNotify + * events is necessay because during window-unshading animation + * we'll get a whole bunch of them interspersed with + * expose events. + */ + if ((xevent->xany.type != Expose) && + (xevent->xany.type != GravityNotify)) { info->seen_nonmatching = TRUE; } - if (info->seen_nonmatching || (xevent->xany.window != info->window)) + if (info->seen_nonmatching || + (xevent->xany.type != Expose) || + (xevent->xany.window != info->window)) return FALSE; else return TRUE; diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index 75dd891ddd..e83b05086f 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -378,12 +378,22 @@ expose_predicate (Display *display, XEvent *xevent, XPointer arg) { GdkExposeInfo *info = (GdkExposeInfo *)arg; - if (xevent->xany.type != Expose) + /* Compressing across GravityNotify events is safe, because + * we completely ignore them, so they can't change what + * we are going to draw. Compressing across GravityNotify + * events is necessay because during window-unshading animation + * we'll get a whole bunch of them interspersed with + * expose events. + */ + if ((xevent->xany.type != Expose) && + (xevent->xany.type != GravityNotify)) { info->seen_nonmatching = TRUE; } - if (info->seen_nonmatching || (xevent->xany.window != info->window)) + if (info->seen_nonmatching || + (xevent->xany.type != Expose) || + (xevent->xany.window != info->window)) return FALSE; else return TRUE;