[gtk+/broadway: 38/71] [broadway] Track last mouse position



commit 93fec05183017f6bf482152c1b06b18bbc009487
Author: Alexander Larsson <alexl redhat com>
Date:   Sun Nov 21 20:45:50 2010 +0100

    [broadway] Track last mouse position

 gdk/broadway/gdkdisplay-broadway.c |    4 ++++
 gdk/broadway/gdkdisplay-broadway.h |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index 6a39217..5a59993 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -211,6 +211,8 @@ got_input (GInputStream *stream,
     y = strtol(p, &p, 10);
     p++; /* Skip , */
     time = strtol(p, &p, 10);
+    display_broadway->last_x = x;
+    display_broadway->last_y = y;
 
     window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (id));
 
@@ -298,6 +300,8 @@ got_input (GInputStream *stream,
     button = strtol(p, &p, 10);
     p++; /* Skip , */
     time = strtol(p, &p, 10);
+    display_broadway->last_x = x;
+    display_broadway->last_y = y;
 
     window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (id));
 
diff --git a/gdk/broadway/gdkdisplay-broadway.h b/gdk/broadway/gdkdisplay-broadway.h
index a294cbe..c4c0056 100644
--- a/gdk/broadway/gdkdisplay-broadway.h
+++ b/gdk/broadway/gdkdisplay-broadway.h
@@ -53,6 +53,7 @@ struct _GdkDisplayBroadway
 
   GSource *event_source;
   GdkWindow *mouse_in_toplevel;
+  int last_x, last_y;
 
   gint grab_count;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]