compiz の革命 †compiz を入れてみた. デフォルトの設定では画面がぐりんぐりん回ったり,ウィンドウがぐにゃぐにゃしたり,見た目には面白い. が,すごいのはそれだけではない. xev でイベントをキャプチャするとその違いがわかる.
という操作をしてみる. 「マウスカーソルを持っていき…ウィンドウを前面に出す」操作で compiz 上では FocusIn event, serial 34, synthetic NO, window 0x2c00001, mode NotifyNormal, detail NotifyNonlinear KeymapNotify event, serial 34, synthetic NO, window 0x0, keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ConfigureNotify event, serial 34, synthetic NO, window 0x2c00001, event 0x2c00001, window 0x2c00001, (972,322), width 178, height 178, border_width 2, above 0x2a0001f, override NO というイベントが発生する. 一方,metacity 上では FocusIn event, serial 30, synthetic NO, window 0x2a00001, mode NotifyNormal, detail NotifyNonlinear KeymapNotify event, serial 30, synthetic NO, window 0x0, keys: 4294967206 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 VisibilityNotify event, serial 30, synthetic NO, window 0x2a00001, state VisibilityUnobscured Expose event, serial 30, synthetic NO, window 0x2a00001, (0,87), width 72, height 91, count 0 というイベントがキャプチャできる. 大きな違いは最後の Expose イベントである. このイベントはアプリケーションに「ウィンドウが露出した」ことを通知するイベントである. Expose イベントを受け取ったプログラムはウィンドウの再描画を行い,上にあったウィンドウで消されてしまった部分を見えるようにするのである. compiz 上ではこのイベントが発生していない. が,普通に使えている. つまり
ということである. これは次のような操作でも確認できる.
metacity の場合は となるが compiz では となる. プログラムがサスペンドされているので,expose イベントを処理できずに metacity では隠されていた部分が消えたままになっている. が,compiz 上ではそれが発生していない. というわけで,compiz は従来の X のモデルを大きく変える環境であると言えるだろう.
なんて言ってる場合じゃないのだ. |