[nautilus/wip/antoniof/gtk4-preparation-step-event-controllers: 25/46] list-view: Remove event window comparison
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-step-event-controllers: 25/46] list-view: Remove event window comparison
- Date: Mon, 16 Aug 2021 09:44:40 +0000 (UTC)
commit e99bea71a70e01c1c8c88cc8c7f419927a322e68
Author: António Fernandes <antoniof gnome org>
Date: Sun Aug 8 20:49:24 2021 +0100
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.
src/nautilus-list-view.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index cd5235225..352f2a93e 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -564,8 +564,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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]