Mitchell Hashimoto
15924b285d
Merge pull request #2221 from TheOnlyMrCat/gtk_opacity_2
...
Fix background-opacity for the GTK backend, again
2024-09-12 09:42:35 -07:00
Mitchell Hashimoto
4cacea3813
apprt/gtk: inline adwaita checks so comptime disables conditional paths
...
This fixes building without libadwaita or building with an older version
of libadwaita. This also updates the CI to test this.
2024-09-12 09:34:39 -07:00
Mitchell Hashimoto
21460e5ded
apprt/gtk: hide header bar when window decorations are disabled
...
Fixes #2023
Fixes regression from #2051
#2051 introduced a regression where `window-decoration=false` had no
effect when libadwaita was in use. Further, the
`toggle_window_decorations` keybinding also had no effect whatsoever.
This commit fixes this and #2023 by explicitly hiding the header bar
when window decorations are disabled. We hide the header bar rather than
the full top bar because we still want the tab bar to show up with
window decorations disabled.
2024-09-11 21:05:12 -07:00
Max Guppy
b6198e37f2
Reapply "Merge pull request #1690 from TheOnlyMrCat/gtk_opacity"
...
This reverts commit 57bf0b08ffe04578feb087fab739a48543c0ac75.
2024-09-12 13:36:31 +10:00
Paul
f0ca0e551e
adw: show performance warning banner
2024-09-11 12:04:12 -07:00
Paul
fa81445701
adw: add option to choose toolbar style
2024-09-11 12:04:12 -07:00
Mitchell Hashimoto
37ba052913
apprt/gtk: cleaup final notebook page on libadw 1.3.x
2024-09-11 10:44:30 -07:00
Mitchell Hashimoto
2b5d436792
apprt/gtk: log the libadwaita version at startup if we use it
2024-09-11 10:27:35 -07:00
Mitchell Hashimoto
8186a8835b
apprt/gtk: scope comptime to only one
2024-09-11 10:17:41 -07:00
Mitchell Hashimoto
c27f427e02
apprt/gtk: the comptimeEnabled check is redundant
2024-09-11 09:50:37 -07:00
Mitchell Hashimoto
afc95fefe2
apprt/gtk: use adwaita helpers, move out some complicated logic
2024-09-11 09:38:05 -07:00
Mitchell Hashimoto
1ab850fa94
apprt/gtk: move adw enabling and version checks into shared file
2024-09-11 09:21:51 -07:00
Paul Berg
7aa6b0008a
adw: add support for gtk-tabs-location = bottom
...
this falls back to top when using either right or left.
2024-09-11 17:23:56 +02:00
Paul Berg
0c286a049a
gtk: add adwaita banner
2024-09-11 15:42:31 +02:00
Paul
bdf618d7af
gtk: adw toolbar view
...
gate toolbar view on ADWAITA_MINOR >= 4
use the right destructor on window creation errors
2024-09-11 15:42:31 +02:00
Paul Berg
618a7a3fea
adw: update window title on selected page change
2024-09-11 15:42:31 +02:00
Paul Berg
05e7bf7634
gtk: add devel class to window in debug builds
2024-09-11 15:42:31 +02:00
Paul Berg
439988930d
gtk: respect wide-tabs option
2024-09-11 15:42:31 +02:00
Paul Berg
5327daac04
adw: implement next/previous
2024-09-11 15:42:31 +02:00
Paul Berg
9c8a9f3d6b
adw: respect gtk-wide-tabs
...
update
2024-09-11 15:42:05 +02:00
Paul
42c93d89fc
adw: move notebook to its own file
2024-09-11 15:42:03 +02:00
Paul
0e22695ec4
gtk: use adwaita tab view when possible
...
add tab bar view
2024-09-11 15:35:22 +02:00
Tristan Partin
a0bc6ae966
gtk: silence bad accelerator warnings
...
Before this a commit a keybind of CTRL + \ would create a GTK
accelerator of <Ctrl>\, which is incorrect. It needs to be
<Ctrl>backslash, which can be retrieved with gdk_keyval_name().
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-09-05 19:08:29 -05:00
Mitchell Hashimoto
a3aa5463a1
Revert "Merge pull request #2060 from jcollie/gtk-compatibility"
...
This reverts commit 9ce789cc85d411c59eff2a01c7fe18ce14ccd2b8, reversing
changes made to f1aea10a84176ff4338f7d2f0bf1b9c700b41baa.
2024-09-05 08:45:37 -07:00
Mitchell Hashimoto
2142ba53c4
apprt/gtk: do not remove unfocused widget from overlay
...
See comment
2024-09-04 14:17:51 -07:00
Mitchell Hashimoto
a947e20826
Merge pull request #2174 from ghostty-org/release-safe
...
Build ReleaseSafe builds for testing, make them more usable
2024-08-31 21:50:03 -07:00
Mitchell Hashimoto
0ab3d964dd
apprt/gtk: show debug warning whenever runtime safety is on
2024-08-31 21:38:02 -07:00
Jeffrey C. Ollie
bbb204ac85
rename gtkVersionMinimum->gtkVersionAtLeast for consistency
2024-08-31 19:16:43 -07:00
Jeffrey C. Ollie
b6c943386c
Conditional compilation against different GTK versions
...
Adds a comptime function to enable conditional compilation against
different GTK versions that have added new API calls in newer versions
of GTK.
Use this function to get fractional scaling information for GTK
surfaces, which is only available with GTK 4.12+.
2024-08-31 19:15:24 -07:00
Mitchell Hashimoto
80327402b8
Merge pull request #2120 from edmz/last_tab
...
macos: jump to last_tab
2024-08-26 20:22:52 -07:00
Mitchell Hashimoto
512b24818a
apprt/gtk: fix int cast
2024-08-26 20:16:23 -07:00
Mitchell Hashimoto
d7e7f55956
apprt/gtk: support last_tab
2024-08-26 20:13:28 -07:00
Mitchell Hashimoto
3d1ee3daa8
apprt: make gotoTab handle all tab movements
2024-08-26 20:13:27 -07:00
Mitchell Hashimoto
18419d3589
Clamp initial window size configurations to screen size
...
Fixes #2145
2024-08-26 10:09:05 -07:00
Mitchell Hashimoto
7747eaf11d
apprt/embedded: use new copyAttribute API for CoreText
2024-08-24 20:52:36 -07:00
Eduardo Dominguez
262902a28d
macos: jump to last_tab
2024-08-19 12:19:00 -06:00
Mitchell Hashimoto
d7299b16bf
apprt/gtk: fix imgui calls
2024-08-16 16:53:17 -07:00
Mitchell Hashimoto
7a7f7da4ef
pkg: yeet more usingns
2024-08-16 16:52:28 -07:00
Mitchell Hashimoto
a9107e7eb6
apprt/embedded: fix usingnamespace usage
2024-08-16 15:00:07 -07:00
Mitchell Hashimoto
9409e3072f
apprt/gtk: remove usingnamespace
2024-08-16 14:58:04 -07:00
Mitchell Hashimoto
ba29bf759b
lots more yeeting
2024-08-16 14:35:10 -07:00
Jeffrey C. Ollie
414fdc0214
gtk: prettify the url overlays
2024-08-13 14:21:28 -05:00
Mitchell Hashimoto
a158a1d45f
os: unify memory/processes cgroup limiting func
2024-08-11 15:37:54 -07:00
Christian Kugler
ba41f142ed
Add Config Option to Limit Number of Processes
...
To protect your system and ghostty from misbehaving programs that launch
too many processes for the system to handle (e.g. like a fork bomb),
this implements an option to limit the number of processes that can be
started in a surface.
A fork bomb for example or other misbehaving program would then only
take down one surface and not the entire system.
Side node:
If I am right in issue #2084 , this feature does not actually work on a
per surface basis but on all surfaces. If this is the case, it could
probably be fixed together. Chances are, that I am wrong though 😉
Further improvements that could be done:
- unify way to set cgroup attributes
- set sane default: 10% of system max?
2024-08-11 23:37:57 +02:00
Jeffrey C. Ollie
f4bdf8d3a1
gtk: resize overlay improvements
...
* runtime changing of `resize-overlay` now works on GTK
* shorten function names in ResizeOverlay
* improve documentation
2024-08-11 12:23:43 -05:00
Mitchell Hashimoto
9cf247bb3e
macos: implement resize overlay
...
Implements the resize overlay configurations completely.
2024-08-10 20:17:33 -07:00
Mitchell Hashimoto
451cf69398
Merge pull request #2071 from jcollie/resize-overlay
...
gtk: add resize overlay
2024-08-10 15:07:09 -07:00
Mitchell Hashimoto
1c88377e97
apprt/gtk: small style tweaks for resize overlay
2024-08-10 15:06:44 -07:00
Jeffrey C. Ollie
4dbd2fb639
move resize overlay code to a new file to keep the file size down
2024-08-10 14:59:05 -05:00
Jeffrey C. Ollie
b55b3de05b
resize overlay: move all resize overlay code and data into a struct
...
Keepin´ the code clean by gathering all of the resize overlay
related data and code into a struct.
2024-08-10 14:44:28 -05:00