cockscowm
なんかwindowをふわふわさせたい
X.orgの最終更新が2012年なんで、Wayland上に作ったほうがやりやすそう dwmはX.org上に構築されているけれど、ソースがとにかく短いので参考にできるはず Wayland compositor = WM
X11 - a windowing protocol (network transparent by the way) and its implementation (the X server and low level libraries for accessing it). Handles "only" basic input (keyboard, mouse,...) and output (drawing rectangles), but does it in a rather abstract fashion, so that you can run a program on one machine and control it from another one, subscribe to various events etc. There is actually only one usable open-source implementation, namely by the X.org Foundation.>
Qt, GTK, Motif, ... - originally widget libraries, which provide higher level abstraction above the X11 libraries (e.g. creating dialogs, buttons and other graphical elements). However, for example Qt goes way beyond that and has interfaces for a lot of other things as well (databases, multimedia, ...). It also allows for unified design of UI. Similar to what Swing is in Java.
lxdm, lightdm, gdm, kdm, xdm, ...- display managers: specialized programs that display login screen (some can do it over network as well) and let the user login into his/her preferred desktop environment session.
compiz, kwin, metacity, xfwm, openbox, ... - window managers: programs supplying basic window environment functionality like drawing decorations to widows (title text and buttons), resizing, moving windows, moving these in the window stack (raising/lowering or tiling them on the screen). They sometimes also handle the "desktop" (background and icons placed on it) as well.
KDE, Gnome, XFCE, LXDE,... - desktop environments: more or less complete sets of tools. They usually include a window manager, display manager, some sort of "panel" (the thing, where icons, list of currently opened windows, clock, and other stuff is displayed), file manager, multimedia viewer, editor and "goodies" like calendar/reminder, and various desktop extensions)
けっこう使われてる
アプリケーション(client)がバッファに描画→それを使うようCompositorに伝える
direct rendering: clientとWayland serverがバッファを共有
clientが新たにバッファを生成しても、すでにあるバッファを更新してもよい
system compositor, session compositor
画面の描画とハードウェア
client→Wayland EGL Platformを通じて共用バッファとやりとり?
server→modesetting APIなるものの上で動作 + EGL/GLES2 (+ hardware overlays)
objectがidとinterfaceを持っていて、そこにrequestを投げる
wl_display←core global object
wl_compositor←compositor自身
wl_surface←surface(クライアントが作成するピクセルの集合)
wl_seat←マウス・キーボードなど
wl_output
wl_data_source, wl_data_offer←client間のデータ共有 コピペとか
event + request
protocol/wayland.xml
Using the Wayland protocol to create a surface to display pixels with consists of these steps:
1. Obtain a wl_display and use it to obtain a wl_registry.
2. Scan the registry for globals and grab a wl_compositor and a wl_shm_pool.
3. Use the wl_compositor interface to create a wl_surface.
4. Use the wl_shell interface to describe your surface’s role.
5. Use the wl_shm interface to allocate shared memory to store pixels in.
6. Draw something into your shared memory buffers.
7. Attach your shared memory buffers to the wl_surface.
クライアント=アプリケーションの開発
サーバ=WMの開発
ライブラリを使える
HTMLでWM書けたら面白そう
プロトコル
描画系
EGL
これらの関係がよくわからない