私は単純にxウィンドウとその内部に小さなウィンドウを作成する以下の小さなアプリケーションを持っています。私は後ですべてのツールバーとメニューがサブウィンドウで、それらを管理したいウィンドウマネージャを選ぶことができる実験的なIDEを作る予定です。ウィンドウのxmonadの親をどのように変更できますか?
私がしたいのは、xmonadのインスタンスを起動し、それを親ウィンドウではなく、親ウィンドウから制御することですが、アプリケーションのウィンドウ内のウィンドウを再作成して制御することです。
これは可能ですか?
P.S. ここにアプリがあります。
原則としてmodule Main where
import Graphics.X11.Xlib
y f = w where w = f w
main = do
display <- openDisplay ""
let screen = defaultScreen display
root <- rootWindow display screen
mainWindow <- createSimpleWindow
display
root
0 0 100 100
1
(blackPixel display screen)
(whitePixel display screen)
setTextProperty display mainWindow "Subwindows" wM_NAME
subWindow <- createSimpleWindow
display
mainWindow
0 0 100 100
1
(whitePixel display screen)
(blackPixel display screen)
mapWindow display subWindow
mapWindow display mainWindow
y $ \loop -> allocaXEvent $ \eventPointer -> do
nextEvent display eventPointer
event <- get_EventType eventPointer
case() of
_ | event == expose -> loop
| otherwise -> return()
... xmonadの外にコードをヤンクし、あなたのアプリにペーストすることができ、私はちょうど直接Xephyrでを使用することができれば、私が表示されます。 –