Commit Graph

86 Commits

Author SHA1 Message Date
Danny Dulai
489473a8cf Add macOS notch avoidance for traditional fullscreen
Position the window below the notch by reducing the frame height by
safeAreaInsets.top. Create a fullscreen child window behind it with a
colored subview covering just the notch strip, matching the terminal
background color and opacity.

Also fix background_opacity not triggering a chrome update on config
reload.
2026-03-17 10:06:57 -04:00
copilot-swe-agent[bot]
4706243380 Fix GLFW drop API to always present full original MIME type list to callbacks
Fixes #9633
2026-03-10 20:10:44 +05:30
Andrey Paramonov
72de57b5e5 Enhance fullscreen transition handling on macOS by adding frame constraint suppression 2026-02-28 19:59:43 +03:00
Kovid Goyal
449abb69bc Cleanup previous PR 2026-02-22 11:13:57 +05:30
copilot-swe-agent[bot]
0c0c5a62f7 Implement changing drag image in the various backends
Fixes #9542
2026-02-22 09:26:14 +05:30
Kovid Goyal
a2b7a0cd6d Port Cocoa drag source backend to new API 2026-02-18 11:20:17 +05:30
Kovid Goyal
a80d742449 Port cocoa backend drop code to the new API 2026-02-08 22:05:14 +05:30
Kovid Goyal
19f24f2623 Get drag and drop to self working in cocoa backend 2026-02-07 16:42:56 +05:30
copilot-swe-agent[bot]
7ca6fd66f8 Fix self drag not working under Wayland
Fixes #9483
2026-02-07 15:10:54 +05:30
copilot-swe-agent[bot]
5ea35cbbfc Refactor drag API to make it asynchronous
Fixes #9477
2026-02-07 08:59:34 +05:30
copilot-swe-agent[bot]
fac4420804 Simplify new drag/drop API
Fixes #9466
2026-02-03 22:02:51 +05:30
copilot-swe-agent[bot]
fa6c76d3e3 Add a GLFW API to support starting drag operations
Fixes #9454
Fixes #9455
2026-02-02 20:49:00 +05:30
Kovid Goyal
ba389d68b9 macOS: Fix changes to macos_titlebar_color while in full screen not being applied after exiting fullscreen
Fixes #9350
2026-01-03 00:19:03 +05:30
Kovid Goyal
33b9d858ad Nano-optimisation: Avoid using a block with GCD 2025-10-22 13:40:42 +05:30
Kovid Goyal
2babfa7ebf macOS: Further restrict the live resize callback to only be used when live resize is actually in progress 2025-10-07 18:23:08 +05:30
Kovid Goyal
55a2f2c55c Cocoa: fix quick access terminal hide focus restore
Apple now makes kitty the front most application before sending the
service notification. So instead watch for front most application change
events from the shared workspace and restore focus to the last non-self
application.
2025-07-21 14:55:12 +05:30
Kovid Goyal
064bc963a8 macOS: Quick access terminal: Restore focus to previously active window when hiding the quick access terminal window
Fixes #8627
2025-05-12 13:15:42 +05:30
Kovid Goyal
189d78283c Get the quake terminal working on macOS 2025-04-25 20:27:26 +05:30
Kovid Goyal
c9bf7e4236 Factor out Cocoa layer shell code into the proper function 2025-04-23 07:43:36 +05:30
Kovid Goyal
e93338a81c Start work on macOS support for panel kitten 2025-04-23 07:43:36 +05:30
Kovid Goyal
c0f04231ed Move CVDisplayLink code into its own module
Apple has deprecated CVDisplayLink in favor of CADisplayLink which has
different semantics. So turn off deprecation warnings for
CVDisplayLink related code only until I can be bothered to port it to
CADisplayLink.
2024-09-27 12:12:12 +05:30
Kovid Goyal
e57692e4f5 Possibly fix #7327 2024-04-09 21:19:25 +05:30
Kovid Goyal
b00c2d644e macOS: Render OS windows during windowDidResize for even smoother live resize rendering 2023-07-11 17:22:35 +05:30
Kovid Goyal
7a1bdb4ff1 macOS: Implement background blurring
Uses a private API that allows us to control the amount of blurring.
While using a private API is obviously not ideal, it is used by both
iTerm.app and Apple's own Terminal.app, so hopefully it should stick
around. Fixes #6135
2023-06-27 08:48:16 +05:30
Kovid Goyal
bcfa2a64e4 Start work on new clipboard api support for macos 2022-09-08 21:45:13 +05:30
Kovid Goyal
fdc9835587 Cleanup previous PR 2022-02-18 13:44:25 +05:30
pagedown
58e8609c1a macOS: Ensure the cursor is updated once
macOS will set the cursor to arrow after milliseconds after the switch
desktop animation ends. So the cursor that was updated immediately after
the focus will be changed again. This also affects toggling fullscreen.
2022-02-18 13:52:19 +08:00
pagedown
6d0721341b Fix phantom window appears when executing full screen in transition 2022-02-17 15:47:03 +08:00
pagedown
51d591e177 macOS: Allow opening URLs with kitty 2022-02-05 13:05:41 +08:00
Kovid Goyal
e8c683db8b A new approach to handling flagsChanged with IME
Bypass cocoa's flagsChanged handling and call handleevent ourselves,
this allows us to know exactly what the IME is doing. Hopefully fixes
issues with IMEs that change state on modifier key presses.

