Commit graph

1559 commits

Author SHA1 Message Date
Kovid Goyal
5ba3d10471
X11: Fix a regression that caused some high res scroll devices to be treated as line based scroll devices
Apparently when running under XWayland, we cant rely on libinput to
detect highres scroll devices. Sigh. Linux input is such a disaster.
Dunno if this will break something else, hopefully not.

Fixes #9649
2026-03-12 19:23:41 +05:30
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
mcrmck
59c963c481 Add draggable window title bars
Implements drag-to-reorder for window title bars, following up on the
merged window title bar feature (#9450) and the design discussion in #9619.

- Drag a title bar and drop on another title bar to swap positions
- Drop on a window body quadrant (left/right/top/bottom) to insert as
  a directional split; Splits layout uses insert_window_next_to(), other
  layouts fall back to move_window_to_group()
- Drop on a tab bar tab to move the window into that tab
- Drop on another OS window to move into its active tab
- Drop outside kitty to detach into a new OS window
- Tab bar highlights the hovered tab during a window drag, mirroring
  how the destination window title bar is highlighted
- toggle_window_title_bars action temporarily force-shows title bars
  for drag-to-reorder when they are normally hidden, auto-hiding after
  the drag completes
- window_title_bar_drag_threshold option (default 5px) controls how far
  the mouse must move before a drag is initiated; 0 disables dragging

MIME type follows the same convention as tab dragging:
application/net.kovidgoyal.kitty-window-{PID}

Ref: #9619
2026-03-08 20:56:38 -04:00
Kovid Goyal
5c2b088895
Merge branch 'fix/split-view-fullscreen-crash' of https://github.com/AndrewP-GH/kitty 2026-03-01 10:59:41 +05:30
Kovid Goyal
04c35d85da
Merge branch 'fix-accessibility-window-management' of https://github.com/alexasa79/kitty 2026-03-01 10:26:20 +05:30
Sasha Sandler
2c89a7dedf Allow accessibility selectors needed for external window management tools
Tools like Easy Move+Resize use the macOS Accessibility API to find and
move/resize windows. They call AXUIElementCopyElementAtPosition to get the
content view, then use kAXWindowAttribute to navigate to the parent window.

The isAccessibilitySelectorAllowed: whitelist was blocking these selectors,
preventing external window management tools (Easy Move+Resize) from working with
kitty.

Fixes #5561
2026-02-28 22:22:38 -05:00
Andrey Paramonov
21c2e585cf
Refactor fullscreen exit handling to ensure frame constraint suppression is lifted consistently after a delay 2026-02-28 20:21:59 +03:00
Andrey Paramonov
72de57b5e5
Enhance fullscreen transition handling on macOS by adding frame constraint suppression 2026-02-28 19:59:43 +03:00
Andrey Paramonov
6d33cea816
Fix fullscreen handling for macOS Split View to prevent crashes 2026-02-28 17:56:19 +03:00
Kovid Goyal
7500c58e1c
Fix #9569 2026-02-28 16:54:02 +05:30
zhaolei
31b4614c87 fix crash when macos_titlebar_color=background with transparent background 2026-02-24 18:06:53 +08:00
Kovid Goyal
5cc510dea4
Merge branch 'titlebar-only-wayland' of https://github.com/antoinecellerier/kitty 2026-02-23 19:19:30 +05:30
Kovid Goyal
1df89d9448
Cleanup previous PR
Fixes #9463
2026-02-23 07:44:58 +05:30
Kovid Goyal
1f5b11be0b
Merge branch 'fix-sleep-macos' of https://github.com/jorgemmsilva/kitty 2026-02-23 07:27:58 +05:30
Kovid Goyal
f0d11f7223
... 2026-02-22 16:48:59 +05:30
Kovid Goyal
9f2a4ad2dd
Wayland: Implement ridiculous workaround for broken dnd
Wayland is *the worst* window system I have ever had the
displeasure of trying to support.
2026-02-22 16:24:46 +05:30
Kovid Goyal
322a51da98
... 2026-02-22 15:44:28 +05:30
Kovid Goyal
b737eaad65
Cleanup previous PR
Use a single wl_surface for the drag icon. Whther it is attached to the
top level drag or not is determined based on availability.
2026-02-22 15:36:10 +05:30
copilot-swe-agent[bot]
accee908aa
Implement Wayland xdg-toplevel-drag protocol for make_toplevel in _glfwPlatformChangeDragImage
Fixes #9544
2026-02-22 14:53:34 +05:30
Kovid Goyal
ca43d57cdf
Fix enumeration of pasteboard items in the source 2026-02-22 13:32:55 +05:30
Kovid Goyal
531fb3e1b1
Change drag thumbnail when in detach/move modes 2026-02-22 13:09:56 +05:30
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
6506ce1e91
API to change image for drag in progress 2026-02-22 09:10:26 +05:30
Kovid Goyal
8ad22e7859
On Wayland detach even on drag cancel
Wayland compositors contravene their own spec and make it impossible to
distinguish between drop-but-not-accept and drag-cancel cases.
https://gitlab.freedesktop.org/wayland/wayland/-/issues/140
2026-02-22 08:19:31 +05:30
Kovid Goyal
eb23c18821
Dont detach when user presses esc to cancel drag and there is no drop 2026-02-22 07:42:42 +05:30
Kovid Goyal
0f10380773
Cocoa backend: distinguish between cancelling drop by esc key/dragging to trash and dropping in unsupported place 2026-02-22 07:34:27 +05:30
copilot-swe-agent[bot]
56a9dd1bb7
Place drag icon below cursor on macOS
Fixes #9539
2026-02-21 22:06:49 +05:30
copilot-swe-agent[bot]
bcba8fc04c
Wayland: Add support for ext-background-effects
Fixes #9536
Fixes #9534
2026-02-21 20:56:40 +05:30
Kovid Goyal
dea3ad5eed
API for registering MIME types for drag enter 2026-02-21 17:25:25 +05:30
Kovid Goyal
57e7dc2cdc
Add some more common types 2026-02-21 17:25:03 +05:30
Kovid Goyal
7efba91ffc
Register UTI for tab drag mime on Cocoa 2026-02-21 16:59:58 +05:30
Kovid Goyal
aab60b7967
Fix mime <-> UTI roundtripping 2026-02-21 16:37:04 +05:30
Kovid Goyal
96c01b74d8
Detach tab via drag and drop now implemented 2026-02-21 15:15:33 +05:30
copilot-swe-agent[bot]
0dfb01e8c5
Implement X11 drag source backend for the new API
Fixes #9522
2026-02-18 16:55:52 +05:30
Kovid Goyal
3cd2aa6a2f
Add some docs for the drag source API 2026-02-18 16:05:27 +05:30
Kovid Goyal
a2b7a0cd6d
Port Cocoa drag source backend to new API 2026-02-18 11:20:17 +05:30
Jorge Silva
adc97bc117
fix blank screen on macOS resume from sleep 2026-02-17 17:56:14 +00:00
Kovid Goyal
e5eb63fcd0
Refactor drag source API to be async
Wayland implementation done. Other two backends remain.
2026-02-17 13:07:55 +05:30
Kovid Goyal
76a29273c8
Dont send non-finger based zero size scroll events on Wayland 2026-02-17 11:23:49 +05:30
Kovid Goyal
a99103d9a1
Drop events should use same co-ordinate system as mouse events 2026-02-13 10:08:25 +05:30
Kovid Goyal
34ffc6cdce
X11: port drop code to new API 2026-02-09 07:54:40 +05:30
Antoine Cellerier
ef4574ae97 Support hide_window_decorations titlebar-only on Wayland
Hide the CSD titlebar subsurface while keeping shadow borders for
resizing. On SSD compositors (GNOME), forces CSD mode to draw
kitty's own shadows without a titlebar.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-08 19:49:44 +01:00
Kovid Goyal
ff70e2e3ab
Dont hardcode mimetype to extension mappings 2026-02-08 22:05:15 +05:30
Kovid Goyal
08217c949d
Fix crash on self drop 2026-02-08 22:05:15 +05:30
Kovid Goyal
625e3b5d1c
Notes for X11 backend refactor 2026-02-08 22:05:14 +05:30
Kovid Goyal
a80d742449
Port cocoa backend drop code to the new API 2026-02-08 22:05:14 +05:30
Kovid Goyal
af4f3969b7
remove watch after all data is received on pipe 2026-02-08 22:05:14 +05:30
Kovid Goyal
5db41c7ba4
Remove remaining code for the old drop API
X11 and cocoa need to be ported to the new API
2026-02-08 22:05:14 +05:30
Kovid Goyal
f3cda7e828
Have mimes_count be always accurate 2026-02-08 22:05:14 +05:30
Kovid Goyal
3cf24afdc0
Refactor drop API and implement it on Wayland 2026-02-08 22:05:14 +05:30
Kovid Goyal
9aab18d724
DRYer 2026-02-07 23:11:42 +05:30
Kovid Goyal
0d465f71a3
More work on cocoa darg drop still not functional
I think I am going to rewrite the API to integrate with the event loop,
now that I have a good handle on the semantics of DnD in the two major
platforms.
2026-02-07 23:00:23 +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
Kovid Goyal
07a9f2bcaa
API to start a drag 2026-02-07 13:50:16 +05:30
copilot-swe-agent[bot]
5ea35cbbfc
Refactor drag API to make it asynchronous
Fixes #9477
2026-02-07 08:59:34 +05:30
Kovid Goyal
b66f8e9ed8
... 2026-02-05 20:20:18 +05:30
Kovid Goyal
d51dec8187
When dropping, paste into window under mouse cursor rather than active window 2026-02-04 21:21:25 +05:30
Kovid Goyal
9a2ddc887b
Cleanup new chunked drop code and use it in kitty
Currently the chunking is useful but it will become useful for a future
drag and drop TUI protocol
2026-02-04 20:34:10 +05:30
copilot-swe-agent[bot]
ed5eb8f45c
Allow reading dropped data in chunks
Fixes #9470
2026-02-04 14:18:28 +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]
9b35c1b535
Allow changing drag acceptance asynchronously
Fixes #9465
2026-02-03 14:43:44 +05:30
copilot-swe-agent[bot]
6744183027
Accept drags based on mime types in drag event callback
Fixes #9456
2026-02-02 21:30:25 +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
bc5c349d53
Linux: Rather than crashing on systems that give us broken keymaps just ignore key events 2026-01-30 19:00:46 +05:30
Kovid Goyal
d0249c1e72
Cleanup X11 momentum-scroll
Dont cancel on the synthetic key events x11 generates for scrolling.
Also use correct timestamp for duration and expiry of physical events.
2026-01-26 12:40:42 +05:30
copilot-swe-agent[bot]
027b73db64
Add momentum scrolling for X11 backend
Fixes #9421
2026-01-26 11:51:57 +05:30
Sébastien MORAND
0bf307c95f
macOS: Implement dictation support via accessibility and NSTextInputClient
This commit enables macOS dictation (triggered by pressing Fn twice) to work
in kitty by implementing the necessary accessibility methods.

