wl_shm buffers must have non-zero size and at scales below 1/24 the
shadow margin rounds to zero, which led to out of bounds reads when
compositing the shadow into the titlebar corners.
Previously, every time the compositor released a decoration buffer it was
destroyed and all decoration buffers, for all nine surfaces, were
recreated on the next update. In addition, the titlebar could be
rendered into a buffer the compositor had not yet released. Now buffers
are marked busy while attached and kept when released. The titlebar is
never rendered into a busy buffer, instead the render is done when the
buffer is released. Busy buffers are still not destroyed when freeing
buffers, to avoid flicker, they are destroyed when released.
- Dont re-render the titlebar on every pointer motion event. This both
wasted CPU re-shaping the title and rendered into the buffer last
attached to the titlebar surface without attaching the result.
- Notify of the window size change when the titlebar height changes in a
docked window, as is done for configure events, and never set a non
positive content height.
- Only wait for the desktop settings when creating the first window, since
dispatching DBus from inside a DBus callback is not re-entrant.
- Apply cursor theme changes received via SettingChanged instead of
silently updating the theme name.
The standalone C tests compiled the glfw sources by including them and
stubbing internals and were not run by the test suite. Move the useful
parts of the markdown docs into the option docs and changelog.
Use enums for titlebar buttons and gestures instead of magic numbers
shared between files. Split up the titlebar renderer. Derive button
colors from the titlebar color so they fit in with custom titlebar
colors. Parse button layouts without a colon the way GTK does, all
buttons on the left. Restore the error message when the compositor
does not support showing the window menu.
Replace glfwGetSystemFont(), which returned a raw Pango font description
that was parsed separately in glfw and kitty, with glfwGetTitlebarFont()
that returns the parsed family, size and style. The parser now handles
font family lists, pixel sizes and the full set of Pango weight and style
names. A text scale less than one is now applied to the header height as
well. The FreeType context for the title font is released on exit and
failures to create it are not retried and reported on every redraw.
On compositors without xdg-decoration, such as mutter, the titlebar height
depends on desktop settings that arrive asynchronously from the portal. If
they arrive after the window is mapped, the window visibly resizes. Wait
up to 200ms for the reply before creating the first such window.
The desktop settings module is shared with X11 and should not walk the
window list and poke at Wayland decoration state. Use a platform hook
like the existing one for cursor theme changes. Also dont recompute
metrics and change window geometry on every title change, only when the
titlebar settings actually change.
is_case_sensitive_filesystem lost its true default when it moved into
the dnd struct, so remote drops always treated names differing only in
case as conflicting. Detect it properly and also probe for Unicode
normalization aliasing, since a case sensitive filesystem can still
treat differently normalized names as the same.
- List the existing files that will be overwritten under the names they
are stored as in the destination, not the dropped names
- Treat symlinks to directories in the destination as directories in
find_overwrites, matching rename_contents, so the files that will be
overwritten inside the symlink target are listed
- Replace an existing file or dangling symlink with a dropped directory
instead of failing the drop after the user confirmed the overwrite
- Fail up front when a dropped file would replace an existing directory
- Also fold Unicode normalization when uniqifying remote drop names
- Probe for filesystem aliasing once before running the alias test
Displays the URL in a box sized to fit it, just below the hovered cell,
like a web browser tooltip. Split render_a_bar() into rendering the text
and drawing it so the width of the rendered text can be used to position
the box.
Also redraw when the hovered cell within a hyperlink changes, as the
position of the displayed target now depends on it.
Controls where the URL shown by show_hyperlink_targets is displayed:
along the top or bottom edge of the window, or immediately below the
hovered line. In all cases the URL is moved to the opposite side if it
would otherwise obscure the hovered line.
Fixes#10770
Previously the pre-edit text was discarded on any focus loss, losing
composed or dictated text when switching to another application. Now when
the OS window loses focus the pre-edit text is committed, as native macOS
applications do, preferring any final result the input method delivers
when it is reset. Focus changes between kitty windows and closing windows
still cancel the composition.
Closes#10771
Walk up from the drop destination using .. relative to its file
descriptor instead of its path, so the check is not fooled if the
destination is moved or replaced while the kitten is running. Also skip
the staging directory when copying, which guards against routes to it
the up-front check cannot see, such as bind mounts. Use readable
subtest names, check the chmod error in test cleanup and link the PR in
the changelog.
Preserve the grapheme segmentation state when the drawing line is
re-initialized after the current char has already been segmented, so that
emoji sequences are not split into multiple cells when wrapped or moved
past scaled text.
Mark colors are now stored per color layer and for the colors set by the
program, like the other colors, instead of in a single array that every
change overwrote. So set-colors without --configured no longer changes the
configured mark colors, window and session layer mark colors survive
changes to the global colors, resetting a layer, the color stack and full
reset restore the correct mark colors, --copy-colors copies them and
get-colors reports the mark colors of the window.
Make ColorProfile.test_mark_colors() return MARK_MASK pairs instead of a
hard-coded three, simplify the test by using MARK_MASK and mutable expected
values, and correct the changelog entry: config reload was not affected,
set-colors, launch --color, sessions and automatic theme switching were.