Fixes #4541
2022-01-22 14:47:57 +05:30
Kovid Goyal
396906860d macOS: When checking for global shortcuts handle shifted form of cmd+` 2022-01-15 10:14:06 +05:30
pagedown
a9bdf70275 macOS: Watch for system preferences changes and update global_shortcuts 2022-01-14 13:51:46 +08:00
Kovid Goyal
f9d2167c97 macOS: Respect the users system-wide global keyboard shortcut preferences
Note that we currently dont handle live reload of global shortcut
preferences. I cant be bothered. Patches welcome.
Fixes #4501
2022-01-13 13:36:58 +05:30
Kovid Goyal
e973c45968 Fix build on XCode 13.1
Apple go on making it harder and harder to support multiple
versions of their pathetic operating system in one code base.

kIOMainPortDefault is the "non-deprecated" replacement for
kIOMasterPortDefault. However, it is now marked as being available only
on macOS 12 and later so it refuses to build in a codebase designed to
run on earlier versions of macOS. Le bubbling sigh.

According to https://developer.apple.com/documentation/iokit/kiomasterportdefault?language=objc
passing NULL has the same effect and avoids the stupid warning.
Hopefully this will work till Apple decides to spend their trillion
dollars doing more stupid shit.
2021-12-15 12:57:46 +05:30
Kovid Goyal
ade4e67b51 Possible fix for #3890
Try to ensure we have a functioning displaylink always.
GLFW skips over sleeping monitors during a poll and also
had a bug where the display link was not re-created for a monitor
that already had a glfw monitor entry.

Also add a bunch more debug reporting
2021-08-01 12:53:35 +05:30
Kovid Goyal
219bf564f7 Fix #3719 2021-06-13 09:07:08 +05:30
Kovid Goyal
e4b4a35375 macOS: Fix rendering getting stuck on some machines after sleep/screensaver
This is caused, as far as I can tell, by CVDisplayLink getting stuck.
Apple apparently are incapable of writing a simple timer robustly.
So if it remains stuck after a second delete and recreate it to force it
to restart.

Fixes #2016
2021-05-12 07:30:17 +05:30
Kovid Goyal
f70c9842f5 macOS: Allow opening script and command
Fixes #3366
2021-03-10 21:33:29 +05:30
Kovid Goyal
86ce72e725 Port the Cocoa backend to use unicode key numbers 2021-01-16 20:52:16 +05:30
Kovid Goyal
9193a20b44 macOS: Fix minimize not working for chromeless windows
Fixes #3112
2020-11-20 07:30:46 +05:30
Kovid Goyal
bdcac9aed3 Partial fix for traditional full screen on Big Turd 2020-11-16 10:23:01 +05:30
Luflosi
a2f80740d7 Remove EGL and OSMesa struct member macros
From upstream: bcb8558189.
2020-06-26 12:51:11 +02:00
Luflosi
d7a7509da6 EGL: Replace native handle macros with functions
From upstream: d7f7b0e1b5.
2020-06-26 12:17:13 +02:00
Kovid Goyal
03b1484c96 Wayland: Abort on fatal error should bypass quit confirmation 2020-06-03 14:39:27 +05:30
Luflosi
269f294d19 Use CALayer instead of NSView for EGLNativeWindowType
From upstream: 91eebe922d.
2020-05-23 12:48:26 +02:00
Kovid Goyal
707cb37212 Have the confirm on close also apply to quitting kitty
Use a dedicated API for handling quit requests on macOS rather than a
quit canary. Also create a mappable "quit" action for all platforms.
2020-05-18 16:06:40 +05:30
Luflosi
e4fd12001c Cocoa: Add fully dynamic loading of Vulkan loader
From upstream: 7da87aaae7.
2020-01-17 14:18:28 +01:00
Luflosi
3581ffe04b Cocoa: Select Vulkan surface extension at runtime
From upstream: 15d91801b7.
2020-01-17 14:18:21 +01:00
Luflosi
f6901e4a3d Cocoa: Add support for VK_EXT_metal_surface
From upstream: c5cb4a253a.
2020-01-17 14:18:05 +01:00
Luflosi
e725c647ef Cocoa: Only create per-monitor display link once
From upstream: b4a8eb9b19.
2020-01-02 18:05:38 +01:00