nanogui@linuxhacker.org

nanogui@linuxhacker.org


Subject: about nanowm
From: xiang lee
Date: Wed, 21 Feb 2001 19:30:04 +0800 (CST)

Dear alex:
  I wanna to add a hotbutton control to nanowm for my
pda(linux-vr).I'm new to win-mw,and there is so few 
docs about this. So I have to glance my eye at the
codes in /demos/nanowm and /nanox/ .  
  At beginning,I try to find out how I can add a
hotbutton event to the nano-X's events ,but I find 
that the most event is come from the Mouse and
Keyboard
it seems not easy to add a new type of events .
  Then  I try to got windows message from nanowm and 
save it in my apps ,when the hotbutton message coming 
this apps send command to nanowm.
  Follow is my test in this way.
1.in nanowm.c ,first make two named-pipe ,after 
 "switch" events read pipe for hotbutton message
 the message is forcedly switch to (GR_WINDOW_ID)
 and I try GrMapWindow(mywin_id);
2. in clients.c ,new_client_window() after  create
container window write the window->wid to the pipe

I can read from pipe wid "3" "5" ....
but when I send "5" to the pipe the nano-X broken
here is some error message:
nanowm: error 2
Got unexpected event -65514
nxclient 3252: Wrong packet type 0 (expected 22)
Got unexpected event 917526
nxclient 3247: Wrong packet type 0 (expected 22)
nano-X: GsError (GrSetGCForeground) Bad graphics
context: 1046
nano-X: GsError (GrLine) Bad graphics context: 1046
nano-X: GsError (GrLine) Bad graphics context: 1046
nano-X: GsError (GrDestroyGC) Bad graphics context:
1046
nano-X: GsError (GrSetGCForeground) Bad graphics
context: 1050
nano-X: GsError (GrLine) Bad graphics context: 1050
nano-X: GsError (GrLine) Bad graphics context: 1050
nano-X: GsError (GrDestroyGC) Bad graphics context:
1050
nano-X: GsError (GrSetGCForeground) Bad graphics
context: 1054
nano-X: GsError (GrLine) Bad graphics context: 1054
nano-X: GsError (GrLine) Bad graphics context: 1054
nano-X: GsError (GrDestroyGC) Bad graphics context:
1054
Got unexpected event 196624
nxclient 3244: Wrong packet type 0 (expected 22)
nxclient 3244: Wrong packet type -1 (expected 22)
nxclient 3244: Wrong packet type 255 (expected 22)
nxclient 3244: Wrong packet type 16526 (expected 22)
Got unexpected event 65536
nxclient 3242: Wrong packet type 40 (expected 22)
nxclient 3242: Wrong packet type 0 (expected 22)
nxclient 3242: Wrong packet type 1 (expected 22)
nxclient 3242: Wrong packet type 0 (expected 22)
Got unexpected event 65558
nxclient 3238: Wrong packet type 0 (expected 22)
nxclient: lost connection to Nano-X server

it seems that I made a silly mistake.
Any good ideas about this? and any doog docs can 
lead me to window-manage? I like a blind man in wm.

Best Regards
liex 

     

_________________________________________________________
Do You Yahoo!? ! http://mail.yahoo.com.cn
http://cn.clubs.yahoo.com

nanogui@linuxhacker.org