Pseudo-transparency

Pseudo-transparency is a term used for X Window System clients that simulate the appearance of translucency or transparency by manipulating the same pixmap that has been drawn on the root window, or by instructing the X Server that the Background Pixmap should be inherited from the window's parent.[1]

Purpose

Traditionally, the X Window System has lagged behind other windowing systems in adding purely eye candy or aesthetic features, such as window translucency. This has encouraged developers to develop kludges to overcome this limitation.

This pseudo-transparency, so called as the background pixmap of the root window is visible (analogous to desktop wallpaper) rather than any obscured windows, allows users to make windows look less imposing (such as Terminal emulators, which usually comprise large chunks of text), and to integrate the appearance of windows with their desktop themes.

Implementation

There are three common methods for achieving pseudo-transparency using Xlib, each with its own advantages and drawbacks.

Parental-relative

The "parental-relative" method uses XSetWindowBackgroundPixmap() to inherit the parent window's background image. Unfortunately, using this method, the X server permits very few operations to be performed on the background pixmap (such as XOR), preventing clients from implementing any sort of advanced image filtering.

_XROOTPMAP_ID and ESETROOT_PMAP_ID properties

These properties are used to inform the window where it can find the pixmap used on the root window. Using this information, a client can paint a section of the image (corresponding to the size and position of the window) onto its background, achieving the effect of transparency. This method uses the most memory, but has the advantage of allowing clients to perform any operation, such as tinting or shading, on the image data.

XCopyArea

XCopyArea can achieve a more realistic transparency effect in that it can include obscured windows, but with the significant disadvantage that it is only usable with modal windows. This method simply uses the XCopyArea() function to take a partial screenshot for use as the window's background pixmap.

Future

Recent technologies such as DirectFB, Direct Rendering Infrastructure, and hardware compositing via OpenGL allow X client applications to utilize true alpha transparency.

gollark: I mean, what do you expect to happen if you do something unsupported and which creates increasingly large problems each time you do it?
gollark: <@151391317740486657> Do you know what "unsupported" means? PotatOS is not designed to be used this way.
gollark: Specifically, 22 bytes for the private key and 21 for the public key on ccecc.py and 25 and 32 on the actual ingame one.
gollark: <@!206233133228490752> Sorry to bother you, but keypairs generated by `ccecc.py` and the ECC library in use in potatOS appear to have different-length private and public keys, which is a problem.EDIT: okay, apparently it's because I've been accidentally using a *different* ECC thing from SMT or something, and it has these parameters instead:```---- Elliptic Curve Arithmetic---- About the Curve Itself-- Field Size: 192 bits-- Field Modulus (p): 65533 * 2^176 + 3-- Equation: x^2 + y^2 = 1 + 108 * x^2 * y^2-- Parameters: Edwards Curve with c = 1, and d = 108-- Curve Order (n): 4 * 1569203598118192102418711808268118358122924911136798015831-- Cofactor (h): 4-- Generator Order (q): 1569203598118192102418711808268118358122924911136798015831---- About the Curve's Security-- Current best attack security: 94.822 bits (Pollard's Rho)-- Rho Security: log2(0.884 * sqrt(q)) = 94.822-- Transfer Security? Yes: p ~= q; k > 20-- Field Discriminant Security? Yes: t = 67602300638727286331433024168; s = 2^2; |D| = 5134296629560551493299993292204775496868940529592107064435 > 2^100-- Rigidity? A little, the parameters are somewhat small.-- XZ/YZ Ladder Security? No: Single coordinate ladders are insecure, so they can't be used.-- Small Subgroup Security? Yes: Secret keys are calculated modulo 4q.-- Invalid Curve Security? Yes: Any point to be multiplied is checked beforehand.-- Invalid Curve Twist Security? No: The curve is not protected against single coordinate ladder attacks, so don't use them.-- Completeness? Yes: The curve is an Edwards Curve with non-square d and square a, so the curve is complete.-- Indistinguishability? No: The curve does not support indistinguishability maps.```so I might just have to ship *two* versions to keep compatibility with old signatures.
gollark: > 2. precompilation to lua bytecode and compressionThis was considered, but the furthest I went was having some programs compressed on disk.

References

  1. "Tutorial: Urxvt: transparency". CTKArch. 2014. Retrieved February 23, 2016.


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.