[gtranslator] Use gdk_window_get_device_position
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Use gdk_window_get_device_position
- Date: Thu, 2 Feb 2012 13:48:51 +0000 (UTC)
commit c6e5949dd7a068d839c047096204b4d6eb70f333
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Feb 2 14:52:58 2012 +0100
Use gdk_window_get_device_position
src/gtr-context.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gtr-context.c b/src/gtr-context.c
index b554f55..e320021 100644
--- a/src/gtr-context.c
+++ b/src/gtr-context.c
@@ -200,9 +200,13 @@ static gboolean
visibility_notify_event (GtkWidget *text_view, GdkEventVisibility *event,
GtrContextPanel *panel)
{
+ GdkDeviceManager *device_manager;
+ GdkDevice *pointer;
gint wx, wy, bx, by;
- gdk_window_get_pointer (gtk_widget_get_window (text_view), &wx, &wy, NULL);
+ device_manager = gdk_display_get_device_manager (gtk_widget_get_display (text_view));
+ pointer = gdk_device_manager_get_client_pointer (device_manager);
+ gdk_window_get_device_position (gtk_widget_get_window (text_view), pointer, &wx, &wy, NULL);
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
GTK_TEXT_WINDOW_WIDGET,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]