[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-81-g159dafa

ticho at claws-mail.org ticho at claws-mail.org
Thu Feb 15 17:57:07 CET 2018


The branch, gtk3 has been updated
       via  159dafab379452a4495a852939c38e69feae3f2e (commit)
      from  8e5c94378aeea4b2863407a3f4dcfaf389280e8b (commit)

Summary of changes:
 src/gtk/gtkcmclist.c |    8 ++++----
 src/gtk/gtkcmctree.c |    4 ++--
 src/gtk/gtksctree.c  |    2 +-
 src/gtk/gtkutils.c   |   13 +++++++++++++
 src/gtk/gtkutils.h   |    2 ++
 5 files changed, 22 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 159dafab379452a4495a852939c38e69feae3f2e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Feb 15 17:56:44 2018 +0100

    Get rid of deprecated gdk_display_pointer_is_grabbed().

diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index d0a94ae..0160713 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -3769,7 +3769,7 @@ static gboolean
 clist_has_grab (GtkCMCList *clist)
 {
   return (gtk_widget_has_grab (GTK_WIDGET(clist)) &&
-	  gdk_display_pointer_is_grabbed (gtk_widget_get_display (GTK_WIDGET (clist))));
+	  gtkut_pointer_is_grabbed(GTK_WIDGET(clist)));
 }
 
 static void
@@ -4422,7 +4422,7 @@ end_selection (GtkCMCList *clist)
 {
   cm_return_if_fail (GTK_IS_CMCLIST (clist));
 
-  if (gdk_display_pointer_is_grabbed (gtk_widget_get_display (GTK_WIDGET (clist))) &&
+  if (gtkut_pointer_is_grabbed (GTK_WIDGET (clist)) &&
       gtk_widget_has_focus (GTK_WIDGET(clist)))
     return;
 
@@ -7233,7 +7233,7 @@ remove_grab (GtkCMCList *clist)
       GdkDisplay *display = gtk_widget_get_display (widget);
       
       gtk_grab_remove (widget);
-      if (gdk_display_pointer_is_grabbed (display))
+      if (gtkut_pointer_is_grabbed (widget))
 	gdk_display_pointer_ungrab (display, GDK_CURRENT_TIME);
     }
 
@@ -7898,7 +7898,7 @@ gtk_cmclist_set_button_actions (GtkCMCList *clist,
   
   if (button < MAX_BUTTON)
     {
-      if (gdk_display_pointer_is_grabbed (gtk_widget_get_display (GTK_WIDGET (clist))) || 
+      if (gtkut_pointer_is_grabbed (GTK_WIDGET(clist)) || 
 	  gtk_widget_has_grab (GTK_WIDGET(clist)))
 	{
 	  remove_grab (clist);
diff --git a/src/gtk/gtkcmctree.c b/src/gtk/gtkcmctree.c
index 0046b38..f620d87 100644
--- a/src/gtk/gtkcmctree.c
+++ b/src/gtk/gtkcmctree.c
@@ -1878,7 +1878,7 @@ change_focus_row_expansion (GtkCMCTree          *ctree,
 
   clist = GTK_CMCLIST (ctree);
 
-  if (gdk_display_pointer_is_grabbed (gtk_widget_get_display (GTK_WIDGET (ctree))) && 
+  if (gtkut_pointer_is_grabbed (GTK_WIDGET (ctree)) && 
       gtk_widget_has_grab (GTK_WIDGET(ctree)))
     return;
   
@@ -4108,7 +4108,7 @@ gtk_cmctree_node_set_shift (GtkCMCTree     *ctree,
 static void
 remove_grab (GtkCMCList *clist)
 {
-  if (gdk_display_pointer_is_grabbed (gtk_widget_get_display (GTK_WIDGET (clist))) && 
+  if (gtkut_pointer_is_grabbed (GTK_WIDGET (clist)) && 
       gtk_widget_has_grab (GTK_WIDGET(clist)))
     {
       gtk_grab_remove (GTK_WIDGET (clist));
diff --git a/src/gtk/gtksctree.c b/src/gtk/gtksctree.c
index 4519657..58426f9 100644
--- a/src/gtk/gtksctree.c
+++ b/src/gtk/gtksctree.c
@@ -163,7 +163,7 @@ gtk_sctree_change_focus_row_expansion (GtkCMCTree          *ctree,
 
   clist = GTK_CMCLIST (ctree);
 
-  if (gdk_display_pointer_is_grabbed (gtk_widget_get_display (GTK_WIDGET (ctree))) && 
+  if (gtkut_pointer_is_grabbed (GTK_WIDGET (ctree)) && 
       gtk_widget_has_grab (GTK_WIDGET(ctree)))
     return;
   
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 7aa5167..a628eda 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1987,3 +1987,16 @@ gboolean auto_configure_service_sync(const gchar *service, const gchar *domain,
 	return result;
 }
 #endif
+
+gboolean gtkut_pointer_is_grabbed(GtkWidget *widget)
+{
+	GdkDisplay *display;
+	GdkDevice *pointerdev;
+
+	cm_return_val_if_fail(widget != NULL, FALSE);
+
+	display = gtk_widget_get_display(widget);
+	pointerdev = gdk_seat_get_pointer(gdk_display_get_default_seat(display));
+
+	return gdk_display_device_is_grabbed(display, pointerdev);
+}
diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h
index ca9c0b9..47f040a 100644
--- a/src/gtk/gtkutils.h
+++ b/src/gtk/gtkutils.h
@@ -232,4 +232,6 @@ void auto_configure_service(AutoConfigureData *data);
 gboolean auto_configure_service_sync(const gchar *service, const gchar *domain, gchar **srvhost, guint16 *srvport);
 #endif
 
+gboolean gtkut_pointer_is_grabbed(GtkWidget *widget);
+
 #endif /* __GTKUTILS_H__ */

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list