Commit Graph

1308 Commits

Author SHA1 Message Date
Kovid Goyal
363afac8af Fallback to eglGetDisplay() when eglGetPlatformDisplayEXT() returns EGL_NO_DISPLAY 2025-08-16 08:13:40 +05:30
Kovid Goyal
5ca22d660e Nicer error handling when EGL context initialize fails 2025-08-16 08:04:48 +05:30
Kovid Goyal
caba27240b Add some missing assertions
Port from upstream glfw: 38ec7abd3baffdd3ec4e6f8cbb5384cda8882ae3
2025-08-16 07:38:54 +05:30
Kovid Goyal
cb42fd82a4 EGL: Fix GLFW_CONTEXT_NO_ERROR on Mesa
Mesa EGL requires the context version to be set to 2.0 or greater before
EGL_CONTEXT_OPENGL_NO_ERROR_KHR in the attribute list.

Without this, context creation via Mesa EGL with
EGL_CONTEXT_OPENGL_NO_ERROR_KHR set fails with EGL_BAD_ATTRIBUTE.

Port from upstream glfw: eeeb56eb23c9a23866e8042fb23d7b0b4d96d106
2025-08-16 07:30:32 +05:30
Kovid Goyal
8e39041619 Add assertions for context function invariants
Port from upstream glfw
See 93d70cb6a8c9571b5b493936596633a1a8538cea
2025-08-16 07:27:20 +05:30
Kovid Goyal
8b9d802206 Specify the color space on Wayland surfaces
Uses sRGB with the sRGB transfer function. Seems to give identical
results as not specifying a color space. But sadly does not get the
compositor to blend in linear space, we need another wayland protocol
extension for that I suppose. Sigh.
2025-07-31 19:18:09 +05:30
Kovid Goyal
2ffa8cd7c2 Apparently gamma22 gives incorrect colors or at least colors different from rendering without color management. srgb transfer function gives expected colors. 2025-07-31 19:07:28 +05:30
Kovid Goyal
caa654b6b8 Also track needed color manager features 2025-07-31 18:53:24 +05:30
Kovid Goyal
12c6d799b7 ... 2025-07-31 18:34:29 +05:30
Kovid Goyal
d37bd7afcf Create the sRGB colorspace description we need 2025-07-31 18:30:47 +05:30
Kovid Goyal
df22e8c9b7 Only report missing features when color manager itself is supported 2025-07-31 15:41:17 +05:30
Kovid Goyal
fe860d170f Track that the compositor supports the sRGB primary 2025-07-31 15:39:55 +05:30
Kovid Goyal
46114c251b Create the color manager object for a window surface 2025-07-31 15:24:21 +05:30
Kovid Goyal
77106b1035 DRYer 2025-07-31 15:15:49 +05:30
Kovid Goyal
8762576a5b Also track support for extlinear transfer function 2025-07-31 15:12:26 +05:30
Kovid Goyal
d0a862bedb Get the color manager capabilities from the compositor 2025-07-31 15:09:18 +05:30
Kovid Goyal
f04e963683 Bind the wayland color manager interface 2025-07-31 14:37:42 +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
7738c55c4b Wayland: Fix incorrect window size calculation when transitioning from fullscreen to non-fullscreen with client side decorations
Fixes #8826
2025-07-17 20:36:38 +05:30
Kovid Goyal
2456574992 Wayland: Only rely on keyboard enter/leave events for OS window focus state
GNOME has broken activated==focused assumption GLFW used to make. Also
follows upstream GLFW behavior. c2f0a0ae59

Fixes #8716
2025-06-09 06:52:56 +05:30
Kovid Goyal
255dd2845e Implement grab keyboard for x11 2025-05-18 14:49:07 +05:30
Kovid Goyal
abc9b1fc48 ... 2025-05-18 12:06:10 +05:30
Kovid Goyal
82523b14df Wayland: Dont loose keyboard grab when new OS window created 2025-05-18 11:43:41 +05:30
Kovid Goyal
6f689f3221 Work on keyboard grabbing functionality 2025-05-18 11:37:11 +05:30
Jin Liu
4c6c38929b panel kitten: on Wayland, use app-id for the LayerShellV1 namespace parameter
The Wayland LayerShellV1 protocol doesn't allow setting window class/name/role/type/appId.
Instead, it has a `namespace` parameter that we currently hardcode to `kitty`. It
seems suitable to use app-id for this parameter.

