[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-80-g8e5c943

ticho at claws-mail.org ticho at claws-mail.org
Thu Feb 15 17:41:59 CET 2018


The branch, gtk3 has been updated
       via  8e5c94378aeea4b2863407a3f4dcfaf389280e8b (commit)
      from  2aefa8be7ec2146fa23d9faf64b08caa1bf70a0d (commit)

Summary of changes:
 src/gtk/about.c      |    2 --
 src/gtk/gtkcmclist.c |   11 +++++++++--
 src/textview.c       |    8 ++++++--
 3 files changed, 15 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 8e5c94378aeea4b2863407a3f4dcfaf389280e8b
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Feb 15 17:41:40 2018 +0100

    Get rid of deprecated gdk_window_get_pointer().

diff --git a/src/gtk/about.c b/src/gtk/about.c
index 582282a..5ad56a4 100644
--- a/src/gtk/about.c
+++ b/src/gtk/about.c
@@ -1005,8 +1005,6 @@ static gboolean about_textview_motion_notify(GtkWidget *widget,
 					GtkWidget *textview)
 {
 	about_textview_uri_update(textview, event->x, event->y);
-	gdk_window_get_pointer(gtk_widget_get_window(widget), NULL, NULL, NULL);
-
 	return FALSE;
 }
 
diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index 604b77e..d0a94ae 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -5392,8 +5392,15 @@ gtk_cmclist_motion (GtkWidget      *widget,
 	}
     }
 
-  if (event->is_hint || event->window != clist->clist_window)
-    gdk_window_get_pointer (clist->clist_window, &x, &y, NULL);
+  if (event->is_hint || event->window != clist->clist_window) {
+		GdkDisplay *display;
+		GdkSeat *seat;
+
+		display = gdk_window_get_display(event->window);
+		seat = gdk_display_get_default_seat(display);
+		gdk_device_get_position(gdk_seat_get_pointer(seat),
+				NULL, &x, &y);
+    }
   else
     {
       x = event->x;
diff --git a/src/textview.c b/src/textview.c
index 52030ad..e652a5e 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -2441,7 +2441,6 @@ static gboolean textview_motion_notify(GtkWidget *widget,
 	if (textview->loading)
 		return FALSE;
 	textview_uri_update(textview, event->x, event->y);
-	gdk_window_get_pointer(gtk_widget_get_window(widget), NULL, NULL, NULL);
 
 	return FALSE;
 }
@@ -2463,6 +2462,8 @@ static gboolean textview_visibility_notify(GtkWidget *widget,
 {
 	gint wx, wy;
 	GdkWindow *window;
+	GdkDisplay *display;
+	GdkSeat *seat;
 
 	if (textview->loading)
 		return FALSE;
@@ -2474,7 +2475,10 @@ static gboolean textview_visibility_notify(GtkWidget *widget,
 	if (window != event->window)
 		return FALSE;
 	
-	gdk_window_get_pointer(gtk_widget_get_window(widget), &wx, &wy, NULL);
+	display = gdk_window_get_display(window);
+	seat = gdk_display_get_default_seat(display);
+	gdk_device_get_position(gdk_seat_get_pointer(seat),
+			NULL, &wx, &wy);
 	textview_uri_update(textview, wx, wy);
 
 	return FALSE;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list