From cc3b04057165478f41fbd5448dfb156e3aedf4ad Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 22 Jul 2024 10:21:18 -0700 Subject: [PATCH] apprt/gtk: get rid of forcing context menu for now We have escapes (shift) so lets see how that goes and compare to some other GTK apps first. --- src/apprt/gtk/Surface.zig | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index 390cf8c90..e6ec1e44a 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -1357,19 +1357,14 @@ fn gtkMouseDown( self.grabFocus(); } - // Allow forcing context menu to open with ctrl in apps that would normally consume the click - if (button == .right and mods.ctrl) { - self.showContextMenu(@floatCast(x), @floatCast(y)); - return; - } - const consumed = self.core_surface.mouseButtonCallback(.press, button, mods) catch |err| { log.err("error in key callback err={}", .{err}); return; }; - // If a right click isn't consumed, mouseButtonCallback selects the hovered word and returns false. - // We can use this to handle the context menu opening under normal scenarios. + // If a right click isn't consumed, mouseButtonCallback selects the hovered + // word and returns false. We can use this to handle the context menu + // opening under normal scenarios. if (!consumed and button == .right) { self.showContextMenu(@floatCast(x), @floatCast(y)); }