Kovid Goyal
71a7dda522
...
2025-12-05 07:51:04 +05:30
Kovid Goyal
3b78fd646e
...
2025-12-03 22:57:14 +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
76f9cdc426
...
2025-11-22 20:03:01 +05:30
Kovid Goyal
35d95d7a43
Also remove shadow from zero sized window
...
Hopefully that means no clickable region at all?
2025-11-12 14:01:37 +05:30
Kovid Goyal
98e13787a9
...
2025-11-12 12:23:24 +05:30
Kovid Goyal
81f429d52b
Move the code to cycle through OS Windows into glfw
2025-11-12 12:02:38 +05:30
Kovid Goyal
a4a7f77ef1
Use __block rather than __weak since we are in manual ref counting regime
2025-11-12 09:31:31 +05:30
Kovid Goyal
33b9d858ad
Nano-optimisation: Avoid using a block with GCD
2025-10-22 13:40:42 +05:30
Kovid Goyal
6a6b0b47a3
Micro-optimize display link callback
...
Use a GCD block rather than a runtime selector with a boxed number
2025-10-22 13:35:02 +05:30
Kovid Goyal
878b502fc1
Cleanup previous PR
...
The locks were not being initialized, and since I was there did some
general cleanup as well, moved the locks array into displayLinks rather
than having another global namespaced variable.
2025-10-22 09:54:21 +05:30
Scott Lee
fc8f3ca6e2
Improve macOS idle wakeups handling
2025-10-22 07:38:10 +09:00
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
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
3ba6c3f4b9
macOS: Handle dropping of file promises into kitty in addition to file paths
...
Fixes #9084
2025-10-11 11:02:51 +05:30
alex-huff
1967fd9dd5
panel: implemented --edge=none on X11
2025-10-09 17:18:40 -05:00
Kovid Goyal
2babfa7ebf
macOS: Further restrict the live resize callback to only be used when live resize is actually in progress
2025-10-07 18:23:08 +05:30
Kovid Goyal
d3c5cb12c4
macOS: Dont do live resizing when window is fullscreen
...
The live resize causes crashes on some Tahoe machines due to macOS bugs.
It is not needed anyway when the window is fullscreen, so ignore it.
2025-10-07 08:57:57 +05:30
Kovid Goyal
a0699f5c9e
Remove the dropping of the first resize event since it did not fix the issue
...
Add a check to only callback if the thread is the main thread
2025-10-06 18:39:53 +05:30
Kovid Goyal
270c598f2c
macOS: Only live resize for resize events that occur in quick succession
...
Apparently on some systems Tahoe sends a resize event on wake from
sleep/lid open for obscure reasons and then proceeds to crash if one
redraws during that event. Sigh.
2025-10-02 19:39:13 +05:30
Kovid Goyal
a8e930c167
Fix titlebar color not working for opaque windows
...
As long as titlebar_color is not nil, we need a background view
2025-09-29 22:36:27 +05:30
Kovid Goyal
75ec41e08b
Make titlebar background view a child of the titlebar view itself
2025-09-29 22:02:38 +05:30
Kovid Goyal
13bbaee112
Only insert titlebar background view if the titlebar is transparent
2025-09-29 21:47:40 +05:30
Kovid Goyal
14f75c9a9b
DRYer
2025-09-29 17:44:24 +05:30
Kovid Goyal
d2cc22e7c6
macOS: React to changes in effective appearance of the NSApplication not the content view for each window
...
This is nicer now every OS Windows doesnt cause a notification. Also
fixes #9034 which was caused by us setting an explicit appearance on the
window when the titlebar is set to a specific color thereby preventing
the views in the window from getting appearance change notifications.
2025-09-29 17:17:46 +05:30
Kovid Goyal
f4867928b4
DRYer
2025-09-29 17:00:18 +05:30
Kovid Goyal
1252098016
DRYer
2025-09-29 09:09:49 +05:30
Kovid Goyal
fb4a3d7f17
Revert reversion of Tahoe fix in 7589bf4b11
...
It is still needed. Instead change the frame to havezero size and leaves
its origin unchanged.
2025-09-29 08:58:41 +05:30
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
e542cd8378
macOS: Fix a big where the color of a transparent titlebar was off when running in the release build versus the build from source. Also fix using a transparent titlebar causing the background opacity to be darkened.
...
There were two issues.
1) Setting window background color to a non-zero opacity causes
darkening (essentially there were two layers of blending)
2) The titlebar background view could end up in the wrong position
because it was a child of the content view rather than its super view
Fix both issues setting the window background to clear color and
moving the background view into the super view while making sure it is
positioned correctly using explicit constraints. Phew.
2025-09-28 21:24:00 +05:30
Kovid Goyal
e024226b0c
Dont need to set origin since we are setting anchors
2025-09-28 20:22:40 +05:30
Kovid Goyal
8bef718c9a
Tighten the scope searched for sub views
2025-09-28 19:46:11 +05:30
Kovid Goyal
b6f9080486
Use explicit constraints for the titlebar bg view
...
Easier to reason about
2025-09-28 17:20:37 +05:30
Kovid Goyal
791902caad
...
2025-09-28 17:03:33 +05:30
Kovid Goyal
09133a7039
Use only one subview for translucent titlebar
2025-09-28 17:01:10 +05:30
Kovid Goyal
57345af8e9
Move titlebar background setting to after window stylemask is set
...
The titlebar height calculation depends on the stylemask
2025-09-28 16:20:52 +05:30
Ethan Wu
7589bf4b11
Revert "Workaround for latest Apple regression in Tahoe"
...
This reverts commit d837a64e36 .
Commit 24b31d96e9 fixes the original
problem of "ghost windows" that d837a64 was trying to solve. (I have no
idea how or why it does.)
One side-effect of the workaround from d837a64 is that it causes closed
windows to be moved to the (0,0) before being destroyed. This means that
when creating new windows, they are placed on the left-most display,
instead of the display in which the previously closed window was on as
you would expect. Reverting this kludge fixes this bug.
2025-09-22 16:50:31 -07:00
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
7af7aa95c6
Another workaround for another macOS Tahoe bug
...
Dont redraw an OSWindow during a resize event if the resize event is
accompanied by a screen change as it causes a crash in macOS OpenGL
driver. Fixes #8983
2025-09-19 12:05:34 +05:30
Kovid Goyal
24b31d96e9
No need to use a block as Apple docs guarantee that NSApplicationDidChangeScreenParametersNotification is posted on the main thread
2025-09-19 08:52:09 +05:30
Kovid Goyal
177a3f9e51
DRYer
2025-09-16 08:18:42 +05:30
Kovid Goyal
148d60b9ea
Make CodeQL happy
2025-09-16 07:57:33 +05:30
Kovid Goyal
d837a64e36
Workaround for latest Apple regression in Tahoe
...
Now NSWindow::close no longer actually closes the window. Sigh. Have to
also set its frame to zero size, otherwise an invisible rect remains
that intercepts mouse events and takes up space in Mission Control.
Life is too short for this shit. Fixes #8952
2025-09-05 17:27:46 +05:30
Kovid Goyal
b7c4f42e96
Move preservation of OpenGL context into glfw
...
Allows us to avoid creating an extra hidden window.
2025-09-05 15:29:06 +05:30
Kovid Goyal
21fa5bb1ce
macOS: focusing of minimized window broken
...
This was done to fix #8913 in d7c2cdc .
Explicitly de-miniaturize before making key.
2025-08-23 07:49:06 +05:30
Kovid Goyal
d7c2cdccb1
macOS: Fix closing an OS Window when another OS Window is minimized causing the minimized window to be un-minimized
...
This is a bug we inherited from GLFW.
Fixes #8913
2025-08-18 21:26:54 +05:30
Kovid Goyal
3638adda6c
macOS: Elaborate dance to work around yet another Cocoa bug
...
Fixes #8740
2025-08-18 16:01:51 +05:30
Kovid Goyal
6beded7b49
Cleanup previous PR
2025-08-18 14:45:18 +05:30
zhaolei
ba8acf508f
make macos_titlebar_color background support transparent
2025-08-17 13:37:31 +08:00
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
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
4fa67c9ffd
macOS: Relayout layer shell windows on screen size change
2025-04-29 21:33:05 +05:30
Kovid Goyal
50b044f8a2
Allow popup menus from global menubar to function
2025-04-25 20:41:44 +05:30
Kovid Goyal
189d78283c
Get the quake terminal working on macOS
2025-04-25 20:27:26 +05:30
Kovid Goyal
2c2ddbb8f5
Remove useless animate parameter
2025-04-23 20:59:34 +05:30
Kovid Goyal
c3e1f2317b
Finish calculations for other panel types in cocoa
2025-04-23 20:36:35 +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
413a2b96e2
Prevent background panel launch taking focus from key window
2025-04-23 13:16:01 +05:30
Kovid Goyal
09eb5edcca
Get background panel basically working on macOS
2025-04-23 12:42:24 +05:30
Kovid Goyal
88735743cf
Allow negative margin values
2025-04-23 12:05:28 +05:30
Kovid Goyal
c1b6b4494a
Implement starting kitty hidden
...
Fixes #3466
2025-04-23 08:50:02 +05:30
Kovid Goyal
ca30b4196b
Prevent minimize/maximize/fullscreen for layer shell windows
2025-04-23 07:43:36 +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
c9bf7e4236
Factor out Cocoa layer shell code into the proper function
2025-04-23 07:43:36 +05:30
Kovid Goyal
e93338a81c
Start work on macOS support for panel kitten
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
alex-huff
a3a5f4fa24
Wayland: Updated anchor for edge=none to be consistent with documentation
2025-03-06 19:35:09 -06:00
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
ac6c652a4d
Fix #8398
2025-03-04 09:49:34 +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
0c47f81187
Remove special casing for Hyprland
...
Hyprland has now been fixed to send only a single fractional scale
event, so no need for special casing it.
2025-01-22 18:53:46 +05:30
Kovid Goyal
5e41de9505
...
2025-01-21 16:43:18 +05:30
Kovid Goyal
0527db876b
Wayland niri: Fix 250ms delay on startup when using scale 1
...
We special case Hyprland, hopefully the special casing can be removed
once https://github.com/hyprwm/Hyprland/issues/9126 is fixed.
Fixes #8236
2025-01-21 16:40:32 +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
055fb30bf2
macOS: Fix mouse cursor shape not always being reset to text cursor when mouse re-enters kitty
...
Fixes #8155
2024-12-25 08:26:56 +05:30
Kovid Goyal
af9e9fbc6f
Fix #8138
2024-12-20 08:58:35 +05:30
Robin Carlier
2005069f90
Panel: fix height, exclusive zone flag, better helptext
2024-11-24 10:48:37 +01:00
Robin Carlier
5f1c603220
Panel: add options for margin
2024-11-23 21:07:57 +01:00
Robin Carlier
ce2bcbb92d
Panel: add a edge=none option
2024-11-23 21:07:57 +01:00
Robin Carlier
4eb8e6052f
Panel: choose the display layer
2024-11-23 21:07:57 +01:00
Kovid Goyal
1ff74b86dc
Wayland GNOME: Workaround bug in mutter causing double tap on titlebar to not always work
...
Fixes #8054
2024-11-18 08:46:17 +05:30
Kovid Goyal
b0ebd340fe
Function to get the current system color theme
2024-11-07 12:47:06 +05:30
Kovid Goyal
239e08f268
When reading desktop settings from the portal provide a list of supported namespaces
...
The wlr portal doesnt work with an empty list. Sigh.
2024-11-07 11:10:27 +05:30
Kovid Goyal
754288557d
Track initial color scheme preference read on Linux
2024-11-07 10:38:13 +05:30
Kovid Goyal
16c82c7c16
Fix alpha conversion for wayland single pixel buffer
2024-10-20 09:35:28 +05:30
Kovid Goyal
61545a83e5
Fix #7982
2024-10-18 21:27:10 +05:30
Kovid Goyal
76cd68760a
...
2024-09-27 12:28:43 +05:30
Kovid Goyal
c0f04231ed
Move CVDisplayLink code into its own module
...
Apple has deprecated CVDisplayLink in favor of CADisplayLink which has
different semantics. So turn off deprecation warnings for
CVDisplayLink related code only until I can be bothered to port it to
CADisplayLink.
2024-09-27 12:12:12 +05:30
Kovid Goyal
271665dbaf
Temporary workaround for CVDisplayLink deprecation
...
Apple simply cannot get its APIs right on the first try, ever.
2024-09-26 01:13:10 +05:30
Kovid Goyal
f48bcb1a17
Wayland GNOME: Fix a crash when using multiple monitors with different scales and starting on or moving to the monitor with lower scale
...
Fucking GNOME and its fucking lack of support for SSD. How much of my
life I have wasted on these nincompoops.
Fixes #7894
2024-09-26 00:49:04 +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
3e8abaac58
...
2024-08-27 10:30:35 +05:30
Kovid Goyal
68401eddba
Wayland: Don't do two stage window creation
...
We cant make window visible after createwindow has returned because we
want to loop till the compositor fully creates the window and that loop
requires attaching a single pixel buffer to the window surface which
cannot be done once an OpenGL context is created for the window.
As far as I can see the preshow callback is not used on Wayland for
anything, so this should be OK to do.
2024-08-27 10:25:18 +05:30
Kovid Goyal
0594033b31
Wayland: Move creation of OpenGL context to end of window creation function
...
Apparently with explicit sync it is now not possible to attach a
temporary buffer to a surface that also has an OpenGL context. So we
first attach the temporary buffer, and only after we are done waiting
for window creation do we attach the OpenGL context to the window
surface.
Fixes #7767 (maybe, not installing sway-git to check)
2024-08-26 15:36:27 +05:30
Kovid Goyal
191ccf2d54
Wire up color scheme change notifications on X11 as well
2024-08-11 22:20:39 +05:30
Kovid Goyal
d7902f6b24
Wayland GNOME: Fix a small rendering artifact when docking a window at a screen edge or maximizing it
...
For some reason destroying the shadow surfaces causes mutter to render one of them at its old relative position. So workaround by not destroying the surfaces, modern mutter anyway seems to hide them when the window is docked.
Fixes #7701
2024-08-07 13:34:10 +05:30
Kovid Goyal
bd8162fa42
Add support for controlling the sound played with notifications
2024-08-03 13:46:38 +05:30
Kovid Goyal
89aa82e8d7
Pass the first notification type as category to the dbus server
2024-08-02 20:41:18 +05:30
Kovid Goyal
99df3c072c
Use the nicer stpcpy function
2024-08-01 11:11:30 +05:30
Kovid Goyal
6ffe2d82b8
On Linux use the notification server capabilities when responding to queries
2024-08-01 10:32:51 +05:30
Kovid Goyal
aa16918dd4
Implement support for buttons on notifications in Linux
2024-07-31 12:11:21 +05:30
Kovid Goyal
2bffea2bdc
Implement updating of notifications
2024-07-28 12:25:35 +05:30
Kovid Goyal
c18098d872
Cleanup DBUS send notification API
2024-07-26 23:57:36 +05:30
Kovid Goyal
2c90baf0b6
Get icon names working on linux
2024-07-26 23:57:36 +05:30
Kovid Goyal
7e610eb645
Get closing of notifications working on Linux
...
Also implement support for the ActivationToken signal
so that OS Windows are focused on Wayland when clicking
on a notification.
2024-07-25 12:22:58 +05:30
Kovid Goyal
d68e49fe64
Start work on refactoring notifications handling
...
Makes the code cleaner and easily mockable for testing.
Also, add code to handle closing notifications on Linux.
2024-07-25 06:45:10 +05:30
Kovid Goyal
314da124f3
macOS 15: Handle Fn modifier when detecting global shortcuts
...
Fixes #7582
2024-07-01 09:54:01 +05:30
Kovid Goyal
190566be8e
Wayland: Fix specifying the output name for the panel kitten not working
...
Fixes #7573
2024-06-25 12:53:37 +05:30
Kovid Goyal
a43188e778
Fix #7571
2024-06-24 18:21:28 +05:30
Kovid Goyal
48f053b8cc
Fix #7555
2024-06-18 05:59:12 +05:30
Adam Schmalhofer
8fabc47776
Fix Gnome 44 invisible title bar on Wayland
...
a.k.a. title bar is completely missing
Fixes: https://github.com/kovidgoyal/kitty/issues/7425
2024-06-17 13:18:48 +02:00
Kovid Goyal
2a6870b21f
Wayland labwc: Fix kitty timing out waiting for compositor to quit fucking around with scales on labwc
...
labwc is unique among Wayland compositors in implementing fractional
scale but not preferred integer buffer scale events. We didn't cater to
this particular combination of before. And to top it off it appears to
have no way for the user to set/control the scale so I cant even test
what it will do with fractional scales other than 1. Sigh. As with all
things Wayland, you need to be a masochist to subject yourself to them.
Fixes #7540
2024-06-16 15:01:46 +05:30
Kovid Goyal
88aa4d1de3
Revert 72272ab4fe
...
Apparently NVIDIA drivers dont handle this well. Sigh.
Go back to calling wl_egl_window_resize() before resizing the
framebuffer instead of before swapping in the resized framebuffer.
Logically, these should be equivalent, but...
Wayland is such an ongoing disaster.
Fixes #7493 (I hope).
2024-06-02 19:24:00 +05:30
Kovid Goyal
48070ff38e
Fix #7481
2024-05-28 15:14:13 +05:30
Kovid Goyal
55417e4269
Move the window context changing during show fix into glfw code
...
It more logically belongs there.
2024-05-28 09:46:16 +05:30
Kovid Goyal
9acca045bd
macOS: Fix changing window chrome/colors while in traditional fullscreen causing the titlebar to become visible
...
Fixes #7469
2024-05-23 22:30:57 +05:30
Kovid Goyal
f86102ab88
macOS: Fix --start-as=fullscreen not working when another window is already fullscreen
...
Apparently, we need to make the window visible before full screening it.
Sigh. I dont know why Apple insisted on this horrible "fancy"
fullscreen of theirs, it's full of bugs and dog slow.
Fixes #7448
2024-05-23 08:38:38 +05:30
Kovid Goyal
adc457ff0f
Dynload libsystemd
2024-05-16 21:13:09 +05:30
Kovid Goyal
b5022cbd81
DRYer
2024-05-16 20:17:15 +05:30
Kovid Goyal
32f3d43aa0
Support setting urgency for DBUS notifications
2024-05-16 20:10:26 +05:30
Kovid Goyal
f979c24add
Move some defines to only the source files where they are needed
2024-05-16 17:38:26 +05:30
Kovid Goyal
65f06e8fdb
Wayland: Fix crash on compositors that dont support the window activation protocol
2024-05-06 08:52:01 +05:30
Kovid Goyal
ce4237c45d
DRYer
2024-05-05 14:09:18 +05:30
Kovid Goyal
849dcd424d
Wayland: save energy by not rendering "suspended" windows on compositors that support that
...
Note that this breaks kitty on GNOME 45 which has a bug, but it fine on
GNOME 46.
2024-05-05 13:42:51 +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
aecf07bcba
Wayland: Fix infinite loop causing bad performance when using IME via fcitx5 due to a change in fcitx5
...
Fix #7396
2024-04-28 11:30:48 +05:30
Kovid Goyal
8c7994c0ac
Dont call wl_egl_window_resize on every swap
2024-04-24 10:04:06 +05:30
Kovid Goyal
8e59b598e0
Improve logging slightly
2024-04-24 09:38:59 +05:30
Kovid Goyal
72272ab4fe
Remove need for context switching
...
Call wl_egl_window_resize just buffer swapping buffers at which point
the context is already correct.
Also might workaround bugs in the NVIDIA driver: https://github.com/NVIDIA/egl-wayland/issues/52
2024-04-24 09:27:02 +05:30
Kovid Goyal
b7e22a357f
...
2024-04-24 08:57:49 +05:30
Kovid Goyal
0f00b0cfb6
Use RAII for context management
2024-04-24 08:21:27 +05:30
Kovid Goyal
9755d0d879
Wayland: Ensure context is correct when calling wl_egl_window_resize
...
Fixes #7373 (I hope)
2024-04-22 18:07:34 +05:30
Kovid Goyal
fbefd8600f
output window id is debug logs useful for debugging issues with multiple os windows
2024-04-22 14:04:26 +05:30
Kovid Goyal
8d1b0e54af
Use double for wayland float calculation
2024-04-19 22:23:01 +05:30
Kovid Goyal
63ffa2606c
Give the close X a distressed look
2024-04-17 11:05:05 +05:30
Kovid Goyal
f66ee68834
Wayland GNOME: Draw the titlebar buttons without using a font
...
Fixes #7349
2024-04-17 10:39:30 +05:30
Kovid Goyal
494892c7e4
Dont create the region unless actually needed
2024-04-16 18:16:28 +05:30
Kovid Goyal
6c1a83ffd7
Wayland KDE: Fix window background blur not adapting when window is grown. Also fix turning it on and off not working.
...
Fixes #7351
2024-04-16 18:11:26 +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
e57692e4f5
Possibly fix #7327
2024-04-09 21:19:25 +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
208490f4e1
...
2024-04-08 11:18:32 +05:30
Kovid Goyal
d392aba64d
Wayland CSD: Dont render window shadows for docked windows
2024-04-08 10:59:03 +05:30
Kovid Goyal
d630b3d8a7
Change the maximize icon to restore when window is maximized
2024-04-08 09:36:38 +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
eb96830aa0
Make CSD API functions naming consistent
2024-04-07 10:18:13 +05:30
Kovid Goyal
334bb36745
Dont enable CSD for non XDG top-level windows such as layer shell surfaces
2024-04-07 10:08:02 +05:30
Kovid Goyal
283eba9667
Wayland: Respect top level bounds sent by compositor
2024-04-06 17:29:17 +05:30
Kovid Goyal
c651312a88
Adjust button colors
2024-04-06 17:24:55 +05:30
Kovid Goyal
5b1fdc34eb
Wire up the buttons
2024-04-06 14:58:31 +05:30
Kovid Goyal
a158fa108b
CSD pointer enter is the same as move
2024-04-06 12:51:09 +05:30
Kovid Goyal
60cb0fa650
Move CSD pointer handling code into CSD file
2024-04-06 12:49:07 +05:30
Kovid Goyal
d4cc5aa698
Report errors when attempts are made to perform actions the compositor doesnt support
2024-04-06 11:09:22 +05:30
Kovid Goyal
235b8dc2e4
Assume all capabilities on compositors that dont support reporting of capabilities
2024-04-06 10:59:28 +05:30
Kovid Goyal
4f6faddbab
Implement rendering of window control buttons in CSD
...
They still need to be wired up
2024-04-06 08:32:07 +05:30
Kovid Goyal
416d52bdac
...
2024-04-05 21:33:41 +05:30
Kovid Goyal
9225bd772d
Reduce CSD API surface
2024-04-05 19:57:43 +05:30
Kovid Goyal
9e55951d5a
...
2024-04-05 19:37:41 +05:30
Kovid Goyal
d9663aa135
Make code a little clearer
2024-04-05 19:29:51 +05:30
Kovid Goyal
9d86448585
Wayland: Allow hiding window decorations on compositors with SSD as well
2024-04-05 19:23:42 +05:30
Kovid Goyal
2c4ffba0f3
Wayland: A new option to turn off IME
2024-04-05 14:56:11 +05:30
Kovid Goyal
18b595a7e7
Map keymap fd using MAP_PRIVATE as required by the spec
...
Also report failures
2024-04-05 13:10:04 +05:30
Kovid Goyal
0198b7fa5a
...
2024-04-05 12:57:58 +05:30
Kovid Goyal
1bffe89b5d
Wayland GNOME: titlebar color now follows system theme
...
When GNOME system theme is default, the color matches the background
color. When it is dark it is dark.
2024-04-04 21:52:56 +05:30
Kovid Goyal
bdfa57039c
Get rid of frame dependent size storage in kitty layer
...
This unifies behaviour with CSD and SSD. Now, in both cases the
remembered size is the size of the content area.
2024-04-04 19:39:02 +05:30
Kovid Goyal
f51c2f08a5
DRYer
2024-04-04 19:11:21 +05:30
Kovid Goyal
ecee7086a8
Report compositor missing capabilities in debug output
2024-04-04 16:56:13 +05:30
Kovid Goyal
76999d1a67
Fix creation of single pixel buffer to use 32 bits per color channel
2024-04-04 16:13:28 +05:30
Kovid Goyal
cd67184432
Output some info about compositor capabilities for --debug-rendering
2024-04-04 11:46:41 +05:30
Kovid Goyal
b3197e4498
Wayland: Add fractional scale support to CSD
2024-04-04 11:25:17 +05:30
Kovid Goyal
90d2b8330a
...
2024-04-04 10:59:51 +05:30