aboutsummaryrefslogtreecommitdiff
path: root/quirks.c (follow)
Commit message (Collapse)AuthorAgeLines
* quirks: remove subsurface unmap quirk for SwayDaniel Eklöf2025-06-09-10/+2
| | | | | | | | Sway used to have an issue where unmapping a subsurface did not damage the surface below (https://github.com/swaywm/sway/issues/6960). This has been fixed for quite some time now, so let's remove the quirk.
* render: gamma-correct blendingDaniel Eklöf2025-03-05-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements gamma-correct blending, which mainly affects font rendering. The implementation requires compile-time availability of the new color-management protocol (available in wayland-protocols >= 1.41), and run-time support for the same in the compositor (specifically, the EXT_LINEAR TF function and sRGB primaries). How it works: all colors are decoded from sRGB to linear (using a lookup table, generated in the exact same way pixman generates it's internal conversion tables) before being used by pixman. The resulting image buffer is thus in decoded/linear format. We use the color-management protocol to inform the compositor of this, by tagging the wayland surfaces with the 'ext_linear' image attribute. Sixes: all colors are sRGB internally, and decoded to linear before being used in any sixels. Thus, the image buffers will contain linear colors. This is important, since otherwise there would be a decode/encode penalty every time a sixel is blended to the grid. Emojis: we require fcft >= 3.2, which adds support for sRGB decoding color glyphs. Meaning, the emoji pixman surfaces can be blended directly to the grid, just like sixels. Gamma-correct blending is enabled by default *when the compositor supports it*. There's a new option to explicitly enable/disable it: gamma-correct-blending=no|yes. If set to 'yes', and the compositor does not implement the required color-management features, warning logs are emitted. There's a loss of precision when storing linear pixels in 8-bit channels. For this reason, this patch also adds supports for 10-bit surfaces. For now, this is disabled by default since such surfaces only have 2 bits for alpha. It can be enabled with tweak.surface-bit-depth=10-bit. Perhaps, in the future, we can enable it by default if: * gamma-correct blending is enabled * the user has not enabled a transparent background
* wayland: refactor: wrap wl_surface pointers in a wayl_surface structDaniel Eklöf2023-06-29-1/+1
| | | | | | | | | And add a viewport object to accompany the surface (to be used when scaling the surface). Also rename the wl_surf_subsurf struct to wayl_sub_surface, and add a wayl_surface object to it, rather than a plain wl_surface pointer (to also get the viewport pointer).
* quirks: sway does not damage surface beneath sub-surface, when unmappedDaniel Eklöf2023-05-12-0/+25
| | | | | | | | | | | | | | | | | | | | | When unmapping a sub-surface, Sway <= 1.8 does not damage the surface beneath the sub-surface. https://github.com/swaywm/sway/issues/6960 The workaround is to manually damage the main surface. Previously, this was done when exiting scrollback search, and after the ‘flash’ OSC. But other sub-surfaces, that may also be unmapped, did not. This patch adds a quirk handler that does this, and calls it when: * Exiting scrollback search * Ending the ‘flash’ OSC * Exiting unicode input mode * Clearing URL labels * Removing the scrollback position indicator Closes #1335
* wayland: apply CSD/SSD changes in the surface configure eventDaniel Eklöf2021-06-23-2/+2
| | | | | | | | | | | | | | | | | | The configure event asks the client to change its decoration mode. The configured state should not be applied immediately. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details. In particular, ”the configured state should *not* be applied immediately”. Instead, treat CSD/SSD changes like all other window dimension related changes: store the to-be mode in win->configure, and apply it in the surface configure event. This fixes an issue where foot incorrectly resized the window when the server switched between CSD/SSD at run-time.
* quirk: remove plasma/kwin quirkDaniel Eklöf2021-05-12-23/+0
| | | | | | Older version of Plasma/KWin had an issue where buffer damage recorded before the buffer was attached were ignored. This appears to have been fixed now.
* csd: use wayl_win_subsurface_new/destroy()Daniel Eklöf2021-02-17-2/+2
|
* util.h: new header file defining commonly used macrosDaniel Eklöf2020-05-01-2/+1
|
* quirks: add KDE quirk: surface must be damaged *after* being attachedDaniel Eklöf2020-03-24-13/+24
| | | | | | KDE resets all surface damage when a buffer is attached. Add a quirk that adds a full-buffer damage to the surface. This quirk is intended to be called after attaching a buffer to a surface.
* quirks: weston_csd_{on,off}: don't do anything in fullscreen modeDaniel Eklöf2020-03-12-0/+4
|
* quirks: add shortcut for flipping all CSD surfaces sync/desync stateDaniel Eklöf2020-03-03-0/+22
|
* quirks: log when applying weston sub-surface desync quirkDaniel Eklöf2020-03-02-0/+6
|
* search: enable/disable weston sub-surface desync quirk when rendering search boxDaniel Eklöf2020-03-01-4/+18
|
* render: search: mark visible portion of sub-surface opaqueDaniel Eklöf2020-03-01-0/+35