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
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
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
3cf24afdc0
Refactor drop API and implement it on Wayland
2026-02-08 22:05:14 +05:30
Kovid Goyal
07a9f2bcaa
API to start a drag
2026-02-07 13:50:16 +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
779fb0d5c5
Cancel momentum scroll on button and key events
2026-01-09 13:15:37 +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
32f7f8d321
Remove unneeded axis event timestamp
2026-01-05 20:13:33 +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
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
71a7dda522
...
2025-12-05 07:51:04 +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
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
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
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
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
6f689f3221
Work on keyboard grabbing functionality
2025-05-18 11:37:11 +05:30
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
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
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
Kovid Goyal
27df509206
Nicer fix for enter event mouse tracking
...
Send an explicit mouse event to child when pointer enters window instead
of relying on GLFW to send a cursor position update event.
2025-03-04 11:29:29 +05:30
Kovid Goyal
0339d59851
Wayland: Fix mouse pointer position update not being sent when focus regained
...
GLFW Wayland backend was not sending a cursor position input event on
mouse entering the window surface.
Fixes #8397
2025-03-04 06:03:42 +05:30
Kovid Goyal
50f64d5981
Only use window occlusion on platforms where it is supported
2025-02-12 12:02:46 +05:30
Kovid Goyal
2cf83070a0
Report ancient xdg-shell versions
2025-02-12 11:31:28 +05:30
Kovid Goyal
b256f56afb
...
2025-01-21 15:13:54 +05:30
Kovid Goyal
7346aca56d
Function to probe for Wayland compositor name
...
Maybe needed to workaround #8236
2025-01-21 15:10:07 +05:30
Kovid Goyal
b0ebd340fe
Function to get the current system color theme
2024-11-07 12:47:06 +05:30
Kovid Goyal
627360e5ad
Bind the idle inhibit protocol even though it is currently unused
2024-08-27 11:32:06 +05:30
Kovid Goyal
a43188e778
Fix #7571
2024-06-24 18:21:28 +05:30
Kovid Goyal
48070ff38e
Fix #7481
2024-05-28 15:14:13 +05:30
Kovid Goyal
6e1df67e03
Use xdg-shell version 6
...
This gives us window "suspended" events. Theoretically these could be
used to implement glfwWindowIconified() and thereby not render suspended
OS windows. However let's wait a bit and see how this stabilizes. There
are all sorts of bugs around this currently, for example:
https://gitlab.gnome.org/GNOME/mutter/-/issues/3435
https://gitlab.gnome.org/GNOME/mutter/-/issues/3229
https://bugreports.qt.io/browse/QTBUG-124450
2024-05-05 13:24:45 +05:30
Kovid Goyal
8d1b0e54af
Use double for wayland float calculation
2024-04-19 22:23:01 +05:30
Kovid Goyal
e531791f79
Code to get peer pid on a few more platforms
2024-04-15 19:14:29 +05:30
Kovid Goyal
5b587060a4
Fix #7346
2024-04-15 16:07:38 +05:30
Kovid Goyal
ac4eef7eb3
Another try at pointer frame support on Wayland
...
This time I think I got the wheel handling correct. At least works with
my wheel mouse.
2024-04-08 19:07:52 +05:30
Kovid Goyal
48ed574b4f
...
2024-04-08 13:04:11 +05:30
Kovid Goyal
8fc96c5bd7
Make the debug logging functions consistent
...
They now all output the same format of:
[time since program start] msg
2024-04-08 12:53:55 +05:30
Kovid Goyal
bf60321466
Use individual surfaces for corner and bar shadows
...
Simplifies a bunch of code and also gives us the option at a later date
to turn off some shadows selectively when the window is in a tiled
state.
2024-04-07 22:28:41 +05:30
Kovid Goyal
a158fa108b
CSD pointer enter is the same as move
2024-04-06 12:51:09 +05:30