Mercurial > pidgin.yaz
changeset 13469:689f652480f7
[gaim-migrate @ 15845]
For cursor setting, it's the widget's window being NULL that's the problem. Passing in a NULL widget wouldn't make any sense. So, I've clarified the checks here. This fixes a couple assertion failure regressions.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 08 Mar 2006 22:03:22 +0000 |
parents | e4aa2648ca28 |
children | f5bc36ecf8d0 |
files | src/gtkutils.c src/gtkutils.h |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkutils.c Wed Mar 08 21:37:43 2006 +0000 +++ b/src/gtkutils.c Wed Mar 08 22:03:22 2006 +0000 @@ -2184,7 +2184,8 @@ { GdkCursor *cursor; - if (widget == NULL) + g_return_if_fail(widget != NULL); + if (widget->window == NULL) return; cursor = gdk_cursor_new(GDK_WATCH); @@ -2200,7 +2201,8 @@ void gaim_gtk_clear_cursor(GtkWidget *widget) { - if (widget == NULL) + g_return_if_fail(widget != NULL); + if (widget->window == NULL) return; gdk_window_set_cursor(widget->window, NULL);
--- a/src/gtkutils.h Wed Mar 08 21:37:43 2006 +0000 +++ b/src/gtkutils.h Wed Mar 08 22:03:22 2006 +0000 @@ -444,7 +444,7 @@ * After setting the cursor, the display is flushed, so the change will * take effect immediately. * - * If @a widget is @c NULL, this function simply returns. + * If the window for @a widget is @c NULL, this function simply returns. * * @param widget The widget for which to set the mouse pointer * @param cursor_type The type of cursor to set @@ -456,7 +456,7 @@ * * If @a widget is @c NULL, this function simply returns. * - * @param widget The widget for which to clear the cursor + * If the window for @a widget is @c NULL, this function simply returns. * * @note The display is not flushed from this function. */