File window-Disable-window-dragging-on-phones.patch of Package gtk3

From: Alexander Mikhaylenko <alexander.mikhaylenko@puri.sm>
Date: Wed, 4 Nov 2020 19:22:32 +0500
Subject: window: Disable window dragging on phones

See https://gitlab.gnome.org/GNOME/gtk/-/issues/3321

The issue does not seem to be fixable in GTK3 without breaking the API in
process, so do the minimum we can.

Fixes https://source.puri.sm/Librem5/debs/gtk/-/issues/19
Fixes https://source.puri.sm/Librem5/debs/gtk/-/issues/21
---
 gtk/gtkwindow.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d7f8e26..6025385 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1589,6 +1589,12 @@ drag_gesture_begin_cb (GtkGestureDrag *gesture,
 
   region = get_active_region_type (window, (GdkEventAny*) event, x, y);
 
+  if (_gtk_get_is_phone ())
+    {
+      gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
+      return;
+    }
+
   switch (region)
     {
       case GTK_WINDOW_REGION_TITLE:
openSUSE Build Service is sponsored by