The key fix is changing `selectedRange` to return `NSMakeRange(0, 0)` instead
of `kEmptyRange` (NSNotFound, 0). When selectedRange returns NSNotFound, macOS
dictation cannot determine where to insert text and fails silently.

Additional accessibility methods implemented:
- accessibilitySelectedTextRange: Returns cursor position for dictation
- accessibilityNumberOfCharacters: Returns 0 (terminal has no fixed buffer)
- accessibilityInsertionPointLineNumber: Returns 0
- accessibilityValue: Returns empty string
- setAccessibilityValue: Routes dictated text to keyboard input

This fix is inspired by the similar fix in Emacs v30 which restored dictation
by implementing selectedRange properly after migrating to NSTextInputClient.

Fixes: https://github.com/kovidgoyal/kitty/issues/3732
2026-01-20 10:35:54 +01:00
Kovid Goyal
0d0ee5474d
Cleanup previous PR 2026-01-15 19:26:27 +05:30
copilot-swe-agent[bot]
6436cda482
Add is_finger_based field to XIScrollDevice with detection logic
Fixes #9385
2026-01-15 19:18:27 +05:30
Kovid Goyal
9ef934cf54
Wayland: Remove usage of the Wayland color management protocol to inform compositors of the color space used by kitty
As is typical with Wayland, the protocol is poorly designed and
implemented even worse. Hyprland 0.53 has completely broken color
management.
https://github.com/hyprwm/Hyprland/discussions/12788
In addition it and mangowc crash when using color management with nouveau drivers.
https://github.com/kovidgoyal/kitty/issues/9030

