summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeffrey C. Ollie <jeff@ocjtech.us>2025-05-29 15:45:51 -0500
committerJeffrey C. Ollie <jeff@ocjtech.us>2025-05-29 16:07:57 -0500
commitd3cb6d0d41835f9e57d4dca6b927440e0f505bb4 (patch)
treee04440fa55290153c0dba9a93195e16509234471 /include
parentb2f3c7f3092500545c1b5f7848baba641946fe42 (diff)
GTK: add action to show the GTK inspector
The default keybinds for showing the GTK inspector (`ctrl+shift+i` and `ctrl+shift+d`) don't work reliably in Ghostty due to the way Ghostty handles input. You can show the GTK inspector by setting the environment variable `GTK_DEBUG` to `interactive` before starting Ghostty but that's not always convenient. This adds a keybind action that will show the GTK inspector. Due to API limitations toggling the GTK inspector using the keybind action is impractical because GTK does not provide a convenient API to determine if the GTK inspector is already showing. Thus we limit ourselves to strictly showing the GTK inspector. To close the GTK inspector the user must click the close button on the GTK inspector window. If the GTK inspector window is already visible but is hidden, calling the keybind action will not bring the GTK inspector window to the front.
Diffstat (limited to 'include')
-rw-r--r--include/ghostty.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ghostty.h b/include/ghostty.h
index 950f5ef80..6b1625a30 100644
--- a/include/ghostty.h
+++ b/include/ghostty.h
@@ -653,6 +653,7 @@ typedef enum {
GHOSTTY_ACTION_INITIAL_SIZE,
GHOSTTY_ACTION_CELL_SIZE,
GHOSTTY_ACTION_INSPECTOR,
+ GHOSTTY_ACTION_SHOW_GTK_INSPECTOR,
GHOSTTY_ACTION_RENDER_INSPECTOR,
GHOSTTY_ACTION_DESKTOP_NOTIFICATION,
GHOSTTY_ACTION_SET_TITLE,