[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-86-g630ef6b
ticho at claws-mail.org
ticho at claws-mail.org
Thu Feb 15 23:14:51 CET 2018
The branch, gtk3 has been updated
via 630ef6bb12fce6716ebe5f84a1712e33481a5b9b (commit)
from 9d818b9d27d0c64dc6d02be18408daa13ab454f4 (commit)
Summary of changes:
src/gtk/gtkcmclist.c | 17 +++++++++++++++++
src/gtk/gtkcmctree.c | 12 ++++++++++++
src/gtk/gtksctree.c | 4 ++++
3 files changed, 33 insertions(+)
- Log -----------------------------------------------------------------
commit 630ef6bb12fce6716ebe5f84a1712e33481a5b9b
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Thu Feb 15 23:12:15 2018 +0100
Revert "Remove low-level grab handling from GtkCMC widgets, they aren't needed."
This reverts commit 44a06b793270ab026289759ae56ffa3a76a54a53.
Oops, it is still needed.
diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index 81f8c78..0160713 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -2040,6 +2040,9 @@ abort_column_resize (GtkCMCList *clist)
return;
GTK_CMCLIST_UNSET_FLAG (clist, CMCLIST_IN_DRAG);
+ gtk_grab_remove (GTK_WIDGET (clist));
+ gdk_display_pointer_ungrab (gtk_widget_get_display (GTK_WIDGET (clist)),
+ GDK_CURRENT_TIME);
clist->drag_pos = -1;
if (clist->x_drag >= 0 && clist->x_drag <= clist->clist_window_width - 1)
@@ -5073,6 +5076,8 @@ gtk_cmclist_button_press (GtkWidget *widget,
if (gdk_pointer_grab (clist->clist_window, FALSE, mask,
NULL, NULL, event->time))
return FALSE;
+ gtk_grab_add (widget);
+
clist->click_cell.row = row;
clist->click_cell.column = column;
clist->drag_button = event->button;
@@ -5214,6 +5219,7 @@ gtk_cmclist_button_press (GtkWidget *widget,
NULL, NULL, event->time))
return FALSE;
+ gtk_grab_add (widget);
GTK_CMCLIST_SET_FLAG (clist, CMCLIST_IN_DRAG);
/* block attached dnd signal handler */
@@ -5270,6 +5276,8 @@ gtk_cmclist_button_release (GtkWidget *widget,
GTK_CMCLIST_UNSET_FLAG (clist, CMCLIST_IN_DRAG);
gtk_widget_get_pointer (widget, &x, NULL);
+ gtk_grab_remove (widget);
+ gdk_display_pointer_ungrab (gtk_widget_get_display (widget), event->time);
if (clist->x_drag >= 0)
clist_refresh(clist);
@@ -7220,6 +7228,15 @@ remove_grab (GtkCMCList *clist)
{
GtkWidget *widget = GTK_WIDGET (clist);
+ if (gtk_widget_has_grab (widget))
+ {
+ GdkDisplay *display = gtk_widget_get_display (widget);
+
+ gtk_grab_remove (widget);
+ if (gtkut_pointer_is_grabbed (widget))
+ gdk_display_pointer_ungrab (display, GDK_CURRENT_TIME);
+ }
+
if (clist->htimer)
{
g_source_remove (clist->htimer);
diff --git a/src/gtk/gtkcmctree.c b/src/gtk/gtkcmctree.c
index 513fdb1..f620d87 100644
--- a/src/gtk/gtkcmctree.c
+++ b/src/gtk/gtkcmctree.c
@@ -1878,6 +1878,10 @@ change_focus_row_expansion (GtkCMCTree *ctree,
clist = GTK_CMCLIST (ctree);
+ if (gtkut_pointer_is_grabbed (GTK_WIDGET (ctree)) &&
+ gtk_widget_has_grab (GTK_WIDGET(ctree)))
+ return;
+
if (!(node =
GTK_CMCTREE_NODE (g_list_nth (clist->row_list, clist->focus_row))) ||
GTK_CMCTREE_ROW (node)->is_leaf || !(GTK_CMCTREE_ROW (node)->children))
@@ -4104,6 +4108,14 @@ gtk_cmctree_node_set_shift (GtkCMCTree *ctree,
static void
remove_grab (GtkCMCList *clist)
{
+ if (gtkut_pointer_is_grabbed (GTK_WIDGET (clist)) &&
+ gtk_widget_has_grab (GTK_WIDGET(clist)))
+ {
+ gtk_grab_remove (GTK_WIDGET (clist));
+ gdk_display_pointer_ungrab (gtk_widget_get_display (GTK_WIDGET (clist)),
+ GDK_CURRENT_TIME);
+ }
+
if (clist->htimer)
{
g_source_remove (clist->htimer);
diff --git a/src/gtk/gtksctree.c b/src/gtk/gtksctree.c
index 0b36ab2..58426f9 100644
--- a/src/gtk/gtksctree.c
+++ b/src/gtk/gtksctree.c
@@ -163,6 +163,10 @@ gtk_sctree_change_focus_row_expansion (GtkCMCTree *ctree,
clist = GTK_CMCLIST (ctree);
+ if (gtkut_pointer_is_grabbed (GTK_WIDGET (ctree)) &&
+ gtk_widget_has_grab (GTK_WIDGET(ctree)))
+ return;
+
if (!(node =
GTK_CMCTREE_NODE (g_list_nth (clist->row_list, clist->focus_row))) ||
GTK_CMCTREE_ROW (node)->is_leaf || !(GTK_CMCTREE_ROW (node)->children))
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list