KDE kwin does not support the sRGB transfer function. And the geniuses
at Wayland are any way planning to deprecate sRGB as a transfer function.

Only GNOME mutter seems to get it right.

Then there are people that are likely going to shoehorn this into EGL
instead of leaving it under application control via the protocol anyway.
https://github.com/KhronosGroup/EGL-Registry/issues/197

Sigh. Wayland.
2026-01-15 09:53:09 +05:30
Kovid Goyal
c389f4d5b8
Wayland: Fix doubled key repeat events when compositor sends repeat events
Fixes #9374
2026-01-15 08:13:37 +05:30
Kovid Goyal
da170555fa
Ignore master pointer device events since we use the slave devices 2026-01-11 12:57:56 +05:30
Kovid Goyal
1efded85bc
Support for old compilers 2026-01-11 11:02:14 +05:30
Kovid Goyal
69a25691c5
X11: Fix mouse motion events not being handled
The code to use XI_Motion for scroll events needed to handle motion
events too
2026-01-11 10:44:47 +05:30
copilot-swe-agent[bot]
bfc21fc7a4
X11: handle XI device hotplugging
Fixes #9370
2026-01-10 09:00:37 +05:30
Kovid Goyal
813c560e29
Implement proper scroll event type detection in X11
Uses libinput scroll mode property to detect high res devices.
2026-01-10 08:38:45 +05:30
Kovid Goyal
15206eda0b
Add XIGetQuery 2026-01-10 06:17:53 +05:30
Kovid Goyal
f8426d529c
... 2026-01-10 05:51:59 +05:30
Kovid Goyal
21da5350d3
Update changelog 2026-01-09 17:22:26 +05:30
copilot-swe-agent[bot]
c1a54a0cc0
Add XI2 smooth scrolling support for X11 backend
Fixes #9369
2026-01-09 17:13:24 +05:30
Kovid Goyal
dd9c61e5f6
... 2026-01-09 14:44:40 +05:30
Kovid Goyal
2ab0fcb373
Make Wayland momentum scrolling configurable 2026-01-09 13:46:49 +05:30
Kovid Goyal
1f43a75a07
DRYer 2026-01-09 13:26:44 +05:30
Kovid Goyal
c0add3198b
Use logical pixels for momentum velocity settings 2026-01-09 13:21:04 +05:30
Kovid Goyal
779fb0d5c5
Cancel momentum scroll on button and key events 2026-01-09 13:15:37 +05:30
Kovid Goyal
3232551c39
Revert to using a fixed timer interval
Sadly, we cant rely on the Wayland compositor to send us reliably timed
scroll events.
2026-01-09 13:10:16 +05:30
Kovid Goyal
858240e324
Momentum scroller: discard unsuitable physical events 2026-01-09 12:56:05 +05:30
Kovid Goyal
3c250a741d
Wayland: Fix line and v120 scroll event types being multiplied by screen scale
This does not match X11/macOS behavior. And I see no logical reason why
it should be so. The wheel_scroll_multiplier should be used to adjust
this by end users.
2026-01-09 12:50:07 +05:30
Kovid Goyal
48de08ded1
Derive timer interval in the momentum scroller from previous scroll events 2026-01-09 10:40:24 +05:30
Kovid Goyal
32f7f8d321
Remove unneeded axis event timestamp 2026-01-05 20:13:33 +05:30
Kovid Goyal
e825005861
Remove unused field 2026-01-05 20:08:09 +05:30
Kovid Goyal
e1199bcee2
Initial implementation of momentum for finger based scrolling on Wayland
Needs configuration and possibly the parameter adjustment once pixel
scrolling is merged.
2026-01-05 19:52:44 +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
0f1362524b
Store more information about axis events from Wayland 2026-01-01 13:25:30 +05:30
Kovid Goyal
ba3af8f2c3
Refactor GLFW scroll event callback to use a proper event struct 2025-12-31 23:40:34 +05:30
Kovid Goyal
06e7f5ec37
Fix #9306 2025-12-20 08:54:22 +05:30
Kovid Goyal
4f73374a12
YATB: Yet Another Tahoe Bug from the company that should stick to selling fruit
Fixes #9299
2025-12-18 11:13:38 +05:30
Kovid Goyal
99b1eca3c8
Disable NSAutoFillHeuristicController on spec 2025-12-18 10:16:59 +05:30
Kovid Goyal
71a7dda522
... 2025-12-05 07:51:04 +05:30
Kovid Goyal
3b78fd646e
... 2025-12-03 22:57:14 +05:30
Kovid Goyal
16008b950a
Wayland: Fix spurious key repeat events when some user defined callback takes a long time to execute
On compositors that support compositor key repeat events, use those, for
complete robustness. Sadly no actual compositor implements these yet.

