Commit Graph

370 Commits

Author SHA1 Message Date
Kovid Goyal
06e7f5ec37 Fix #9306 2025-12-20 08:54:22 +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
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
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
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
148d60b9ea Make CodeQL happy 2025-09-16 07:57:33 +05:30
Kovid Goyal
caba27240b Add some missing assertions
Port from upstream glfw: 38ec7abd3baffdd3ec4e6f8cbb5384cda8882ae3
2025-08-16 07:38:54 +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
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
46114c251b Create the color manager object for a window surface 2025-07-31 15:24:21 +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
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
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
be9624bbdd Fix px suffix for lines/columns not working 2025-05-02 08:11:49 +05:30
Kovid Goyal
f04fc251bf Start work on full panel support in X11 2025-05-01 15:44:08 +05:30
Kovid Goyal
df052edae8 Wayland: Also set layer shell surface layer when showing surface
Without this on KDE the layer is reset to background.
2025-04-30 06:38:12 +05:30
Kovid Goyal
5abc33bcf2 Layer shell: inform compositor of newly desired window size when changing layer shell config
Without this non-sway compositors dont send a layer shell configure
event after the surface commit.

Fixes #8566
2025-04-23 19:26:13 +05:30
Kovid Goyal
c1b6b4494a Implement starting kitty hidden
Fixes #3466
2025-04-23 08:50:02 +05:30
Kovid Goyal
3c4a8a1e7e Resize OS panels on font size change 2025-04-23 07:43:36 +05:30
Kovid Goyal
ae01cf3c1c Refactor layer shell size callback to support multiple backends 2025-04-23 07:43:36 +05:30
Kovid Goyal
40f18ac507 make kwin bug searchable 2025-04-22 14:57:08 +05:30
Kovid Goyal
dd5401ebed ... 2025-04-22 14:56:39 +05:30
Kovid Goyal
26affb3513 ... 2025-04-22 14:54:23 +05:30
Kovid Goyal
4c0a7223c1 Fix show/hide of OS windows on wayland 2025-04-22 14:53:35 +05:30
Kovid Goyal
8b6a210ac1 Allow specifying --listen-on for panel kitten 2025-04-22 14:29:32 +05:30
Kovid Goyal
22fe41a047 Workaround KDE layer shell bug 2025-04-22 13:46:38 +05:30
Kovid Goyal
fc5fc7c9c4 Remote control: Allow modifying desktop panels and showing/hiding OS Windows using the kitten @ resize-os-window command
Also move the visibility toggle debounce into C code with a per OS
Window timer.

Fixes #8550
2025-04-22 13:34:09 +05:30
Kovid Goyal
c1a9873530 API to set layer shell config for existing window 2025-04-22 11:13:32 +05:30
Kovid Goyal
db5b691545 Show a debug message indicating we are waiting for layer shell configure event 2025-04-22 10:49:44 +05:30
Kovid Goyal
5e2d44ce15 Make passing layer shell config to glfw not use a global variable 2025-04-22 10:45:28 +05:30
Kovid Goyal
85d58de035 kitty can finally natively implement a quake like terminal dropdown
Currently Wayland (except for GNOME as usual) only.
2025-04-21 20:28:56 +05:30
Kovid Goyal
3ce734ce9c launch: Allow creating desktop panels
Now users can use mappings or remote control to popup new desktop panels
on Wayland in addition to new desktop windows.

Fixes #8549
2025-04-21 14:59:31 +05:30
Kovid Goyal
a8693e45ef Nicer error message when running panel kitten on a compositor that does not support layer shell 2025-04-21 13:39:16 +05:30
Kovid Goyal
64b5d2d187 More precise error on resize panel attempt 2025-04-21 12:32:20 +05:30
Kovid Goyal
e2cf1e9185 Dont crash when user attempts to resize panel via remote control
Fixes #8550
2025-04-20 15:19:35 +05:30
Kovid Goyal
5d2e258c35 Wayland: When the compositor supports the xdg-system-bell protocol use it to play the default bell sound 2025-04-16 15:48:51 +05:30
Kovid Goyal
49092f5a94 Add new wayland top level state enum values 2025-04-09 19:23:27 +05:30
Kovid Goyal
3c57cc02f7 Wayland: panel kitten: Fix incorrect initial font size on compositors such as Hyprland that set scale late in the window creation process
Fixes #8496
2025-03-30 16:19:52 +05:30
Kovid Goyal
2c0bc79be1 Typo causing crash on Waylnd compositors that dont support xdg-toplevel-icon
Fix #8471
2025-03-24 14:23:32 +05:30
Kovid Goyal
b34a88065b Wire up clipboard lost events 2025-03-12 09:26:36 +05:30
Kovid Goyal
3b8e0e209b Wayland: Allow overriding the kitty OS Window icon on compositors that implement the xdg-toplevel-icon protocol 2025-03-10 12:32:03 +05:30
alex-huff
9188d6a664 Wayland: added --edge=center option for panel kitten 2025-03-07 11:11:07 -06:00