[gtk+] widget: emit synthesized crossing event with correct device position
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: emit synthesized crossing event with correct device position
- Date: Mon, 27 Jan 2014 13:29:52 +0000 (UTC)
commit ed447eba08afc13103c4f269c47bddfaecfe528d
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Thu Jul 18 11:49:43 2013 +0100
widget: emit synthesized crossing event with correct device position
https://bugzilla.gnome.org/show_bug.cgi?id=704456
gtk/gtkwidget.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index f4246ac..0b2aac3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11893,8 +11893,15 @@ synth_crossing (GtkWidget *widget,
event->crossing.send_event = TRUE;
event->crossing.subwindow = g_object_ref (window);
event->crossing.time = GDK_CURRENT_TIME;
- event->crossing.x = event->crossing.y = 0;
- event->crossing.x_root = event->crossing.y_root = 0;
+ gdk_device_get_position_double (device,
+ NULL,
+ &event->crossing.x_root,
+ &event->crossing.y_root);
+ gdk_window_get_device_position_double (window,
+ device,
+ &event->crossing.x,
+ &event->crossing.y,
+ NULL);
event->crossing.mode = mode;
event->crossing.detail = detail;
event->crossing.focus = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]