If e.g. the right edge of the leftmost rectangle is near MIN_INT, and
the left edge of the rightmost rectangle is large then subtracting these
can lead to an integer overflow, making the resultant "width" falsely
positive, thus returning a very wide result instead of the expected
no-intersection result.
We avoid the overflow by not doing the subtraction unless we know the
result will be positive. There are still risks for overflow if x + width
or y + width is larger than MAXINT, but we won't ever overflow for valid
rects now.
This may fix#607687
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2007-09-06 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkrectangle.c (gdk_rectangle_intersect): Allow
dest to be NULL. (#464528, Xan Lopez)
svn path=/trunk/; revision=18742
2007-08-11 Björn Lindqvist <bjourne@gmail.com>
* gdk/gdkrectangle.c (gdk_rectangle_intersect): Note in docs
that @dest's width and height is set to 0, 0 if the rectangles
does not intersect. (#464524)
svn path=/trunk/; revision=18602
2006-05-28 Behdad Esfahbod <behdad@gnome.org>
* gdk/gdkrectangle.c (gdk_rectangle_union, gdk_rectangle_intersect):
Note in docs that @dest can be the same as @src1 or @src2. (#343233,
Christian Persch)
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
Mon Aug 9 15:41:17 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gdk/Makefile.am: Add rules to generate gdk.def and
gdkalias.h from gdk.symbols, and make make check check
the abi with abicheck.sh.
* gdk/gdk.symbols: New file. Definition of the GDK ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gdk/abicheck.sh: New file. Script to check the actually
symbols exported from libgdk-x11.2.0.so against the symbols
found in gdk.symbols.
* gdk/makegdkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h
2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
Fri Jun 1 11:31:55 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrectangle.c (gdk_rectangle_get_type): Add
GDK_TYPE_RECTANGLE.
* gtk/gtkwidget.c (gtk_widget_class_init): Fix type
of allocation argument be GDK_TYPE_RECTANGLE.
Thu Aug 3 09:17:06 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrectangle.c (gdk_rectangle_intersect): Applied patch from
Peter Osterlund to simplify the code while keeping the
functionality the same.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
updates the license headers to the GNU Lesser General Public License,
as well as updating the copyright year to 2000.
Fri Oct 1 18:03:36 1999 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.4.txt: Started
* gtk/Makefile.am (gdk_headers): Include all the new headers.
* gdk/*.h gdk/*.c: Split gdk.h into lots of itty-bitty little pieces.
* gdk/gdkprivate.h gdk/gdkcc.c: Moved GdkColorContext private
into C file.
* gdkinput.h gdkinputprivate.h - renamed the internal gdkinput
header to gdkinputprivate.h.
* gdk/gdk.h gdk/gdk.c: Removed gdk_time* functions which have been
unused since before 1.2.
gcc -mno-cygwin (egcs-1.1.2) on cygwin-b20.1.
* gdk/win32/makefile.cygwin gtk/makefile.cygwin: New files.
* config.h.win32: Changes for gcc.
* gdk/gdkrectangle.c: Include gdk.h as <gdk/gdk.h>.
* gdk/gdkcolor.c: config.h.win32 already defines strcasecmp.
* gdk/win32/gdkconfig.h: Only the MS compiler has wctype.h.
* gdk/win32/gdkdnd.c: Protect (unused) OLE2 stuff better.
Protect shl stuff unavaiilable with mingw32 headers.
* gdk/win32/gdkevents.c: Fix typo.
* gdk/win32/gdkglobals.c: Use GDKVAR here also for gcc.
* gdk/win32/gdkim.c: Use OEM code page for multibyte chars. (?)
* gdk/win32/gdkinput.c: Use __try __except only with the MS compiler.
* gdk/win32/gdkprivate.h: Make up for some stuff missing from
the mingw32 headers.
* gdk/win32/makefile.msc: Use latest Wintab kit and glib.
* gtk/gtkfilesel.c: Include <glib.h> early, to get stat->_stat
definition on Win32. Test for NATIVE_WIN32, not _MSC_VER.
* gtk/gtkfontsel.c: Protect CHARSET redefinition on Win32.
Test for NATIVE_WIN32, not _MSC_VER.
* gtk/gtkmain.c: No use warning about developer version on Win32,
there aren't any non-developer versions anyhow.
* gtk/gtkrc.c: Test for NATIVE_WIN32, not _MSC_VER.
* gtk/makefile.msc: Use pthread from another directory. Minor other
changes.
Wed Feb 10 08:35:36 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that
->value_buf always points to an allocated area.
(gtk_color_selection_drag_end): new function hooked up to drag_end to
destroy the drag_window.
* gtk/gtkdnd.c: some coding style fixups.
Wed Feb 10 06:47:17 1999 Tim Janik <timj@gtk.org>
* gdk/gdkwindow.c: various indentation fixes.
* gdk/gdkevents.c: coding style fixups.
NULL initialize event_func, event_notify and event_chunk.
(expose_predicate): made this function static.
(gdk_event_handler_set): perform destroy notification even if no
event_func is set.
* gdk/gdkrectangle.c (gdk_rectangle_union): added g_return_if_fail
statements.