Commit Graph

1045 Commits

Author SHA1 Message Date
Kovid Goyal
7c14e0d666 macOS: Fix an abort when changing OS window chrome for a full screen window via remote control or the themes kitten
Fixes #7106
2024-02-09 15:32:09 +05:30
Kovid Goyal
7038292d11 Merge branch 'master' of https://github.com/solopasha/kitty 2024-01-19 14:03:30 +05:30
Kovid Goyal
b33f8416db Fix for spurious github code scanning alert 2024-01-19 14:01:26 +05:30
Pavel Solovev
99b3d0727d Fix build with gcc14 2024-01-19 11:25:53 +03:00
Kovid Goyal
1593baa9f9 remove unused include 2024-01-18 21:38:18 +05:30
Kovid Goyal
54900183ec Fix #6997 2024-01-16 13:38:12 +05:30
Jin Liu
e20eff277b Fix Wayland cursor-shape-v1 cursor not updating
According to https://wayland.app/protocols/cursor-shape-v1#wp_cursor_shape_device_v1:request:set_shape
> The serial parameter must match the latest wl_pointer.enter or
> zwp_tablet_tool_v2.proximity_in serial number sent to the client.

So we can't use wl.serial or wl.pointer_serial, because they are also updated in other places.
2024-01-04 19:54:03 +08:00
Kovid Goyal
c76db4bfb4 Wayland: Redraw titlebar title on font size change
Fixes #6945
2023-12-25 17:20:52 +05:30
Kovid Goyal
4519b3abee Enable cursor shape on Wayland
Cant replicate the hyprland crash, so am not going to bother about it.

Fixes #6914
2023-12-24 22:56:01 +05:30
Kovid Goyal
cff490f881 Wayland: Add support for the new cursor-shape protocol
It is currently disabled because no compositor seems to support it.
Hyprland reports it as available but using it causes Hyprland to crash.
Plasma 6 is supposed to have it but I am not installing a beta just for
this.

Typical Wayland.
2023-12-24 18:45:17 +05:30
Kovid Goyal
7d8c017215 DRYer 2023-12-24 15:03:56 +05:30
Felix Kratz
912c5ce4f9 dont reuse cascade point on another display
fix wording

reset cascade point to zero point
2023-12-21 11:30:50 +01:00
Kovid Goyal
b2587c1d54 Fix modifier reporting on macOS
We make use of the fact that the device dependent modifiers flags
actually report left/right modifier. Code taken form SDL, with thanks.
2023-12-14 11:31:48 +05:30
Kovid Goyal
00f8f340bf macOS: Fix returning from full screen via the button when the titlebar is hidden not hiding the buttons
Fixes #6883
2023-12-10 22:30:15 +05:30
Kovid Goyal
69a5c7e3b2 Wayland: Fix a regression in the previous release that broke copying to clipboard under wl-roots based compositors in some circumstances
As is usual in Wayland land, utter chaos. Divergent implementations,
incorrect interpretations of the spec, bla bla.

Fixes #6890
2023-12-08 08:38:08 +05:30
Jin Liu
293cd40509 Get cursor theme from desktop portal in non-GNOME desktops
Even if current DE is not GNOME, it may still use the GNOME
desktop portal as a fallback for Settings (e.g. KDE). So if
the user installed xdg-desktop-portal-gtk, and KDE synced
its cursor theme with GNOME, then we can still get it from
the GNOME namespace in the Settings.ReadAll result from the
portal.
2023-12-02 15:00:03 +08:00
Kovid Goyal
53980d00f0 a couple more tests 2023-12-01 18:16:22 +05:30
Kovid Goyal
77292a16d6 Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
114b8dff51 ... 2023-11-03 20:01:33 +05:30
Kovid Goyal
61429c73c7 Wayland: Fix primary selections not working with the river compositor
Fixes #6785
2023-11-03 19:57:54 +05:30
Kovid Goyal
1c1519c6e4 micro optimization 2023-10-25 18:41:27 +05:30
Kovid Goyal
ae4a13b249 Better fix for macOS deadlock
Fix it in glfw. Dont hold the tick lock when calling the tick callback
as the tick callback might be waiting on a lock.
2023-10-25 18:32:07 +05:30
Kovid Goyal
fa53ac7896 Fix deprecation warning for compositing operation 2023-10-18 06:12:31 +05:30
Kovid Goyal
e9e1a7a7c3 Fix the diagonal resize shapes on Linux 2023-10-17 21:15:20 +05:30
Kovid Goyal
187fa996f8 Add the cell pointer shape 2023-10-16 20:33:12 +05:30
Kovid Goyal
792b74503c Implement mouse shape support for macOS
Code for loading hidden system cursors not available via NCursor comes
from the SDL library, with thanks.
2023-10-15 09:42:06 +05:30
Kovid Goyal
4f1971c480 Rationalize mouse cursor shape handling
Now can use the full range of standard mouse cursor shapes similar to
those supported by browsers via the CSS cursor property.

