Kovid Goyal
fe5ccc144b
Finish glfw side support for layer shell
2024-03-24 20:48:20 +05:30
Kovid Goyal
0641ec2d89
GLFW API for configuring a window as a layer shell
2024-03-24 20:48:20 +05:30
Kovid Goyal
1c9f9a74e8
Wayland KDE: Add support for background_blur under kwin using a kwin private Wayland protocol
2024-03-22 13:41:44 +05:30
Kovid Goyal
83468535dd
Implement support for preferred buffer scale
2024-03-21 20:53:36 +05:30
Kovid Goyal
55115058d2
Scale pointer axis events by effective scale
2024-03-21 20:53:36 +05:30
Kovid Goyal
776bfa3d7e
Basic fractional scale protocol works
2024-03-21 20:53:36 +05:30
Kovid Goyal
6979f1c5eb
Add listener for fractional scale events
2024-03-21 20:53:36 +05:30
Kovid Goyal
eb42ad3a2b
Rename scale to integer_scale
...
We will presumably have a fractional_scale soon
2024-03-21 20:53:36 +05:30
Kovid Goyal
ce2e1b0813
Ensure we dont pass a NULL pointer to wl_pointer_set_cursor()
...
Possible fix for #7139
2024-02-20 23:31:18 +05:30
Kovid Goyal
1593baa9f9
remove unused include
2024-01-18 21:38:18 +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
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
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
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
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
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
f63bbfc88c
Wayland: Do not request idle inhibition for full screen windows
...
Fixes #6613
2023-09-12 16:43:46 +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
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
Luofan Chen
130315ce8d
Use strict function prototypes
...
Fixes clang error:
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
2023-02-09 13:16:00 +08:00
Kovid Goyal
3f65ce0e71
Make sizes explicit in a few reallocs
2022-12-13 12:11:37 +05:30
Kovid Goyal
fefafda9a0
Fix #5764
2022-12-12 21:26:54 +05:30
Kovid Goyal
4c72f92939
Wayland GNOME: Workaround for latest mutter release breaking full screen for semi-transparent kitty windows
...
Destroy the CSD surfaces when window goes full screen.
Fixes #5677
2022-11-28 14:19:13 +05:30
Kovid Goyal
f127523ae9
Get rid of the unneccessary swap on first configure
...
Instead use the new flag to indicate the surface should not be committed
till the next swap.
2022-11-14 15:42:07 +05:30
Kovid Goyal
88b829fc9b
cleanup comment
2022-11-01 12:22:05 +05:30
Kovid Goyal
f6f2f00c53
Add a note about wayland semantics
2022-11-01 12:13:23 +05:30
Kovid Goyal
2435a8ccfd
Wayland GNOME: Fix incorrect window size when in some circumstances when switching between windows with window decorations disabled
...
Only call wl_surface_commit() after a resize when the correct size buffer is
attached to the surface. This is ensured by setting a flag on the window that prevents
all surface commits till it is cleared. The flag is cleared at next
eglSwapBuffers().
I dont actually understand if this guarantees that the
buffer size is always correct. For example, if the back buffer is
latched when wl_egl_resize_window() is called, the backbuffer will be
correct only after two swaps (I think). Or maybe the old back buffer is
discarded, I cant find any documentation about it.
All I can say is that doing it this way seems to fix the issue.
Thanks to @jadahl for his help with tracking down the root cause.
Fixes #4802
2022-10-31 21:59:01 +05:30
Kovid Goyal
f5126c664c
Wayland KDE: Fix abort when pasting into Firefox
...
Dunno why kwin uses drag and drop callbacks when pasting into Firefox on
Wayland, but then this is Wayland, so every stupid thing imaginable will
be done at least once.
Fixes #5603
2022-10-19 11:28:33 +05:30
Kovid Goyal
fe2f3d9870
Wayland: Remove the mutter specific ignoring of the first empty surface configure event. It seems to be no longer necessary on current mutter, with the recent Wayland changes
2022-09-11 14:37:50 +05:30
Kovid Goyal
dcf2152a7a
Wayland: Generate a XDG_ACTIVATION_TOKEN when opening URLs or running programs in the background via the launch action
2022-09-11 14:25:49 +05:30
Kovid Goyal
58a3baaf0f
Wayland: Use XDG_ACTIVATION_TOKEN when present at launch
2022-09-11 13:43:52 +05:30
Kovid Goyal
ba8d30896b
Try to use the activation protocol to focus windows
2022-09-11 10:39:28 +05:30
Kovid Goyal
4d30ae55f3
Wayland: Mark windows in which a bell as urgent on compositors that support the xdg-activation protocol
2022-09-11 09:33:41 +05:30
Kovid Goyal
0bf228b030
Wayland: Micro-optimization: Assume window will be shown on primary monitor so create it with its scale set to that of the primary monitor
2022-09-10 15:23:56 +05:30
Kovid Goyal
29b3a92ffc
Wayland: swap buffers immediately on scale change to ensure attached buffer is a multiple of the new scale
...
Earlier we were only swapping buffers when ready to draw, but the
Wayland protocol requires the attached buffer to be a multiple of the
scale. We cannot guarantee an application side swap will be triggered
before the next commit, so instead we blank the new buffer swap it in
the GLFW backend itself.
Fixes #5467
2022-09-10 15:09:46 +05:30
Kovid Goyal
bc650f6230
Output initial window creation size in debug
2022-09-10 12:28:53 +05:30
Kovid Goyal
1e7a11b278
Wayland: When swapping buffers in response to a configure event ensure the window is the current context otherwise the swap fails
...
The swap failing will mean the buffer is not attached which might cause
issues with some compsitors.
2022-09-10 10:22:09 +05:30
Kovid Goyal
91c00fb5ac
Implement the new clipboard API for Wayland
2022-09-08 17:29:18 +05:30
Kovid Goyal
b60d9f73ce
Wayland: Fix remembering window size not accurate when client side decorations are present
2022-09-04 14:25:04 +05:30
Kovid Goyal
cd369f633a
Wayland: Ensure that opengl buffer swapping does not happen till the xdg surface is configured
2022-06-28 10:47:33 +05:30
Kovid Goyal
72dfa74b3e
Avoid an extra buffer swap during startup
...
glfw should not be swapping buffers behind the clients back. Since we
control the client, we can ensure that the OpenGL VRAM is cleared before
the window is shown.
Also fixes the issue with the glfw wayland backend where the buffer was
being created before the surface was configured
2022-06-28 09:25:24 +05:30
Kovid Goyal
c48bf4fd85
Output debug lines for when kitty sets the pointer in Wayland
2022-04-30 09:13:08 +05:30
Kovid Goyal
5c03a52a0b
...
2022-03-29 15:34:34 +05:30
Kovid Goyal
51c8e3b2c6
Add some more debug about scale changes
2022-03-29 09:47:48 +05:30
Kovid Goyal
06da2b88ff
Also check if states are empty
2022-03-17 17:51:21 +05:30
Kovid Goyal
91b9110dcc
Workaround for bug in mutter that caused first OS window to not have functional CSD when launched from activities
...
Fixes #4802
2022-03-17 17:35:56 +05:30