[gimp/wip/Jehan/layers-dockable-refresh: 73/105] app: fix weird pointer behavior when clicking out of lock popover.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/layers-dockable-refresh: 73/105] app: fix weird pointer behavior when clicking out of lock popover.
- Date: Thu, 23 Dec 2021 00:44:35 +0000 (UTC)
commit 4471ca7ca32812fcfe6c3f17916ee30aa527572b
Author: Jehan <jehan girinstud io>
Date: Tue Jun 22 20:48:59 2021 +0200
app: fix weird pointer behavior when clicking out of lock popover.
It was like small drag'n drop were occuring, sometimes actually ending
up in moving layers or the like.
app/widgets/gimpitemtreeview.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c
index 9d995064bf..6876afaf49 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -1980,11 +1980,18 @@ gimp_item_tree_view_popover_button_press (GtkWidget *widget,
if (gtk_tree_path_compare (path, view->priv->lock_box_path) != 0 ||
column != gtk_tree_view_get_column (GIMP_CONTAINER_TREE_VIEW (view)->view, 1))
{
+ /* Propagate the press event to the tree view. */
new_event = gdk_event_copy (event);
g_object_unref (new_event->any.window);
new_event->any.window = g_object_ref (gtk_widget_get_window (GTK_WIDGET (tree_view->view)));
new_event->any.send_event = TRUE;
+ gtk_main_do_event (new_event);
+ /* Also immediately pass a release event at same position.
+ * Without this, we get weird pointer as though a quick drag'n
+ * drop occured.
+ */
+ new_event->type = GDK_BUTTON_RELEASE;
gtk_main_do_event (new_event);
gdk_event_free (new_event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]