[gtk+/client-side-windows] Simplify _gdk_display_get_last_pointer_grab using g_list_last
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows] Simplify _gdk_display_get_last_pointer_grab using g_list_last
- Date: Wed, 24 Jun 2009 19:18:30 +0000 (UTC)
commit ca06216f2087c82512b999d3c28b10dd264b4619
Author: Alexander Larsson <alexl redhat com>
Date: Wed Jun 24 20:20:33 2009 +0200
Simplify _gdk_display_get_last_pointer_grab using g_list_last
gdk/gdkdisplay.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index f6f9743..6589e15 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -749,15 +749,12 @@ _gdk_display_get_last_pointer_grab (GdkDisplay *display)
{
GList *l;
- l = display->pointer_grabs;
+ l = g_list_last (display->pointer_grabs);
if (l == NULL)
return NULL;
-
- while (l->next != NULL)
- l = l->next;
-
- return (GdkPointerGrabInfo *)l->data;
+ else
+ return (GdkPointerGrabInfo *)l->data;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]