mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
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.
This commit is contained in:
@ -1357,19 +1357,14 @@ fn gtkMouseDown(
|
|||||||
self.grabFocus();
|
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| {
|
const consumed = self.core_surface.mouseButtonCallback(.press, button, mods) catch |err| {
|
||||||
log.err("error in key callback err={}", .{err});
|
log.err("error in key callback err={}", .{err});
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
// If a right click isn't consumed, mouseButtonCallback selects the hovered word and returns false.
|
// If a right click isn't consumed, mouseButtonCallback selects the hovered
|
||||||
// We can use this to handle the context menu opening under normal scenarios.
|
// word and returns false. We can use this to handle the context menu
|
||||||
|
// opening under normal scenarios.
|
||||||
if (!consumed and button == .right) {
|
if (!consumed and button == .right) {
|
||||||
self.showContextMenu(@floatCast(x), @floatCast(y));
|
self.showContextMenu(@floatCast(x), @floatCast(y));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user