X11
XSendEvent August 09, 2006 11:31
- Permalink
- Comments (2293)
- Trackbacks (0)
Linux, X11
XSendEventは通信プロトコル形式への変換が失敗すると 0 を返し、それ以外の場合に は 0 でない値を返す。
XSendEventはエラー BadValue ,BadWindow を起こすことがある。
1って返ってくるんだが、これは一体……。
X.h見ると
#define Success 0 /* everything's okay */ #define BadRequest 1 /* bad request code */ #define BadValue 2 /* int parameter out of range */ #define BadWindow 3 /* parameter not a Window */ #define BadPixmap 4 /* parameter not a Pixmap */ #define BadAtom 5 /* parameter not an Atom */ #define BadCursor 6 /* parameter not a Cursor */ #define BadFont 7 /* parameter not a Font */ #define BadMatch 8 /* parameter mismatch */ #define BadDrawable 9 /* parameter not a Pixmap or Window */ #define BadAccess 10 /* depending on context:
XSendEventがBadWindowとか返すんだから1もここにあるBadRequestだと思ったんだけど、
そうすると失敗すると 0 を返し
って記述と激しく矛盾してくる。どうなってんだ。
嫌窓流 August 09, 2006 01:34
- Permalink
- Comments (1908)
- Trackbacks (0)
Linux, X11
「X Windowって言うな。そうすれば私たちも窓って言わない」(元ネタ)
What ever you do, for God's sake stop calling it "X-Window".
man X
(´Д`;) ゴメンナサイゴメンナサイ
∨) Xウィンドウシステム デスネ ゴメンナサイ
((
大慌て?でさっきのエントリをs/X Window/X Window System/
(;´Д`) スミマセンスミマセン
( 八) man X シマス スミマセン
〉 〉
yz@ubuntu % man X マニュアル X は登録されていません
(´Д`;)、 コノトオリデス
ノノZ乙
正しく呼ぼう。
開発元の X.Org Foundation は、このソフトウェアを以下のいずれかの名前で呼ぶことを求めている。
- X
- X Window System
- X Version 11
- X Window System, Version 11
- X11
X 叫んでみろ August 09, 2006 00:59
- Permalink
- Comments (1945)
- Trackbacks (0)
Linux, X11
すみません、X Window SystemのXでつ。
yz@ubuntu % xwininfo
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x2400083 "[YBLOGED] 83's : Edit entry - Mozilla Firefox"
Absolute upper-left X: 37
Absolute upper-left Y: 48
Relative upper-left X: 5
Relative upper-left Y: 23
Width: 1002
Height: 865
Depth: 24
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x20 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +37+48 -241+48 -241-111 +37-111
-geometry 1002x865+32+25
奇しくもWindow IDに83がw
xlsclientsはlist client applications running on a display
だと。
yz@ubuntu % xlsclients -l | grep 2400083 yz@ubuntu %
んん? ひっかかんね。xwininfoで見たWindow IDは何なんだ。xlsclients的にはクライアントと見ない?
yz@ubuntu % xlsclients -l | grep -C 3 Firefox Instance/Class: ClockApplet/ClockApplet Window 0x2400001: Machine: ubuntu Name: Firefox Icon Name: firefox-bin Command: firefox-bin Instance/Class: firefox-bin/Firefox-bin Window 0x2600001: Machine: ubuntu Name: gnome-screensaver
0x2400001とはまたきれいな数字。
yz@ubuntu % xwininfo -id 0x2400001 xwininfo: Window id: 0x2400001 "Firefox" Absolute upper-left X: 10 Absolute upper-left Y: 10 Relative upper-left X: 10 Relative upper-left Y: 10 Width: 10 Height: 10 Depth: 24 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x20 (installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsUnMapped Override Redirect State: no Corners: +10+10 -1260+10 -1260-1004 +10-1004 -geometry 10x10+10+10
んんん? 10 * 10のウィンドウがいるんですか?
謎は深まるばかり。さーて、いつ飽きるかなぁ。
