After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 464847 - Allow null dest argument in gdk_rectangle_intersect
Allow null dest argument in gdk_rectangle_intersect
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-08-08 22:07 UTC by Behdad Esfahbod
Modified: 2008-01-11 17:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Behdad Esfahbod 2007-08-08 22:07:19 UTC
Xan Lopez wrote in bug 464528:

Probably this should go in a different bug, but while we are at it...
Recently I used gdk_rectangle_intersect just for its boolean return value
without being interested at all in the actual intersecting area, but it has a
g_return_val_if_fail (dest != NULL, FALSE), forcing you to pass a dummy
variable. IMHO a NULL value should be allowed for dest.
Comment 1 Behdad Esfahbod 2007-08-08 22:07:46 UTC
Attachment 93308 [details] has his patch.
Comment 2 Behdad Esfahbod 2007-08-08 22:09:19 UTC
And he was unhappy about being stuck at 14 points...
Comment 3 Matthias Clasen 2007-08-08 22:20:38 UTC
The idea makes sense to me, and the patch looks fine.
Comment 4 Behdad Esfahbod 2007-08-08 23:07:56 UTC
Hum, should we mark these kind of relaxations / slight changes in docs?  Say "as of 2.x, @dest can be %NULL"...
Comment 5 Xan Lopez 2007-08-20 18:00:21 UTC
Should I add the extra note before committing then?
Comment 6 Behdad Esfahbod 2008-01-11 17:52:44 UTC
2007-09-06  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkrectangle.c (gdk_rectangle_intersect): Allow
        dest to be NULL.  (#464528, Xan Lopez)