From b91c6861dd8ee64a5a60f0e73e437af46a3c3dd7 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 3 Dec 2002 22:53:54 +0000 Subject: [PATCH] Fix wrong sign for queued translation. (Found by Chris Blizzard, #100274) Tue Dec 3 17:47:24 2002 Owen Taylor * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong sign for queued translation. (Found by Chris Blizzard, #100274) --- ChangeLog | 160 ++------------------------------------ ChangeLog.pre-2-10 | 160 ++------------------------------------ ChangeLog.pre-2-2 | 160 ++------------------------------------ ChangeLog.pre-2-4 | 160 ++------------------------------------ ChangeLog.pre-2-6 | 160 ++------------------------------------ ChangeLog.pre-2-8 | 160 ++------------------------------------ gdk/x11/gdkgeometry-x11.c | 8 +- 7 files changed, 40 insertions(+), 928 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba36279e8c..c4fb770dc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Dec 3 17:47:24 2002 Owen Taylor + + * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong + sign for queued translation. (Found by Chris Blizzard, + #100274) + 2002-12-01 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak @@ -181,77 +187,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld always returns failure on Win9x. Instead, call MaskBlt() only if we are on NT/2k/XP. -2002-11-14 Tor Lillqvist - - Start implementing all fill styles (i.e. tiled, stippled, and - opaque stippled in addition to the plain solid style) in the Win32 - backend in an elegant and generic way. For now only did the - draw_rectangle() and draw_glyphs() methods. The rest will - follow. Previously some of the drawing methods implemented opaque - stippling, but not tiles or non-opaque stippling. - - Seems to work fine, now the check marks show up in check buttons, - the stippled background and stippled text in gtk-demo's Text - Widget look as they should, and GtkText's line wrap arrow shows - correctly instead of an ugly rectangle. - - The implementation does do a lot of pixmap handling and blitting - back and forth, especially on Win9x. But performance is hopefully - not an issue. I don't think many applications do a lot of tiled or - stippled drawing. - - * gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that - calls a GDI function and prints a warning if it failed. Also - API_CALL for non-GDI calls. Cleans all the the if (!BlaBla()) - WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written - GDI_CALL (BlaBla, ()). - - * gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places. - - (generic_draw): New function that handles all the blitting - necessary to implement tiles and stipples. A function that - actually draws stuff is passed as a parameter to - generic_draw(). If the fill style is solid, it is called - directly, to draw on the destination drawable. Otherwise it is - called to draw on a temporary mask bitmap, which then is used in - blitting operations. The tiles and/or stipples are rendered into - another temporary pixmap. If MaskBlt() is available (on NT/2k/XP), - it is used, otherwise a sequence of BitBlt() is used to do the - final composition onto the destination drawable. - - (draw_tiles_lowlevel, draw_tiles): Some renaming and code - reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable(). - - (rop2_to_rop3): Instead of bitblt_wrapper, this function does the - binary->ternary rop mapping. - - (draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs, - gdk_win32_draw_glyphs): Split functionality into two functions, - with generic_draw() doing its magic inbetween. - - * gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it - was ifdeffed out and wouldn't have done anything even if - enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't - have any effect any more anyway after all the changes GTK+ has - gone through in the last years. Remove some #if 0 code. - - * gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field - to NULL in case a GC is copied while it has a Windows DC active. - - * gdk/win32/gdkprivate-win32.h - * gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc. - Add mask_blt that points to MaskBlt() if available. - - * gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc - option. Check if MaskBlt() is available. If there is a - PRETEND_WIN9X envvar, set windows_version as if on Win9x. - - * gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new, - gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't - used or exported. Make a bit more like the X11 version. Hopefully - I didn't break the fragile palettized display ("pseudocolor") - code. - 2002-11-13 Christopher James Lahey * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref @@ -283,89 +218,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld * gdk/win32/gdkprivate-win32.h: Declare new functions. -2002-11-12 Tor Lillqvist - - More work on the Win32 backend. The scrolling problem diagnosis - from 2002-11-07 was wrong, even if the cure happened to work. The - problems were not caused by a lack of WM_PAINT messages while - scrolling. The real issue was that SetWindowPos() and - ScrollWindowEx() don't blit those parts of the window they think - are invalid. As we didn't keep Windows's update region in synch - with GDK's, Windows thought those areas that in fact had been - updated were invalid. Calling ValidateRgn() in - _gdk_windowing_window_queue_antiexpose() seems to be an elegant - and efficient solution, removing from Windows's update region - those areas we are about to repaint proactively. - - In some cases garbage leftover values were used for the clip - origin in GdkGCWin32. This showed up as odd blank areas around the - pixmaps included in the Text Widget in gtk-demo. - - Having the clip region either as a GdkRegion or a HRGN in - GdkGCWin32 was unnecessary, it's better to just use a HRGN. - - The translation and antiexpose queue handling in - gdkgeometry-win32.c seems unnecessary (and not implementable in - the same way as on X11 anyway, no serial numbers) on Windows, - ifdeffed out. - - All of testgtk and gtk-demo except "big windows" now seem to work - pretty well. - - Bug #79720 should be fixed now. - - * gdk/win32/gdkevents-win32.c (gdk_event_translate) In WM_PAINT - handler: Don't check for empty update rect. When we get a - WM_PAINT, the update region isn't empty. And if it for some - strange reason is, that will be handled later anyway. Don't leak - hrgn. - - * gdk/win32/gdkgc-win32.c: Set clip origins to zero - when appropriate. - - (gdk_gc_copy): Increase refcount on colormap if present. - - (gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple, - combine it with clip region after selecting into the DC. - - (_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region. - - (_gdk_win3_gdkregion_to_hrgn): New function, code snippet - extracted from gdk_win32_hdc_get(). - - * gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue - handling. - - (gdk_window_copy_area_scroll): Increase clipRect to avoid - ScrollWindowEx() not scrolling pixels it thinks are invalid. - Don't call UpdateWindow(). - - (_gdk_window_move_resize_child): Don't call UpdateWindow(). - - (gdk_window_premove, gdk_window_postmove, - gdk_window_clip_changed): Add debugging output. - - (_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn() - on the region. - - (_gdk_window_process_expose): No use for the serial number - parameter now. Instead of a rectangle, take a region parameter, as - Windows gives us one in WM_PAINT. - - * gdk/win32/gdkmain-win32.c (gdk_win32_rect_to_string, - gdk_win32_gdkrectangle_to_string, gdk_win32_gdkregion_to_string): - New debugging functions. - - * gdk/win32/*.c: Use above functions. - - * gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory - leak, free list after use. - - * gdk/win32/gdkprivate-win32.h: Drop the clip_region field from - GdkGCWin32. Only use the HRGN hcliprgn. Declare new functions. - - * gdk/win32/rc/gdk.rc.in: Update copyright year. - 2002-11-10 Matthias Clasen * gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ba36279e8c..c4fb770dc5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Tue Dec 3 17:47:24 2002 Owen Taylor + + * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong + sign for queued translation. (Found by Chris Blizzard, + #100274) + 2002-12-01 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak @@ -181,77 +187,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld always returns failure on Win9x. Instead, call MaskBlt() only if we are on NT/2k/XP. -2002-11-14 Tor Lillqvist - - Start implementing all fill styles (i.e. tiled, stippled, and - opaque stippled in addition to the plain solid style) in the Win32 - backend in an elegant and generic way. For now only did the - draw_rectangle() and draw_glyphs() methods. The rest will - follow. Previously some of the drawing methods implemented opaque - stippling, but not tiles or non-opaque stippling. - - Seems to work fine, now the check marks show up in check buttons, - the stippled background and stippled text in gtk-demo's Text - Widget look as they should, and GtkText's line wrap arrow shows - correctly instead of an ugly rectangle. - - The implementation does do a lot of pixmap handling and blitting - back and forth, especially on Win9x. But performance is hopefully - not an issue. I don't think many applications do a lot of tiled or - stippled drawing. - - * gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that - calls a GDI function and prints a warning if it failed. Also - API_CALL for non-GDI calls. Cleans all the the if (!BlaBla()) - WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written - GDI_CALL (BlaBla, ()). - - * gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places. - - (generic_draw): New function that handles all the blitting - necessary to implement tiles and stipples. A function that - actually draws stuff is passed as a parameter to - generic_draw(). If the fill style is solid, it is called - directly, to draw on the destination drawable. Otherwise it is - called to draw on a temporary mask bitmap, which then is used in - blitting operations. The tiles and/or stipples are rendered into - another temporary pixmap. If MaskBlt() is available (on NT/2k/XP), - it is used, otherwise a sequence of BitBlt() is used to do the - final composition onto the destination drawable. - - (draw_tiles_lowlevel, draw_tiles): Some renaming and code - reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable(). - - (rop2_to_rop3): Instead of bitblt_wrapper, this function does the - binary->ternary rop mapping. - - (draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs, - gdk_win32_draw_glyphs): Split functionality into two functions, - with generic_draw() doing its magic inbetween. - - * gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it - was ifdeffed out and wouldn't have done anything even if - enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't - have any effect any more anyway after all the changes GTK+ has - gone through in the last years. Remove some #if 0 code. - - * gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field - to NULL in case a GC is copied while it has a Windows DC active. - - * gdk/win32/gdkprivate-win32.h - * gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc. - Add mask_blt that points to MaskBlt() if available. - - * gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc - option. Check if MaskBlt() is available. If there is a - PRETEND_WIN9X envvar, set windows_version as if on Win9x. - - * gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new, - gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't - used or exported. Make a bit more like the X11 version. Hopefully - I didn't break the fragile palettized display ("pseudocolor") - code. - 2002-11-13 Christopher James Lahey * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref @@ -283,89 +218,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld * gdk/win32/gdkprivate-win32.h: Declare new functions. -2002-11-12 Tor Lillqvist - - More work on the Win32 backend. The scrolling problem diagnosis - from 2002-11-07 was wrong, even if the cure happened to work. The - problems were not caused by a lack of WM_PAINT messages while - scrolling. The real issue was that SetWindowPos() and - ScrollWindowEx() don't blit those parts of the window they think - are invalid. As we didn't keep Windows's update region in synch - with GDK's, Windows thought those areas that in fact had been - updated were invalid. Calling ValidateRgn() in - _gdk_windowing_window_queue_antiexpose() seems to be an elegant - and efficient solution, removing from Windows's update region - those areas we are about to repaint proactively. - - In some cases garbage leftover values were used for the clip - origin in GdkGCWin32. This showed up as odd blank areas around the - pixmaps included in the Text Widget in gtk-demo. - - Having the clip region either as a GdkRegion or a HRGN in - GdkGCWin32 was unnecessary, it's better to just use a HRGN. - - The translation and antiexpose queue handling in - gdkgeometry-win32.c seems unnecessary (and not implementable in - the same way as on X11 anyway, no serial numbers) on Windows, - ifdeffed out. - - All of testgtk and gtk-demo except "big windows" now seem to work - pretty well. - - Bug #79720 should be fixed now. - - * gdk/win32/gdkevents-win32.c (gdk_event_translate) In WM_PAINT - handler: Don't check for empty update rect. When we get a - WM_PAINT, the update region isn't empty. And if it for some - strange reason is, that will be handled later anyway. Don't leak - hrgn. - - * gdk/win32/gdkgc-win32.c: Set clip origins to zero - when appropriate. - - (gdk_gc_copy): Increase refcount on colormap if present. - - (gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple, - combine it with clip region after selecting into the DC. - - (_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region. - - (_gdk_win3_gdkregion_to_hrgn): New function, code snippet - extracted from gdk_win32_hdc_get(). - - * gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue - handling. - - (gdk_window_copy_area_scroll): Increase clipRect to avoid - ScrollWindowEx() not scrolling pixels it thinks are invalid. - Don't call UpdateWindow(). - - (_gdk_window_move_resize_child): Don't call UpdateWindow(). - - (gdk_window_premove, gdk_window_postmove, - gdk_window_clip_changed): Add debugging output. - - (_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn() - on the region. - - (_gdk_window_process_expose): No use for the serial number - parameter now. Instead of a rectangle, take a region parameter, as - Windows gives us one in WM_PAINT. - - * gdk/win32/gdkmain-win32.c (gdk_win32_rect_to_string, - gdk_win32_gdkrectangle_to_string, gdk_win32_gdkregion_to_string): - New debugging functions. - - * gdk/win32/*.c: Use above functions. - - * gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory - leak, free list after use. - - * gdk/win32/gdkprivate-win32.h: Drop the clip_region field from - GdkGCWin32. Only use the HRGN hcliprgn. Declare new functions. - - * gdk/win32/rc/gdk.rc.in: Update copyright year. - 2002-11-10 Matthias Clasen * gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index ba36279e8c..c4fb770dc5 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Tue Dec 3 17:47:24 2002 Owen Taylor + + * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong + sign for queued translation. (Found by Chris Blizzard, + #100274) + 2002-12-01 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak @@ -181,77 +187,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld always returns failure on Win9x. Instead, call MaskBlt() only if we are on NT/2k/XP. -2002-11-14 Tor Lillqvist - - Start implementing all fill styles (i.e. tiled, stippled, and - opaque stippled in addition to the plain solid style) in the Win32 - backend in an elegant and generic way. For now only did the - draw_rectangle() and draw_glyphs() methods. The rest will - follow. Previously some of the drawing methods implemented opaque - stippling, but not tiles or non-opaque stippling. - - Seems to work fine, now the check marks show up in check buttons, - the stippled background and stippled text in gtk-demo's Text - Widget look as they should, and GtkText's line wrap arrow shows - correctly instead of an ugly rectangle. - - The implementation does do a lot of pixmap handling and blitting - back and forth, especially on Win9x. But performance is hopefully - not an issue. I don't think many applications do a lot of tiled or - stippled drawing. - - * gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that - calls a GDI function and prints a warning if it failed. Also - API_CALL for non-GDI calls. Cleans all the the if (!BlaBla()) - WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written - GDI_CALL (BlaBla, ()). - - * gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places. - - (generic_draw): New function that handles all the blitting - necessary to implement tiles and stipples. A function that - actually draws stuff is passed as a parameter to - generic_draw(). If the fill style is solid, it is called - directly, to draw on the destination drawable. Otherwise it is - called to draw on a temporary mask bitmap, which then is used in - blitting operations. The tiles and/or stipples are rendered into - another temporary pixmap. If MaskBlt() is available (on NT/2k/XP), - it is used, otherwise a sequence of BitBlt() is used to do the - final composition onto the destination drawable. - - (draw_tiles_lowlevel, draw_tiles): Some renaming and code - reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable(). - - (rop2_to_rop3): Instead of bitblt_wrapper, this function does the - binary->ternary rop mapping. - - (draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs, - gdk_win32_draw_glyphs): Split functionality into two functions, - with generic_draw() doing its magic inbetween. - - * gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it - was ifdeffed out and wouldn't have done anything even if - enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't - have any effect any more anyway after all the changes GTK+ has - gone through in the last years. Remove some #if 0 code. - - * gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field - to NULL in case a GC is copied while it has a Windows DC active. - - * gdk/win32/gdkprivate-win32.h - * gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc. - Add mask_blt that points to MaskBlt() if available. - - * gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc - option. Check if MaskBlt() is available. If there is a - PRETEND_WIN9X envvar, set windows_version as if on Win9x. - - * gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new, - gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't - used or exported. Make a bit more like the X11 version. Hopefully - I didn't break the fragile palettized display ("pseudocolor") - code. - 2002-11-13 Christopher James Lahey * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref @@ -283,89 +218,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld * gdk/win32/gdkprivate-win32.h: Declare new functions. -2002-11-12 Tor Lillqvist - - More work on the Win32 backend. The scrolling problem diagnosis - from 2002-11-07 was wrong, even if the cure happened to work. The - problems were not caused by a lack of WM_PAINT messages while - scrolling. The real issue was that SetWindowPos() and - ScrollWindowEx() don't blit those parts of the window they think - are invalid. As we didn't keep Windows's update region in synch - with GDK's, Windows thought those areas that in fact had been - updated were invalid. Calling ValidateRgn() in - _gdk_windowing_window_queue_antiexpose() seems to be an elegant - and efficient solution, removing from Windows's update region - those areas we are about to repaint proactively. - - In some cases garbage leftover values were used for the clip - origin in GdkGCWin32. This showed up as odd blank areas around the - pixmaps included in the Text Widget in gtk-demo. - - Having the clip region either as a GdkRegion or a HRGN in - GdkGCWin32 was unnecessary, it's better to just use a HRGN. - - The translation and antiexpose queue handling in - gdkgeometry-win32.c seems unnecessary (and not implementable in - the same way as on X11 anyway, no serial numbers) on Windows, - ifdeffed out. - - All of testgtk and gtk-demo except "big windows" now seem to work - pretty well. - - Bug #79720 should be fixed now. - - * gdk/win32/gdkevents-win32.c (gdk_event_translate) In WM_PAINT - handler: Don't check for empty update rect. When we get a - WM_PAINT, the update region isn't empty. And if it for some - strange reason is, that will be handled later anyway. Don't leak - hrgn. - - * gdk/win32/gdkgc-win32.c: Set clip origins to zero - when appropriate. - - (gdk_gc_copy): Increase refcount on colormap if present. - - (gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple, - combine it with clip region after selecting into the DC. - - (_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region. - - (_gdk_win3_gdkregion_to_hrgn): New function, code snippet - extracted from gdk_win32_hdc_get(). - - * gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue - handling. - - (gdk_window_copy_area_scroll): Increase clipRect to avoid - ScrollWindowEx() not scrolling pixels it thinks are invalid. - Don't call UpdateWindow(). - - (_gdk_window_move_resize_child): Don't call UpdateWindow(). - - (gdk_window_premove, gdk_window_postmove, - gdk_window_clip_changed): Add debugging output. - - (_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn() - on the region. - - (_gdk_window_process_expose): No use for the serial number - parameter now. Instead of a rectangle, take a region parameter, as - Windows gives us one in WM_PAINT. - - * gdk/win32/gdkmain-win32.c (gdk_win32_rect_to_string, - gdk_win32_gdkrectangle_to_string, gdk_win32_gdkregion_to_string): - New debugging functions. - - * gdk/win32/*.c: Use above functions. - - * gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory - leak, free list after use. - - * gdk/win32/gdkprivate-win32.h: Drop the clip_region field from - GdkGCWin32. Only use the HRGN hcliprgn. Declare new functions. - - * gdk/win32/rc/gdk.rc.in: Update copyright year. - 2002-11-10 Matthias Clasen * gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ba36279e8c..c4fb770dc5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Tue Dec 3 17:47:24 2002 Owen Taylor + + * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong + sign for queued translation. (Found by Chris Blizzard, + #100274) + 2002-12-01 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak @@ -181,77 +187,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld always returns failure on Win9x. Instead, call MaskBlt() only if we are on NT/2k/XP. -2002-11-14 Tor Lillqvist - - Start implementing all fill styles (i.e. tiled, stippled, and - opaque stippled in addition to the plain solid style) in the Win32 - backend in an elegant and generic way. For now only did the - draw_rectangle() and draw_glyphs() methods. The rest will - follow. Previously some of the drawing methods implemented opaque - stippling, but not tiles or non-opaque stippling. - - Seems to work fine, now the check marks show up in check buttons, - the stippled background and stippled text in gtk-demo's Text - Widget look as they should, and GtkText's line wrap arrow shows - correctly instead of an ugly rectangle. - - The implementation does do a lot of pixmap handling and blitting - back and forth, especially on Win9x. But performance is hopefully - not an issue. I don't think many applications do a lot of tiled or - stippled drawing. - - * gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that - calls a GDI function and prints a warning if it failed. Also - API_CALL for non-GDI calls. Cleans all the the if (!BlaBla()) - WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written - GDI_CALL (BlaBla, ()). - - * gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places. - - (generic_draw): New function that handles all the blitting - necessary to implement tiles and stipples. A function that - actually draws stuff is passed as a parameter to - generic_draw(). If the fill style is solid, it is called - directly, to draw on the destination drawable. Otherwise it is - called to draw on a temporary mask bitmap, which then is used in - blitting operations. The tiles and/or stipples are rendered into - another temporary pixmap. If MaskBlt() is available (on NT/2k/XP), - it is used, otherwise a sequence of BitBlt() is used to do the - final composition onto the destination drawable. - - (draw_tiles_lowlevel, draw_tiles): Some renaming and code - reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable(). - - (rop2_to_rop3): Instead of bitblt_wrapper, this function does the - binary->ternary rop mapping. - - (draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs, - gdk_win32_draw_glyphs): Split functionality into two functions, - with generic_draw() doing its magic inbetween. - - * gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it - was ifdeffed out and wouldn't have done anything even if - enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't - have any effect any more anyway after all the changes GTK+ has - gone through in the last years. Remove some #if 0 code. - - * gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field - to NULL in case a GC is copied while it has a Windows DC active. - - * gdk/win32/gdkprivate-win32.h - * gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc. - Add mask_blt that points to MaskBlt() if available. - - * gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc - option. Check if MaskBlt() is available. If there is a - PRETEND_WIN9X envvar, set windows_version as if on Win9x. - - * gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new, - gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't - used or exported. Make a bit more like the X11 version. Hopefully - I didn't break the fragile palettized display ("pseudocolor") - code. - 2002-11-13 Christopher James Lahey * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref @@ -283,89 +218,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld * gdk/win32/gdkprivate-win32.h: Declare new functions. -2002-11-12 Tor Lillqvist - - More work on the Win32 backend. The scrolling problem diagnosis - from 2002-11-07 was wrong, even if the cure happened to work. The - problems were not caused by a lack of WM_PAINT messages while - scrolling. The real issue was that SetWindowPos() and - ScrollWindowEx() don't blit those parts of the window they think - are invalid. As we didn't keep Windows's update region in synch - with GDK's, Windows thought those areas that in fact had been - updated were invalid. Calling ValidateRgn() in - _gdk_windowing_window_queue_antiexpose() seems to be an elegant - and efficient solution, removing from Windows's update region - those areas we are about to repaint proactively. - - In some cases garbage leftover values were used for the clip - origin in GdkGCWin32. This showed up as odd blank areas around the - pixmaps included in the Text Widget in gtk-demo. - - Having the clip region either as a GdkRegion or a HRGN in - GdkGCWin32 was unnecessary, it's better to just use a HRGN. - - The translation and antiexpose queue handling in - gdkgeometry-win32.c seems unnecessary (and not implementable in - the same way as on X11 anyway, no serial numbers) on Windows, - ifdeffed out. - - All of testgtk and gtk-demo except "big windows" now seem to work - pretty well. - - Bug #79720 should be fixed now. - - * gdk/win32/gdkevents-win32.c (gdk_event_translate) In WM_PAINT - handler: Don't check for empty update rect. When we get a - WM_PAINT, the update region isn't empty. And if it for some - strange reason is, that will be handled later anyway. Don't leak - hrgn. - - * gdk/win32/gdkgc-win32.c: Set clip origins to zero - when appropriate. - - (gdk_gc_copy): Increase refcount on colormap if present. - - (gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple, - combine it with clip region after selecting into the DC. - - (_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region. - - (_gdk_win3_gdkregion_to_hrgn): New function, code snippet - extracted from gdk_win32_hdc_get(). - - * gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue - handling. - - (gdk_window_copy_area_scroll): Increase clipRect to avoid - ScrollWindowEx() not scrolling pixels it thinks are invalid. - Don't call UpdateWindow(). - - (_gdk_window_move_resize_child): Don't call UpdateWindow(). - - (gdk_window_premove, gdk_window_postmove, - gdk_window_clip_changed): Add debugging output. - - (_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn() - on the region. - - (_gdk_window_process_expose): No use for the serial number - parameter now. Instead of a rectangle, take a region parameter, as - Windows gives us one in WM_PAINT. - - * gdk/win32/gdkmain-win32.c (gdk_win32_rect_to_string, - gdk_win32_gdkrectangle_to_string, gdk_win32_gdkregion_to_string): - New debugging functions. - - * gdk/win32/*.c: Use above functions. - - * gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory - leak, free list after use. - - * gdk/win32/gdkprivate-win32.h: Drop the clip_region field from - GdkGCWin32. Only use the HRGN hcliprgn. Declare new functions. - - * gdk/win32/rc/gdk.rc.in: Update copyright year. - 2002-11-10 Matthias Clasen * gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ba36279e8c..c4fb770dc5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Tue Dec 3 17:47:24 2002 Owen Taylor + + * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong + sign for queued translation. (Found by Chris Blizzard, + #100274) + 2002-12-01 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak @@ -181,77 +187,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld always returns failure on Win9x. Instead, call MaskBlt() only if we are on NT/2k/XP. -2002-11-14 Tor Lillqvist - - Start implementing all fill styles (i.e. tiled, stippled, and - opaque stippled in addition to the plain solid style) in the Win32 - backend in an elegant and generic way. For now only did the - draw_rectangle() and draw_glyphs() methods. The rest will - follow. Previously some of the drawing methods implemented opaque - stippling, but not tiles or non-opaque stippling. - - Seems to work fine, now the check marks show up in check buttons, - the stippled background and stippled text in gtk-demo's Text - Widget look as they should, and GtkText's line wrap arrow shows - correctly instead of an ugly rectangle. - - The implementation does do a lot of pixmap handling and blitting - back and forth, especially on Win9x. But performance is hopefully - not an issue. I don't think many applications do a lot of tiled or - stippled drawing. - - * gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that - calls a GDI function and prints a warning if it failed. Also - API_CALL for non-GDI calls. Cleans all the the if (!BlaBla()) - WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written - GDI_CALL (BlaBla, ()). - - * gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places. - - (generic_draw): New function that handles all the blitting - necessary to implement tiles and stipples. A function that - actually draws stuff is passed as a parameter to - generic_draw(). If the fill style is solid, it is called - directly, to draw on the destination drawable. Otherwise it is - called to draw on a temporary mask bitmap, which then is used in - blitting operations. The tiles and/or stipples are rendered into - another temporary pixmap. If MaskBlt() is available (on NT/2k/XP), - it is used, otherwise a sequence of BitBlt() is used to do the - final composition onto the destination drawable. - - (draw_tiles_lowlevel, draw_tiles): Some renaming and code - reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable(). - - (rop2_to_rop3): Instead of bitblt_wrapper, this function does the - binary->ternary rop mapping. - - (draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs, - gdk_win32_draw_glyphs): Split functionality into two functions, - with generic_draw() doing its magic inbetween. - - * gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it - was ifdeffed out and wouldn't have done anything even if - enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't - have any effect any more anyway after all the changes GTK+ has - gone through in the last years. Remove some #if 0 code. - - * gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field - to NULL in case a GC is copied while it has a Windows DC active. - - * gdk/win32/gdkprivate-win32.h - * gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc. - Add mask_blt that points to MaskBlt() if available. - - * gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc - option. Check if MaskBlt() is available. If there is a - PRETEND_WIN9X envvar, set windows_version as if on Win9x. - - * gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new, - gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't - used or exported. Make a bit more like the X11 version. Hopefully - I didn't break the fragile palettized display ("pseudocolor") - code. - 2002-11-13 Christopher James Lahey * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref @@ -283,89 +218,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld * gdk/win32/gdkprivate-win32.h: Declare new functions. -2002-11-12 Tor Lillqvist - - More work on the Win32 backend. The scrolling problem diagnosis - from 2002-11-07 was wrong, even if the cure happened to work. The - problems were not caused by a lack of WM_PAINT messages while - scrolling. The real issue was that SetWindowPos() and - ScrollWindowEx() don't blit those parts of the window they think - are invalid. As we didn't keep Windows's update region in synch - with GDK's, Windows thought those areas that in fact had been - updated were invalid. Calling ValidateRgn() in - _gdk_windowing_window_queue_antiexpose() seems to be an elegant - and efficient solution, removing from Windows's update region - those areas we are about to repaint proactively. - - In some cases garbage leftover values were used for the clip - origin in GdkGCWin32. This showed up as odd blank areas around the - pixmaps included in the Text Widget in gtk-demo. - - Having the clip region either as a GdkRegion or a HRGN in - GdkGCWin32 was unnecessary, it's better to just use a HRGN. - - The translation and antiexpose queue handling in - gdkgeometry-win32.c seems unnecessary (and not implementable in - the same way as on X11 anyway, no serial numbers) on Windows, - ifdeffed out. - - All of testgtk and gtk-demo except "big windows" now seem to work - pretty well. - - Bug #79720 should be fixed now. - - * gdk/win32/gdkevents-win32.c (gdk_event_translate) In WM_PAINT - handler: Don't check for empty update rect. When we get a - WM_PAINT, the update region isn't empty. And if it for some - strange reason is, that will be handled later anyway. Don't leak - hrgn. - - * gdk/win32/gdkgc-win32.c: Set clip origins to zero - when appropriate. - - (gdk_gc_copy): Increase refcount on colormap if present. - - (gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple, - combine it with clip region after selecting into the DC. - - (_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region. - - (_gdk_win3_gdkregion_to_hrgn): New function, code snippet - extracted from gdk_win32_hdc_get(). - - * gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue - handling. - - (gdk_window_copy_area_scroll): Increase clipRect to avoid - ScrollWindowEx() not scrolling pixels it thinks are invalid. - Don't call UpdateWindow(). - - (_gdk_window_move_resize_child): Don't call UpdateWindow(). - - (gdk_window_premove, gdk_window_postmove, - gdk_window_clip_changed): Add debugging output. - - (_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn() - on the region. - - (_gdk_window_process_expose): No use for the serial number - parameter now. Instead of a rectangle, take a region parameter, as - Windows gives us one in WM_PAINT. - - * gdk/win32/gdkmain-win32.c (gdk_win32_rect_to_string, - gdk_win32_gdkrectangle_to_string, gdk_win32_gdkregion_to_string): - New debugging functions. - - * gdk/win32/*.c: Use above functions. - - * gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory - leak, free list after use. - - * gdk/win32/gdkprivate-win32.h: Drop the clip_region field from - GdkGCWin32. Only use the HRGN hcliprgn. Declare new functions. - - * gdk/win32/rc/gdk.rc.in: Update copyright year. - 2002-11-10 Matthias Clasen * gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ba36279e8c..c4fb770dc5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Tue Dec 3 17:47:24 2002 Owen Taylor + + * gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong + sign for queued translation. (Found by Chris Blizzard, + #100274) + 2002-12-01 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak @@ -181,77 +187,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld always returns failure on Win9x. Instead, call MaskBlt() only if we are on NT/2k/XP. -2002-11-14 Tor Lillqvist - - Start implementing all fill styles (i.e. tiled, stippled, and - opaque stippled in addition to the plain solid style) in the Win32 - backend in an elegant and generic way. For now only did the - draw_rectangle() and draw_glyphs() methods. The rest will - follow. Previously some of the drawing methods implemented opaque - stippling, but not tiles or non-opaque stippling. - - Seems to work fine, now the check marks show up in check buttons, - the stippled background and stippled text in gtk-demo's Text - Widget look as they should, and GtkText's line wrap arrow shows - correctly instead of an ugly rectangle. - - The implementation does do a lot of pixmap handling and blitting - back and forth, especially on Win9x. But performance is hopefully - not an issue. I don't think many applications do a lot of tiled or - stippled drawing. - - * gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that - calls a GDI function and prints a warning if it failed. Also - API_CALL for non-GDI calls. Cleans all the the if (!BlaBla()) - WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written - GDI_CALL (BlaBla, ()). - - * gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places. - - (generic_draw): New function that handles all the blitting - necessary to implement tiles and stipples. A function that - actually draws stuff is passed as a parameter to - generic_draw(). If the fill style is solid, it is called - directly, to draw on the destination drawable. Otherwise it is - called to draw on a temporary mask bitmap, which then is used in - blitting operations. The tiles and/or stipples are rendered into - another temporary pixmap. If MaskBlt() is available (on NT/2k/XP), - it is used, otherwise a sequence of BitBlt() is used to do the - final composition onto the destination drawable. - - (draw_tiles_lowlevel, draw_tiles): Some renaming and code - reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable(). - - (rop2_to_rop3): Instead of bitblt_wrapper, this function does the - binary->ternary rop mapping. - - (draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs, - gdk_win32_draw_glyphs): Split functionality into two functions, - with generic_draw() doing its magic inbetween. - - * gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it - was ifdeffed out and wouldn't have done anything even if - enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't - have any effect any more anyway after all the changes GTK+ has - gone through in the last years. Remove some #if 0 code. - - * gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field - to NULL in case a GC is copied while it has a Windows DC active. - - * gdk/win32/gdkprivate-win32.h - * gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc. - Add mask_blt that points to MaskBlt() if available. - - * gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc - option. Check if MaskBlt() is available. If there is a - PRETEND_WIN9X envvar, set windows_version as if on Win9x. - - * gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new, - gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't - used or exported. Make a bit more like the X11 version. Hopefully - I didn't break the fragile palettized display ("pseudocolor") - code. - 2002-11-13 Christopher James Lahey * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref @@ -283,89 +218,6 @@ Wed Nov 20 19:42:57 2002 Kristian Rietveld * gdk/win32/gdkprivate-win32.h: Declare new functions. -2002-11-12 Tor Lillqvist - - More work on the Win32 backend. The scrolling problem diagnosis - from 2002-11-07 was wrong, even if the cure happened to work. The - problems were not caused by a lack of WM_PAINT messages while - scrolling. The real issue was that SetWindowPos() and - ScrollWindowEx() don't blit those parts of the window they think - are invalid. As we didn't keep Windows's update region in synch - with GDK's, Windows thought those areas that in fact had been - updated were invalid. Calling ValidateRgn() in - _gdk_windowing_window_queue_antiexpose() seems to be an elegant - and efficient solution, removing from Windows's update region - those areas we are about to repaint proactively. - - In some cases garbage leftover values were used for the clip - origin in GdkGCWin32. This showed up as odd blank areas around the - pixmaps included in the Text Widget in gtk-demo. - - Having the clip region either as a GdkRegion or a HRGN in - GdkGCWin32 was unnecessary, it's better to just use a HRGN. - - The translation and antiexpose queue handling in - gdkgeometry-win32.c seems unnecessary (and not implementable in - the same way as on X11 anyway, no serial numbers) on Windows, - ifdeffed out. - - All of testgtk and gtk-demo except "big windows" now seem to work - pretty well. - - Bug #79720 should be fixed now. - - * gdk/win32/gdkevents-win32.c (gdk_event_translate) In WM_PAINT - handler: Don't check for empty update rect. When we get a - WM_PAINT, the update region isn't empty. And if it for some - strange reason is, that will be handled later anyway. Don't leak - hrgn. - - * gdk/win32/gdkgc-win32.c: Set clip origins to zero - when appropriate. - - (gdk_gc_copy): Increase refcount on colormap if present. - - (gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple, - combine it with clip region after selecting into the DC. - - (_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region. - - (_gdk_win3_gdkregion_to_hrgn): New function, code snippet - extracted from gdk_win32_hdc_get(). - - * gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue - handling. - - (gdk_window_copy_area_scroll): Increase clipRect to avoid - ScrollWindowEx() not scrolling pixels it thinks are invalid. - Don't call UpdateWindow(). - - (_gdk_window_move_resize_child): Don't call UpdateWindow(). - - (gdk_window_premove, gdk_window_postmove, - gdk_window_clip_changed): Add debugging output. - - (_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn() - on the region. - - (_gdk_window_process_expose): No use for the serial number - parameter now. Instead of a rectangle, take a region parameter, as - Windows gives us one in WM_PAINT. - - * gdk/win32/gdkmain-win32.c (gdk_win32_rect_to_string, - gdk_win32_gdkrectangle_to_string, gdk_win32_gdkregion_to_string): - New debugging functions. - - * gdk/win32/*.c: Use above functions. - - * gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory - leak, free list after use. - - * gdk/win32/gdkprivate-win32.h: Drop the clip_region field from - GdkGCWin32. Only use the HRGN hcliprgn. Declare new functions. - - * gdk/win32/rc/gdk.rc.in: Update copyright year. - 2002-11-10 Matthias Clasen * gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c index 7859c8633b..56a6b0eaf2 100644 --- a/gdk/x11/gdkgeometry-x11.c +++ b/gdk/x11/gdkgeometry-x11.c @@ -331,8 +331,8 @@ gdk_window_guffaw_scroll (GdkWindow *window, gdk_window_tmp_unset_bg (window); - if (d_xoffset < 0 || d_yoffset < 0) - gdk_window_queue_translation (window, MIN (d_xoffset, 0), MIN (d_yoffset, 0)); + if (dx > 0 || dy > 0) + gdk_window_queue_translation (window, MAX (dx, 0), MAX (dy, 0)); gdk_window_set_static_gravities (window, TRUE); @@ -357,8 +357,8 @@ gdk_window_guffaw_scroll (GdkWindow *window, GDK_WINDOW_XID (window), new_position.x - d_xoffset, new_position.y - d_yoffset); - if (d_xoffset > 0 || d_yoffset > 0) - gdk_window_queue_translation (window, MAX (d_xoffset, 0), MAX (d_yoffset, 0)); + if (dx < 0 || dy < 0) + gdk_window_queue_translation (window, MIN (dx, 0), MIN (dy, 0)); XMoveResizeWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window),