Toggle fullscreen on super/ctrl+return, only macOS for now

This fixes or at least is the first step towards #171:

- it adds `cmd/super + return` as the default keybinding to toggle
  fullscreen for currently focused window.
- it adds a keybinding handler to the embedded apprt and then changes
  the macOS app to handle the keybinding by toggling currently focused
  window.
This commit is contained in:
Thorsten Ball
2023-07-02 19:59:41 +02:00
parent ce77002198
commit 8e464db049
8 changed files with 56 additions and 1 deletions

View File

@@ -239,6 +239,7 @@ typedef void (*ghostty_runtime_new_split_cb)(void *, ghostty_split_direction_e);
typedef void (*ghostty_runtime_close_surface_cb)(void *, bool);
typedef void (*ghostty_runtime_focus_split_cb)(void *, ghostty_split_focus_direction_e);
typedef void (*ghostty_runtime_goto_tab_cb)(void *, int32_t);
typedef void (*ghostty_runtime_toggle_fullscreen_cb)(void *);
typedef struct {
void *userdata;
@@ -251,6 +252,7 @@ typedef struct {
ghostty_runtime_close_surface_cb close_surface_cb;
ghostty_runtime_focus_split_cb focus_split_cb;
ghostty_runtime_goto_tab_cb goto_tab_cb;
ghostty_runtime_toggle_fullscreen_cb toggle_fullscreen_cb;
} ghostty_runtime_config_s;
//-------------------------------------------------------------------