Otherwise use a timer fd/pipe to queue the repeat events and only
dispatch them after events from the compositor are handled. This means
release events from the compositor will prevent spurious repeat events.
One can, in the worst case lose some repeat events if there is a very
large interval between the start of the timer and the next poll, but
that is unavoidable and is why repeat events should come from the compositor
in the first place.

Fixes #9224
2025-12-03 22:26:09 +05:30
Kovid Goyal
ca945563bb
Wayland: add support for compositor provided key repeat events
Far more robust. Sadly no actual compositors yet support this. Fifteen
years it takes Wayland developers to correct their most basic mistakes.

See #9224
2025-12-03 20:02:46 +05:30
Kovid Goyal
76f9cdc426
... 2025-11-22 20:03:01 +05:30
Kovid Goyal
35d95d7a43
Also remove shadow from zero sized window
Hopefully that means no clickable region at all?
2025-11-12 14:01:37 +05:30
Kovid Goyal
98e13787a9
... 2025-11-12 12:23:24 +05:30
Kovid Goyal
81f429d52b
Move the code to cycle through OS Windows into glfw 2025-11-12 12:02:38 +05:30
Kovid Goyal
a4a7f77ef1
Use __block rather than __weak since we are in manual ref counting regime 2025-11-12 09:31:31 +05:30
Kovid Goyal
33b9d858ad
Nano-optimisation: Avoid using a block with GCD 2025-10-22 13:40:42 +05:30
Kovid Goyal
6a6b0b47a3
Micro-optimize display link callback
Use a GCD block rather than a runtime selector with a boxed number
2025-10-22 13:35:02 +05:30
Kovid Goyal
878b502fc1
Cleanup previous PR
The locks were not being initialized, and since I was there did some
general cleanup as well, moved the locks array into displayLinks rather
than having another global namespaced variable.
2025-10-22 09:54:21 +05:30
Scott Lee
fc8f3ca6e2 Improve macOS idle wakeups handling 2025-10-22 07:38:10 +09:00
Kovid Goyal
94f3da53aa
Cleanup previous PR 2025-10-21 09:44:41 +05:30
Evan Goode
80a9bdb999 Smoothly handle VALUE120 scroll events 2025-10-20 09:32:59 -04:00
alex-huff
10e0d11093 panel: use an anchor of 0 for --edge=center-sized
Fixes #9116
2025-10-16 10:04:55 -05:00
Kovid Goyal
3ba6c3f4b9
macOS: Handle dropping of file promises into kitty in addition to file paths
Fixes #9084
2025-10-11 11:02:51 +05:30
alex-huff
1967fd9dd5 panel: implemented --edge=none on X11 2025-10-09 17:18:40 -05:00
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
d3c5cb12c4
macOS: Dont do live resizing when window is fullscreen
The live resize causes crashes on some Tahoe machines due to macOS bugs.
It is not needed anyway when the window is fullscreen, so ignore it.
2025-10-07 08:57:57 +05:30
Kovid Goyal
a0699f5c9e
Remove the dropping of the first resize event since it did not fix the issue
Add a check to only callback if the thread is the main thread
2025-10-06 18:39:53 +05:30
Kovid Goyal
270c598f2c
macOS: Only live resize for resize events that occur in quick succession
Apparently on some systems Tahoe sends a resize event on wake from
sleep/lid open for obscure reasons and then proceeds to crash if one
redraws during that event. Sigh.
2025-10-02 19:39:13 +05:30
Kovid Goyal
a8e930c167
Fix titlebar color not working for opaque windows
As long as titlebar_color is not nil, we need a background view
2025-09-29 22:36:27 +05:30
Kovid Goyal
75ec41e08b
Make titlebar background view a child of the titlebar view itself 2025-09-29 22:02:38 +05:30
Kovid Goyal
13bbaee112
Only insert titlebar background view if the titlebar is transparent 2025-09-29 21:47:40 +05:30
Kovid Goyal
14f75c9a9b
DRYer 2025-09-29 17:44:24 +05:30
Kovid Goyal
d2cc22e7c6
macOS: React to changes in effective appearance of the NSApplication not the content view for each window
This is nicer now every OS Windows doesnt cause a notification. Also
fixes #9034 which was caused by us setting an explicit appearance on the
window when the titlebar is set to a specific color thereby preventing
the views in the window from getting appearance change notifications.
2025-09-29 17:17:46 +05:30
Kovid Goyal
f4867928b4
DRYer 2025-09-29 17:00:18 +05:30
Kovid Goyal
1252098016
DRYer 2025-09-29 09:09:49 +05:30
Kovid Goyal
fb4a3d7f17
Revert reversion of Tahoe fix in 7589bf4b11
It is still needed. Instead change the frame to havezero size and leaves
its origin unchanged.
2025-09-29 08:58:41 +05:30
Kovid Goyal
bdae74d7ed
Wayland: Ensure color manager get_surface is called just once
This should not be needed since create_surface is called just once, but
good to be safe.
2025-09-29 08:36:51 +05:30
Kovid Goyal
e542cd8378
macOS: Fix a big where the color of a transparent titlebar was off when running in the release build versus the build from source. Also fix using a transparent titlebar causing the background opacity to be darkened.
There were two issues.