Example use case:
kwin use the `namespace` parameter and an undocumented mapping to set window type for
Layer Shell windows. E.g., "dock" maps to NET:Dock. So if we set `app_id dock` in
quick_access_terminal.conf, the panel would be considered a dock, and won't have the
normal scale in/out animation on shown/hidden.
2025-05-15 23:55:48 +08:00
Kovid Goyal
8017945551 Wayland: Add support for the xdg-toplevel-tag protocol
Now you can use --name or its alias --os-window-tag to set the tag.
2025-05-15 09:35:42 +05:30
Kovid Goyal
6282a46ff1 A new centered panel type that is sized 2025-05-13 16:38:57 +05:30
Kovid Goyal
88f4c829eb Improve handling of output names
Now can use panel --output-name list to list available outputs.
Also, --output-name works on macOS
2025-05-13 15:29:37 +05:30
Kovid Goyal
8e12cccf26 ... 2025-05-13 08:00:35 +05:30
Kovid Goyal
20d6a8e4c5 Fix building on older Cocoa 2025-05-13 07:45:11 +05:30
Kovid Goyal
9ed6be9272 Quick access terminal: Allow toggling the window to full screen and map using the standard kitty toggle_fullscreen shortcut
Fixes #8626
2025-05-12 15:20:48 +05:30
Kovid Goyal
015ee41d0f ... 2025-05-12 13:17:46 +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
8a14a5638a ... 2025-05-08 15:30:09 +05:30
Kovid Goyal
2fed0ec562 Linux: Handle desktop settings portals that are so old they don't implement ReadOne
Sigh, outdated Linux software, just creating busy work for everyone.
2025-05-08 15:22:42 +05:30
Kovid Goyal
d22381491d Restore top/bottom panel functionality on i3 2025-05-03 11:12:32 +05:30
Kovid Goyal
43be32a3d7 More atoms 2025-05-02 12:20:54 +05:30
Kovid Goyal
958489f97d X11: Workaround for floating window position on KDE 2025-05-02 10:11:15 +05:30
Kovid Goyal
afe7dc47c2 Update size in addition to position when updating layer properties 2025-05-02 09:35:25 +05:30
Kovid Goyal
11cb3adb8f Reduce roundtrips to X server to fetch atom values 2025-05-02 09:28:24 +05:30
Kovid Goyal
a9bc9962f4 X11: add support for --output-name 2025-05-02 08:37:49 +05:30
Kovid Goyal
a2631448e5 X11: fix window type for non background layers 2025-05-02 08:20:51 +05:30
Kovid Goyal
be9624bbdd Fix px suffix for lines/columns not working 2025-05-02 08:11:49 +05:30
Kovid Goyal
6c0e5f09d3 Fix layer size calculation on high DPI displays under X11 2025-05-02 08:01:35 +05:30
Kovid Goyal
ca688be41c Use focus policy for controlling input on X11 2025-05-01 21:42:00 +05:30
Kovid Goyal
07342ca801 Fix strut allocation 2025-05-01 21:28:22 +05:30
Kovid Goyal
28dbb4681d Fix margins for background and input for docks 2025-05-01 20:58:49 +05:30
Kovid Goyal
f04fc251bf Start work on full panel support in X11 2025-05-01 15:44:08 +05:30
Kovid Goyal
a6b8a7305c Better error message when X11 window manager doesnt support the needed Atoms for panels 2025-04-30 20:58:57 +05:30
Kovid Goyal
edcfd17ca9 Panel kitten: Add option to hide panel on focus loss 2025-04-30 07:46:41 +05:30