Mitchell Hashimoto
140afb395f
apprt/embedded: supporting setting working directory in config
2023-10-03 17:34:44 -07:00
Mitchell Hashimoto
769e7df675
apprt/gtk: implement default window size
2023-09-30 21:41:17 -07:00
Mitchell Hashimoto
a1a8aeb104
initial window size needs to take into account window chrome
2023-09-30 21:35:50 -07:00
Mitchell Hashimoto
cc8e1cd936
macos: support initial window size
2023-09-30 20:47:31 -07:00
Mitchell Hashimoto
604eeceb03
apprt/glfw: support window-width, window-height configurations
2023-09-30 20:10:08 -07:00
Mitchell Hashimoto
abf43ddfcc
apprt/gtk: change default cursor to text
2023-09-30 15:46:03 -07:00
Nathan Fisher
614a9775c6
Set the mouse pointer to "text" (an I-beam) when it is over the gl_area
...
which the terminal embeds into for the Gtk interface. Addresses https://github.com/mitchellh/ghostty/issues/596
2023-09-30 18:26:40 -04:00
Mitchell Hashimoto
6c69f0ef63
apprt/gtk: gtk-single-instance defaults to true only if desktop env
...
Fixes #473
A new config value for `gtk-single-instance = desktop` is now valid.
This value uses GTK single instance mode only if it detects Ghostty was
launched from a desktop environment (i.e. clicking on the icon) through
the `.desktop` Freedesktop file. Otherwise, it disables single instance.
This enables Ghostty to work well with the CLI and accept all the
typical CLI flags. It will make Ghostty launch slower from the CLI but I
think this is an acceptable tradeoff.
2023-09-30 08:46:39 -07:00
Mitchell Hashimoto
8f82f8cad6
apprt/embedded: adapt to new binding API
2023-09-29 22:13:34 -07:00
Mitchell Hashimoto
56b0cb51d5
apprt/gtk: previous_tab/next_tab action do not consume if there are no tabs
2023-09-29 22:12:38 -07:00
Tim Culverhouse
4f2d67d8f3
gtk(input): fix value used for lowercase lower_unicode
...
When converting keyval to the unshifted version, gdk_keyval_to_lower
returns a keyval type, not a unicode value. Convert this to unicode
before assigning to keyval_unicode_unshifted.
This fixes a bug where the incorrect keycode is sent in alternate
layouts with kitty keyboard on linux.
2023-09-29 06:36:03 -05:00
Mitchell Hashimoto
685495c896
apprt/gtk: make wide-style gtk tabs configurable
2023-09-28 08:54:15 -07:00
Nathan Fisher
dca0ddb7e1
(Gtk) Set tab labels to fill the available space, so that they will
...
divide up the avialable horizontal area instead of leaving a large
empty space in the tab bar.
2023-09-28 00:10:07 -04:00
Mitchell Hashimoto
8c4d25050a
apprt/gtk: detect keyboard modifier state for mouse events
2023-09-26 12:37:59 -07:00
Mitchell Hashimoto
510f0fe8f2
apprt/embedded: if a physical key input is a keypad key, keep it
2023-09-22 11:44:18 -07:00
Mitchell Hashimoto
d287e741b1
apprt/embedded: initialize unmodified keystate prior to use
...
Fixes #521
We were not initializing the dead key state. The dead key state is read
on all translation calls so it must be initialized to 0. This was
working before because coincidentally whatever the memory was always
worked (it probably didn't, but it never didn't work for someone to
notice).
In debug modes, Zig sets uninitialized memory to 0xAAAAAAAA. Amusingly,
this is a valid dead key state value that UCKeyTranslate ignores and
thus produces the correct value. Therefore, we were only seeing bugs in
release modes where the uninitialized memory was a bad value
(consistently 0x1 on my machine) causing the wrong key to come out.
We were getting lucky before, this has always been a bug.
2023-09-22 09:18:52 -07:00
Mitchell Hashimoto
ec7ab5b6a4
apprt/gtk: always set app ID, use G_APPLICATION_NON_UNIQUE instead
...
This makes the icon and title work on Wayland while retaining the
gtk-single-instance functionality.
2023-09-21 10:57:10 -07:00
Mitchell Hashimoto
1f7d567f29
apprt/gtk: use gtk_keyval_to_lower to get unshifted
...
map_keycode was not respecting the keyboard layout!
2023-09-19 17:44:18 -07:00
Mitchell Hashimoto
7748390a7e
apprt/gtk: async clipboard
2023-09-19 10:53:45 -07:00
Mitchell Hashimoto
5a02635d2c
macos: async style clipboard reading
2023-09-19 10:36:17 -07:00
Mitchell Hashimoto
b30feeb596
core: move clipboard to async process
2023-09-19 10:18:17 -07:00
Mitchell Hashimoto
ed0a2ecfc4
apprt/gtk: window actions should use currently active surface
2023-09-18 15:33:11 -07:00
Mitchell Hashimoto
f3662354e5
apprt/gtk: about window
2023-09-18 15:16:35 -07:00
Mitchell Hashimoto
bf665b7c63
apprt/gtk: reset accelerators initially
2023-09-18 15:03:36 -07:00
Mitchell Hashimoto
844945e7f9
apprt/gtk: add reload config
2023-09-18 15:00:54 -07:00
Mitchell Hashimoto
c3a72b9188
apprt/gtk: add new tab button in header
2023-09-18 14:55:37 -07:00
Mitchell Hashimoto
7996be25a8
apprt/gtk: new window, tab
2023-09-18 14:51:19 -07:00
Mitchell Hashimoto
71ca254be8
apprt/gtk: window actions
2023-09-18 14:41:52 -07:00
Mitchell Hashimoto
dcf615022e
apprt/gtk: key file for logic related to keys
2023-09-18 14:27:05 -07:00
Mitchell Hashimoto
394ab3017f
apprt/gtk: initial app menu
2023-09-18 12:54:19 -07:00
Mitchell Hashimoto
4606d56dc0
apprt/gtk: config errors is not an application window
2023-09-18 11:24:19 -07:00
Mitchell Hashimoto
6df01b87c1
apprt/gtk: if errors fixed, hide window
2023-09-17 22:34:34 -07:00
Mitchell Hashimoto
80e02c6c9f
apprt/gtk: update config error contents on reload
2023-09-17 22:31:52 -07:00
Mitchell Hashimoto
92465f57ea
apprt/gtk: grab focus of config window when reloading
2023-09-17 22:28:58 -07:00
Mitchell Hashimoto
f82fd56933
apprt/gtk: hook up buttons
2023-09-17 22:09:44 -07:00
Mitchell Hashimoto
40315afe72
apprt/gtk: extract config errors window into views
2023-09-17 22:03:43 -07:00
Mitchell Hashimoto
fe15e7d5fd
apprt/gtk: add View to help with auto-layout views
2023-09-17 21:59:25 -07:00
Mitchell Hashimoto
bd3b5d5332
apprt/gtk: working on config errors window
2023-09-17 21:37:57 -07:00
Mitchell Hashimoto
84da10a9b3
apprt/gtk: don't use userdata for pages, can request on demand
...
This is important to keep it in sync if the gl area moves
2023-09-16 12:11:10 -07:00
Mitchell Hashimoto
cf84a5513f
apprt/gtk: listen to page-removed to hide tab bar if only one
2023-09-16 11:48:33 -07:00
Mitchell Hashimoto
5dc0746a17
gtk: tabs are draggable to the desktop to extract a window
2023-09-16 11:30:22 -07:00
Mitchell Hashimoto
f7272d506e
apprt/gtk: handle scenario where OpenGL area becomes unrealized
2023-09-16 09:38:28 -07:00
Mitchell Hashimoto
d2fa79effb
apprt/gtk: shuffle some lines around in Window
2023-09-16 08:32:32 -07:00
Mitchell Hashimoto
35c956fd05
apprt/gtk: Window css styling is no longer used
2023-09-16 08:29:15 -07:00
Mitchell Hashimoto
d5036e78f4
apprt/gtk: refactor into separate files
2023-09-16 08:28:49 -07:00
Mitchell Hashimoto
120588fb62
apprt/gtk: show warning when running debug version
2023-09-15 15:57:51 -07:00
Tim Culverhouse
de5c416341
gtk: handle all close-requests
...
When compiling in any Release mode, the default gtk close-request
handler does not properly fire. We only rely on the default handler if
we aren't confirming the close. Replace the default handler with our own
in all cases (and just destroy the window if we don't need
confirmation).
Fixes #458
2023-09-15 04:31:50 -05:00
Mitchell Hashimoto
54f58d9cd2
apprt/gtk: implement hide cursor
2023-09-14 19:45:20 -07:00
Mitchell Hashimoto
724900f143
macos: implement setCursorVisibility
2023-09-14 19:37:30 -07:00
Mitchell Hashimoto
a7e8b7559e
mouse-hide-while-typing config and glfw implementation
2023-09-14 17:36:21 -07:00