1) Setting window background color to a non-zero opacity causes
   darkening (essentially there were two layers of blending)

2) The titlebar background view could end up in the wrong position
   because it was a child of the content view rather than its super view

Fix both issues setting the window background to clear color and
moving the background view into the super view while making sure it is
positioned correctly using explicit constraints. Phew.
2025-09-28 21:24:00 +05:30
Kovid Goyal
e024226b0c
Dont need to set origin since we are setting anchors 2025-09-28 20:22:40 +05:30
Kovid Goyal
8bef718c9a
Tighten the scope searched for sub views 2025-09-28 19:46:11 +05:30
Kovid Goyal
b6f9080486
Use explicit constraints for the titlebar bg view
Easier to reason about
2025-09-28 17:20:37 +05:30
Kovid Goyal
791902caad
... 2025-09-28 17:03:33 +05:30
Kovid Goyal
09133a7039
Use only one subview for translucent titlebar 2025-09-28 17:01:10 +05:30
Kovid Goyal
57345af8e9
Move titlebar background setting to after window stylemask is set
The titlebar height calculation depends on the stylemask
2025-09-28 16:20:52 +05:30
Ethan Wu
7589bf4b11 Revert "Workaround for latest Apple regression in Tahoe"
This reverts commit d837a64e36.

Commit 24b31d96e9 fixes the original
problem of "ghost windows" that d837a64 was trying to solve. (I have no
idea how or why it does.)