Still needs to be fully implemented for cocoa backend.
2023-10-15 09:17:31 +05:30
Kovid Goyal
d9cd92d4ed ... 2023-10-03 12:07:19 +05:30
Kovid Goyal
4b41a7d182 Fix #6650 2023-10-03 12:04:54 +05:30
Kovid Goyal
4c37fff496 Fix secure restore state runtime warning from cocoa being printed to stderr 2023-10-03 11:23:56 +05:30
Kovid Goyal
f63bbfc88c Wayland: Do not request idle inhibition for full screen windows
Fixes #6613
2023-09-12 16:43:46 +05:30
Kovid Goyal
aad330135c cursor-shape depends on tablet-unstable 2023-09-04 12:36:21 +05:30
Kovid Goyal
2f20bb3f43 Bump bundled Wayland version so we can use the new cursor shape protocol
The existing wayland cursor shape protocol is an awful mess with a years
long unfixed crashing bug: https://github.com/kovidgoyal/kitty/issues/4878#issuecomment-1134259604

If this new protocol is adopted by most compositors it can work around
this. Currently wlroots and KDE I think. GNOME as usual will likely
refuse to implement anything actually useful.
2023-09-02 13:41:07 +05:30
Kovid Goyal
630101204b macOS: Disable OS window shadows for transparent windows as they cause rendering artifacts due to Cocoa bugs
Fixes #6439
2023-07-22 11:20:37 +05:30
Kovid Goyal
9e0e23ae99 macOS: Fix a regression that caused the titlebar to be translucent even for non-translucent windows
Fixes #6450
2023-07-12 10:24:51 +05:30
Kovid Goyal
5f8610f7bc macOS: Add a new value titlebar-and-corners for :opt:hide_window_decorations that emulates the behavior of hide_window_decorations yes in older versions of kitty 2023-07-11 22:27:47 +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
72f283e7f7 macOS: Fix a regression that caused rendering to hang when transitioning to full screen with macos_colorspace set to default
YACOB (Yet Another COcoa Bug)
Fixes #6435
2023-07-10 19:33:25 +05:30
Kovid Goyal
7d2dc252f1 ... 2023-07-05 21:50:46 +05:30
Kovid Goyal
95d15648fa Fix not building with wayland-protocols 1.32
Fix #6422
2023-07-05 10:33:56 +05:30
Kovid Goyal
d3f14ffbf4 macOS: Fix window shadows not being drawn for transparent windows
Re-organize the whole infrastructure for setting window chrome, doing it
in a single function that has access to all settings.

Fixes #2827
Fixes #6416
2023-07-04 11:59:50 +05:30
Kovid Goyal
7c6d40fa0c Implement background blur for KDE on X11 as well 2023-06-27 14:56: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
olzhasar
d0a5d1b3a4 Fix misspellings 2023-06-14 03:39:53 +06:00
Kovid Goyal
89875af5e6 Fix jerky behavior when live resizing an OS window on platforms that report live resize being and end events
Also disable live resize begin/end events on Wayland since they are not
reliable.

On platforms that support live resize begin/end use a separately
configurable pause time before the screen is redrawn.

Fixes #6341
2023-06-07 14:31:39 +05:30
Derek Schrock
3b57acf03c More cases of #5477 functions with empty argument lists
Building on macOS 13.3.1 (22E261) clang 14.0.3 (clang-1403.0.22.14.1)
running to errors like #5477 where functions without argument lists at
least need void.

Looking for possible suspect functions via:

  git grep -E "^([A-Za-z_]+ )?[A-Za-z_]+\()" \*.c \*.m
2023-04-16 01:09:36 -04:00
Kovid Goyal
66801b6b28 GLFW API to track system color scheme dark/light
Implemented only on macOS and Wayland.
2023-04-13 13:16:33 +05:30
Kovid Goyal
672ecde68b X11: Fix a crash if the X server requests clipboard data after we have relinquished the clipboard
Fixes #5650
2023-03-07 13:53:07 +05:30
Kovid Goyal
cd8bb462c3 Add KITTY_VCS_REV for release builds as well 2023-02-28 19:41:28 +05:30
Kovid Goyal
935a36f5a8 Allow specifying VCS revision on the build command line 2023-02-28 13:05:43 +05:30