summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2021-08-08 20:49:24 +0100
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2021-12-22 01:38:47 +0000
commitb27d55f40b60d36da9a0449190b306a180f37a00 (patch)
tree35130c42fbca83ece96172db2134a7aebb43257d
parentf9e76ba42b033d5ef4ce71c3a4931925a01b7917 (diff)
downloadnautilus-b27d55f40b60d36da9a0449190b306a180f37a00.tar.gz
list-view: Remove event window comparison
GdkWindow is an X11'ism that's gone in GTK4. If the event is not in the bin window, then it's in the header, So, we can check for clicks in the header using event coordinates instead.
-rw-r--r--src/nautilus-list-view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 12c7b8af5..cc8eb6f65 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -565,8 +565,8 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
- /* Remove after switching to GTK+ 4. */
- if (gdk_event_get_window (event) != gtk_tree_view_get_bin_window (tree_view))
+ /* Column headers lie above bin_window, hence negative y coordinate. */
+ if (bin_y < 0)
{
return;
}