From 7164c0acb138778fb973b0b48a70ff53d4a6e9b9 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Sat, 1 Jul 2000 21:15:05 +0000 Subject: [PATCH] When actually returning expose events, make sure to set the count field Sat Jul 1 16:28:32 2000 Owen Taylor * gdk/x11/gdkevents-x11.c (gdk_event_translate): When actually returning expose events, make sure to set the count field properly. * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix accidentally reintroced bug which always cleared the graphics_exposures value. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-0 | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-2 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gdk/x11/gdkevents-x11.c | 2 ++ gdk/x11/gdkgc-x11.c | 26 ++++++-------------------- 9 files changed, 78 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7315ef6df..e727ad602 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Sat Jul 1 16:28:32 2000 Owen Taylor + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): When + actually returning expose events, make sure to set + the count field properly. + + * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix + accidentally reintroced bug which always cleared + the graphics_exposures value. + Wed Jun 28 18:03:09 BST 2000 Tony Gale * docs/faq/gtk-faq.sgml: Change DocBook layout slightly diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7315ef6df..e727ad602 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Sat Jul 1 16:28:32 2000 Owen Taylor + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): When + actually returning expose events, make sure to set + the count field properly. + + * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix + accidentally reintroced bug which always cleared + the graphics_exposures value. + Wed Jun 28 18:03:09 BST 2000 Tony Gale * docs/faq/gtk-faq.sgml: Change DocBook layout slightly diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7315ef6df..e727ad602 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Sat Jul 1 16:28:32 2000 Owen Taylor + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): When + actually returning expose events, make sure to set + the count field properly. + + * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix + accidentally reintroced bug which always cleared + the graphics_exposures value. + Wed Jun 28 18:03:09 BST 2000 Tony Gale * docs/faq/gtk-faq.sgml: Change DocBook layout slightly diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7315ef6df..e727ad602 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Sat Jul 1 16:28:32 2000 Owen Taylor + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): When + actually returning expose events, make sure to set + the count field properly. + + * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix + accidentally reintroced bug which always cleared + the graphics_exposures value. + Wed Jun 28 18:03:09 BST 2000 Tony Gale * docs/faq/gtk-faq.sgml: Change DocBook layout slightly diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7315ef6df..e727ad602 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Sat Jul 1 16:28:32 2000 Owen Taylor + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): When + actually returning expose events, make sure to set + the count field properly. + + * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix + accidentally reintroced bug which always cleared + the graphics_exposures value. + Wed Jun 28 18:03:09 BST 2000 Tony Gale * docs/faq/gtk-faq.sgml: Change DocBook layout slightly diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7315ef6df..e727ad602 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Sat Jul 1 16:28:32 2000 Owen Taylor + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): When + actually returning expose events, make sure to set + the count field properly. + + * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix + accidentally reintroced bug which always cleared + the graphics_exposures value. + Wed Jun 28 18:03:09 BST 2000 Tony Gale * docs/faq/gtk-faq.sgml: Change DocBook layout slightly diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7315ef6df..e727ad602 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Sat Jul 1 16:28:32 2000 Owen Taylor + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): When + actually returning expose events, make sure to set + the count field properly. + + * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix + accidentally reintroced bug which always cleared + the graphics_exposures value. + Wed Jun 28 18:03:09 BST 2000 Tony Gale * docs/faq/gtk-faq.sgml: Change DocBook layout slightly diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index b9e0285c5..0086247c0 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -819,6 +819,7 @@ gdk_event_translate (GdkEvent *event, event->expose.type = GDK_EXPOSE; event->expose.area = expose_rect; event->expose.window = window; + event->expose.count = xevent->xexpose.count; return_val = TRUE; } @@ -852,6 +853,7 @@ gdk_event_translate (GdkEvent *event, event->expose.type = GDK_EXPOSE; event->expose.area = expose_rect; event->expose.window = window; + event->expose.count = xevent->xgraphicsexpose.count; return_val = TRUE; } diff --git a/gdk/x11/gdkgc-x11.c b/gdk/x11/gdkgc-x11.c index 80e285f85..6ba305cb7 100644 --- a/gdk/x11/gdkgc-x11.c +++ b/gdk/x11/gdkgc-x11.c @@ -10,8 +10,7 @@ typedef enum { static void gdk_x11_gc_values_to_xvalues (GdkGCValues *values, GdkGCValuesMask mask, XGCValues *xvalues, - unsigned long *xvalues_mask, - gboolean initial); + unsigned long *xvalues_mask); static void gdk_x11_gc_get_values (GdkGC *gc, GdkGCValues *values); @@ -125,10 +124,10 @@ _gdk_x11_gc_new (GdkDrawable *drawable, xvalues.fill_style = FillSolid; xvalues.arc_mode = ArcPieSlice; xvalues.subwindow_mode = ClipByChildren; - xvalues.graphics_exposures = True; + xvalues.graphics_exposures = False; xvalues_mask = GCFunction | GCFillStyle | GCArcMode | GCSubwindowMode | GCGraphicsExposures; - gdk_x11_gc_values_to_xvalues (values, values_mask, &xvalues, &xvalues_mask, TRUE); + gdk_x11_gc_values_to_xvalues (values, values_mask, &xvalues, &xvalues_mask); private->xgc = XCreateGC (GDK_GC_XDISPLAY (gc), GDK_DRAWABLE_IMPL_X11 (drawable)->xid, @@ -359,7 +358,7 @@ gdk_x11_gc_set_values (GdkGC *gc, } } - gdk_x11_gc_values_to_xvalues (values, values_mask, &xvalues, &xvalues_mask, FALSE); + gdk_x11_gc_values_to_xvalues (values, values_mask, &xvalues, &xvalues_mask); XChangeGC (GDK_GC_XDISPLAY (gc), GDK_GC_XGC (gc), @@ -384,18 +383,10 @@ static void gdk_x11_gc_values_to_xvalues (GdkGCValues *values, GdkGCValuesMask mask, XGCValues *xvalues, - unsigned long *xvalues_mask, - gboolean initial) + unsigned long *xvalues_mask) { - if (mask & GDK_GC_EXPOSURES) - xvalues->graphics_exposures = values->graphics_exposures; - else - xvalues->graphics_exposures = False; - *xvalues_mask |= GCGraphicsExposures; - /* Optimization for the common case (gdk_gc_new()) */ - if (values == NULL || - mask == 0) + if (values == NULL || mask == 0) return; if (mask & GDK_GC_FOREGROUND) @@ -546,11 +537,6 @@ gdk_x11_gc_values_to_xvalues (GdkGCValues *values, xvalues->graphics_exposures = values->graphics_exposures; *xvalues_mask |= GCGraphicsExposures; } - else if (initial) - { - xvalues->graphics_exposures = False; - *xvalues_mask |= GCGraphicsExposures; - } if (mask & GDK_GC_LINE_WIDTH) { -- 2.43.2