One side-effect of the workaround from d837a64 is that it causes closed
windows to be moved to the (0,0) before being destroyed. This means that
when creating new windows, they are placed on the left-most display,
instead of the display in which the previously closed window was on as
you would expect. Reverting this kludge fixes this bug.
2025-09-22 16:50:31 -07:00
Kovid Goyal
982b5156e1
macOS: When toggling in the quick access terminal move it to the currently active screen
Fixes #9003
2025-09-22 20:04:42 +05:30
Kovid Goyal
7af7aa95c6
Another workaround for another macOS Tahoe bug
Dont redraw an OSWindow during a resize event if the resize event is
accompanied by a screen change as it causes a crash in macOS OpenGL
driver. Fixes #8983
2025-09-19 12:05:34 +05:30
Kovid Goyal
24b31d96e9
No need to use a block as Apple docs guarantee that NSApplicationDidChangeScreenParametersNotification is posted on the main thread 2025-09-19 08:52:09 +05:30
Kovid Goyal
177a3f9e51
DRYer 2025-09-16 08:18:42 +05:30
Kovid Goyal
148d60b9ea
Make CodeQL happy 2025-09-16 07:57:33 +05:30
Kovid Goyal
d837a64e36
Workaround for latest Apple regression in Tahoe
Now NSWindow::close no longer actually closes the window. Sigh. Have to
also set its frame to zero size, otherwise an invisible rect remains
that intercepts mouse events and takes up space in Mission Control.

Life is too short for this shit. Fixes #8952
2025-09-05 17:27:46 +05:30
Kovid Goyal
b7c4f42e96
Move preservation of OpenGL context into glfw
Allows us to avoid creating an extra hidden window.
2025-09-05 15:29:06 +05:30
Kovid Goyal
21fa5bb1ce
macOS: focusing of minimized window broken
This was done to fix #8913 in d7c2cdc.
Explicitly de-miniaturize before making key.
2025-08-23 07:49:06 +05:30
Kovid Goyal
d7c2cdccb1
macOS: Fix closing an OS Window when another OS Window is minimized causing the minimized window to be un-minimized
This is a bug we inherited from GLFW.
Fixes #8913
2025-08-18 21:26:54 +05:30
Kovid Goyal
3638adda6c
macOS: Elaborate dance to work around yet another Cocoa bug
Fixes #8740
2025-08-18 16:01:51 +05:30
Kovid Goyal
6beded7b49
Cleanup previous PR 2025-08-18 14:45:18 +05:30