µÚ£±£²Õ ×ÊѶÓë״̬³Ìʽ
ÔÚ±¾Õ£¬ÎÒÃǽ«ÌÖÂÛһЩÌṩÊÓ´°ÏµÍ³±¾Éí×ÊѶºÍĿǰ״̬µÄ³Ìʽ¡£Õâ°üÀ¨Á˼ì²éϵͳÉÏÊÓ´°¸÷ÖÖÐÔÖÊ (property) µÄ¹¤¾ß£¬ºÍÒ»¸ö¹Û²ì£Øʼþ½á¹¹ÊÇÈçºÎ¹¤×÷µÄ³Ìʽ¡£
ÕâЩ³ÌʽÓÐÏÂÁÐÓÃ;£º
£®µ±ÄãʹÓÃϵͳʱ£¬ÕâЩ¹¤¾ß³ÌʽËùÌṩÓйØϵͳÄÚ²¿×éÖ¯ºÍ²Ù×÷µÄ×ÊѶ£¬¿ÉÒÔ°ïÖúÄãÁ˽ⷢÉúÁËʲ÷áÊ¡£
£®µ±ÄãÒª×öijÖÖ´¦Àíʱ£¬¿ÉÒÔ½åÖøËù¸øµÄ×ÊѶÀ´È·ÈÏϵͳµÄ×é¼þ¡££¨ÀýÈçÄã±ØÐëÖªµÀÒ»¸öÊÓ´°µÄwindow-id,²Å¿ÉÒÔÓÃxwd À´ÇãÓ¡Ëü¡££©
£®Ä㽫¾³£°Ñ´ÓÕâЩ¹¤¾ß»ñµÃµÄ×ÊѶ£¬µ±³É¶¨ÖÆϵͳ¹¤¾ß³ÌʽµÄÊäÈ루ÉÔáἸÕ»áÌÖÂÛ£©¡£
12.1 ÁгöÄãµÄ£ØserverµÄÌØáç -- xdpyinfo
xdpyinfoÁгöÓйØÄãµÄ£ØserverºÍserverËù¿ØÖÆөĻ֮¸÷ÖÖÏîÄ¿µÄ×ÊѶ£¬Ò»¸öµäÐ͵ÄÊä³ö¼ûͼ12-1£¨Ò»¸öserverÔÚSun 3/50µ¥É«¹¤×÷Õ¾ÉÏÖ´ÐеĽá¹û£©¡£
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p134 fig 12.1 ©¦
©¦ ©¦
©¦ ͼ12-1 µäÐ͵Äxdpyinfo¹¤¾ß³ÌʽµÄÊä³ö ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
12.2 »ñÈ¡ÓйØÊÓ´°µÄ×ÊѶ
ÓÐÈý¸ö³Ìʽ¿ÉÒÔÌṩĿǰÔÚÄãÏÔʾÆ÷ÉÏÊÓ´°µÄ×ÊѶ¡£ËüÃÇÊÇ´Ó²»Í¬µÄ½Ç¶È¿´ÏµÍ³£º
1. ÁÐÓ¡ÊÓ´°µÄ½×²ã -- xlswins
2. ¶Ôµ¥Ò»ÊÓ´°ÏêϸµÄ×ÊѶ -- xwininfo
3. ÁгöÊÓ´°µÄÐÔÖÊ -- xprop
12.2.1 ÁÐÓ¡ÊÓ´°µÄ½×²ã -- xlswins
ÔÚµÚÒ»²¿Ôø¾Ìá¹ý£¬ËùÓÐÔÚϵͳÉϵÄÊÓ´°±»°²ÅųÉÊ÷×´µÄ½×²ã£¬¸ùÊÓ´°£¨Ò²½Ð±³¾°(background)ÊÓ´°£©ÔÚ×îÉϲ㣬ÔÚÆäϲÅÊÇÓ¦ÓÃÊÓ´°£¬Ã¿Ò»¸öÓ¦Óà ÊÓ´°¿ÉÒÔÓµÓÐËü×Ô¼ºµÄ×ÓÊÓ´°½×²ã¡£
xlswins ÁÐÓ¡³öÕâ¸öÊ÷×´½á¹¹£¬´Ó¸ùÊÓ´°»òËùÖ¸¶¨µÄÊÓ´°ÆðÖÁÆäÏÂËùÓеÄÊ÷×´½á¹¹£¬¶Ôÿһ¸öÊÓ´°£¬xlswins ÁгöÊÓ´°µÄwindow-id ²¢ÓÃÀ¨»¡À¨×¡ËüµÄÃû³Æ£¨Èç¹ûÓеĻ°£©£¬×ÓÊÓ´°ÔòÔÚÏÂÃæµÄ¼¸ÐÐÒÀÐòÒÔËõÈë(indent)Á½¸ñµÄ·½Ê½Áгö¡£ÏÂÃæµÄͼ¶ÔxmanÓ¦ÓóÌʽÁгöÈý¸ö²»Í¬×ÓÊ÷µÄÊä³ö£¬½åÒÔչʾxlswins ÈçºÎÆÊÎöϵͳµÄ½á¹¹¡£
ͼ12-2a ÊÇxmanÖ÷Ñ¡µ¥µÄÊ÷¡£Äã¿ÉÒÔ¿´µ½ÔÚÓ¦ÓÃÊÓ´°(0X600011)Öк¬ÓÐÁíÒ»¸öÊÓ´°(0X600012)£¬¶ø(0X600012)ÓÖ°üº¬ÁËËĸöÊÓ´°£¬²»ÐèÒªÖªµÀÔʼ³Ìʽ£¬ÄãÒ²¿ÉÒԲµõ½ÊÇÒ»ÖÖÊÓ´°°üº¬ÖøÊÓ´°£¬¶ø¶Ô×ÓÊÓ´°×öijÖÖ¹ÜÀíµÄÇé¿ö¡£
ͼ12-2b ÊÇxmanÊÖ²áÒ³(manpage) ÊÓ´°µÄÊ÷¡£±ÈÉÏÒ»¸öÀý×Ó¸´ÔÓһЩ£¬¶øÇÒÒ²ÎÞ·¨ÔÚÈ·¶¨ÊÇ·ñÔÚÕâÒ»Ò³ÊÖ²áÒ³ÖÐ×ܹ²¾ÍÖ»ÓÐÕâ÷á¶àÊÓ´°ºÍ×ÓÊÓ´°¡£ËùÒÔ ...
ͼ12-2c ÕâÊÇxlswins ¸üÏêϸµÄÊä³ö£¬±ÈÉÏÒ»¸öÀý×ÓÐèÒªÔÚÃüÁîÁÐÖжà¼ÓÒ»¸ö -l µÄÑ¡Ï¶à³öÀ´µÄѶϢΪ³²×´µÄÉî¶È£¨µÚ¼¸²ãÊ÷£©¡¢Ïà¶Ô춸¸ÊÓ´°µÄ¼¸ºÎ×ù±êºÍ´óС¡¢ºÍÊÓ´°×óÉϽǾàÀë¸ùÊÓ´°µÄ×ù±ê£¨Ò²¾ÍÊÇÓ©Ä»Éϵľø¶Ô×ù±ê£©£¬ÓÐÁËÕâЩÊÓ´°µÄ×ù±ê£¬Äã¾ÍÄÜÁ˽âËüÃÇÔÚÓ©Ä»ÉϵÄλÖã¬Èç¹ûÄ㻹ÊǸ㲻̫Çå³þ£¬¿ÉÒÔÖ´ÐÐxwd £¬Ö¸¶¨xlswins ËùÊä³öµÄwindow-id £¬ÔÚ±¾Í¼£¬ÎÒÃÇ·¢¾õÊÓ´°(0X60005d)ÊǸ߶øյģ¬ËùÒÔ¿ÉÄÜÊÇÒ»¸ö¾í¶¯°ô¡£ÎÒÃÇ¿ÉÒÔÊÔÖøÓÃÃüÁ
xwd -id 0x60005d | xwud
½á¹ûµÄÈ· xman ¾í¶¯°ôµÄͼÐγöÏÖÁË£¬Õâ¸öÃüÁîÎÒÃÇÔÚ9.2.1 ½ÚÓÐÌá¹ý£¨Ö»²»¹ýÕâÒ»´ÎÎÒÃDz»°ÑÊä³öË͵½µµ°¸£¬¶øÀûÓõ¼¹Ü (pipe) µÄ¼¼ÇÉÖ±½Óµ±³ÉÁíÒ»³ÌʽµÄÊäÈë¡££©Äã¿ÉÒÔÓÃÕâÖÖ·½·¨·ÖÎöÈκÎÊÓ´°¡£
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p136 fig 12.2 ©¦
©¦ ©¦
©¦ ͼ12-2 Èý¸öxlswins µÄÊä³ö ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
×¢Ò⣺²¢·ÇËùÓеÄÊÓ´°¶¼¿ÉÁÐÓ¡³ö×ÊѶ£¬Èç¹ûÄãÅöµ½ÕâÖÖÎÞ×ÊѶ¿É¹©ÁÐÓ¡ÊÓ´°£¬Ä㽫»ñµÃÀàËÆÏÂÃæµÄѶϢ£º
x Protocol error: BadMatch, invalid parameter
attributes
Major opcode of failed request: 73 (X_GetImage)
ΪÁËƪ·ùµÄ¹Øϵ£¬ÎÒÃÇÖ»ÁгöÁËÍêÕûxlswins Êä³öµÄÈý¸öС²¿·Ý¡£Èç¹ûÔÚÄã×Ô¼ºÒѾÓкü¸¸öÓ¦ÓóÌʽµÄϵͳÉÏ£¬Ä㽫¿ÉÒÔ¿´µ½uwm ºÍxterm Ñ¡µ¥ËùÏà¹ØµÄ×ÓÊ÷£¬»òÕßÊÇÓë xmhºÍ xedit µÄÃüÁî°´Å¥Ïà¹ØµÄ×ÓÊ÷¡£
12.2.2 ¹Ø춵¥Ò»ÊÓ´°µÄÏêϸ×ÊѶ -- xwininfo
xwininfoÄܹ»Õë¶ÔÌض¨µÄÊÓ´°¸øÄã´óÁ¿µÄ×ÊѶ£¬Äã¿ÉÒÔ½åÖøÃüÁîÁеÄÑ¡Ïî¸æËßxwininfoÄãÒªÄÄÒ»²¿·ÝµÄ×ÊѶ¡£Í¼12-3°üº¬ÍêÕûµÄÁÐÓ¡Êä³ö£¨ÓÃÑ¡Ïî-all£©
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p138 fig 12.3 ©¦
©¦ ©¦
©¦ ͼ12-3 µäÐ͵ÄxwininfoÊä³ö ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
Äã¿ÉÒÔÓúÍxwd ÏàͬµÄ·½·¨À´Ö¸¶¨Äã¸ÐÐËȤµÄÊÓ´°£º
£®½»Ì¸Ê½£¨Ô¤É裩£º¿ªÊ¼Ê±£¬xwininfo¸øÄãÒ»¸öÊ®×ÖÏßÓα꣬Äã¿ÉÒÔ½«ËüÒƵ½ÄãËùÐèµÄÊÓ´°ÔÙÅö´¥»¬Êó°´Å¥¡£
£®Ê¹ÓÃÃüÁîÁÐÑ¡ÏÄã¿ÉÒÔÓÃÑ¡Ïî-root Ö¸¶¨¸ùÊÓ´°£¬»òÓÃÑ¡Ïî-id window-id Ö¸¶¨ÆäËüµÄÊÓ´°¡£
ÄãËù¿´µ½µÄ×ÊѶ¿É·ÖΪÒÔϼ¸Àࣺ
ÊÓ´°µÄwindow-id £ºwindow-id ÊÇÊÓ´°ÏµÍ³Ê¶±ðÿһ¸öÊÓ´°µÄ²Î¿¼£¬¾ÍÈçͬÏÈÇ°Ëù¿´µ½µÄ£¬¼¸¸ö³Ìʽ£¨°üº¬xwininfoËü±¾Éí£©¸øÄãÒ»¸öÊý×Ö´ú±íwindow-id ¡£ÀýÈçÄãÒªÇãÓ¡Ò»¸öÊÓ´°£¬Äã¿ÉÒÔÏÈÖ´ÐÐxwininfoµÃµ½½×²ãµÄ×ÊѶ£ºÄã¿ÉÒÔ¿´µ½Õâ¸öÊÓ´°µÄ¸¸ÊÓ´°µÄid£¬¼¸¸ö×ÓÊÓ´°µÄid£¬ÒÔ¼°¸ùÊÓ´°µÄid£¬ÔÚxlswins Öпɵõ½ÏàͬµÄ×ÊѶ£¬µ«ÔÚÕâÀïÖ»Äܵõ½×î½üÒ»²ã×ÓÊÓ´°µÄid£¬²¢·ÇÕû¸ö×ÓÊ÷¡£
¼¸ºÎϸ½Ú£ºÊÓ´°µÄ´óСºÍλÖã¬ÒÔ¼°ËüµÄËĸö½ÇµÄλÖá£
ºÍserverÓйصÄÖؽ¨¹¹²ÎÊý£ºÏñ¡±gravity ¡±ºÍ¡±backing store ¡±ÕâЩ״̬(state) £¬µ±ÊÓ´°¸Ä±ä´óС»ò´Ó±»ÕڸǵÄ״̬ÏÂÖØÐÂÏÔ¶³öÀ´Ê±£¬serverÐèÒªÓõ½ÕâЩ²ÎÊý£¬ÕâЩ²ÎÊýÄã×Ô¼º²»»áÓõ½£¬µ«¿É½åËüÁ˽âϵͳÈçºÎÔË×÷¡£
ʼþ²ÎÊý£ºÕâЩ²ÎÊýÒ²ÊǸøserver¶ø·Ç¸øʹÓÃÕßÓõġ£
ÊÓ´°¹ÜÀíÆ÷×ÊѶ£ºÔÚϵͳ¸Å¹ÛÖУ¬ÎÒÃÇÔø¾Ìá¹ýÓ¦ÓóÌʽ½åÖø¸øÊÓ´°¹ÜÀíÆ÷һЩÌáʾ¡±hints ¡±À´´ï³ÉͨѶ£¨ÕâЩÌáʾ°üÀ¨Ó¦ÓóÌʽËùÏ£ÍûÊÓ´°µÄ´óС£¬ÒÔ¼°Öض¨´óСʱµÄÏÞÖƵȡ££©£¬xwininfoÔÚÕâ¸ö²¿·ÝµÄÊä³ö±ãÊǸæËßÄãÕâЩ¡±Ìáʾ¡±µÄ×ÊÁÏ¡£ Program supplied location ΪӦÓóÌʽ½¨ÒéËü×Ô¼ºÓ¦¸Ã°ÚÄÄÀï¡£Èç¹ûÄãÔø¸ø¹ýλÖ㬲»ÂÛÊÇÔÚÃüÁîÁлòresource file £¬¶¼»áÔÚ User supplied location ³öÏÖ£¬ÔÚÊÓ´°´óС·½ÃæͬÀí¿ÉÍÆ£¬resize increments ½âÊÍÁËΪʲ÷áÓÐЩÊÓ´°£¨ÀýÈçxterm ºÍxfd £©²»ÄÜ°Ñ´óС¶¨ÎªÈÎÒâÊýÄ¿µÄÏñËØ£¬ÒòΪӦÓóÌʽÒѾ¸æËßÁËÊÓ´°¹ÜÀíÆ÷ÔÚÖض¨´óСʱ°´¶àÉÙ¸öÏñËصı¶Êý·Å´ó»òËõС
£¨xterm ºÍxfd ËüÃǵĴóСºÍËùʹÓõÄ×ÖÐÍÓйأ©£¬ÄãÒ²¿ÉÒÔÓÉÕâ¸ö²ÎÊýÖªµÀÄ¿Ç°ÊÓ´°µÄλÖã¬ËùÒÔÉÔááÄã¿ÉÒÔÔÚͬһλÖÃÉÏÖؽ¨Ëü¡£
12.2.3 ÁгöÊÓ´°µÄÐÔÖÊ -- xprop
ÈçͬÎÒÃÇÔÚϵͳ¸Å¹ÛËùÌá¼°µÄ£¬Ò»¸ö¡±ÐÔÖÊ¡±(property)ÊÇָһС¶ÎÓйØÊÓ´°µÄ×ÊÁÏ£¬xprop ÈÃÄãÁгöÒ»¸öÌض¨ÊÓ´°µÄËùÓС±ÐÔÖÊ¡±£¬ÄãÒ²¿ÉÒÔÁÐÓ¡Ò»¸ö×ÖÐ͵ÄÐÔÖÊ¡£
¡¡¡¡Äã¿ÉÒÔ¾Óɳ£Óõķ½Ê½À´Ñ¡ÔñÊÓ´°£¨Åö´¥»¬Êó°´Å¥»òʹÓÃ-root »ò-id Ñ¡Ï£¬Èç¹ûÊÇÖ¸¶¨×ÖÐÍ£¬ÔòÓÃÑ¡Ïî-font fontname¡£
ÏÔʾ³öÀ´µÄ¸ñʽΪ£º¶Ôÿһ¸öÐÔÖÊ£¬¾ùÓÐÒ»¸öÐÔÖÊÃû³Æ£¬ÔÚÆäááÓÃСÀ¨»¡À¨×¡µÄΪÐÔÖʵÄÐÍ̬»ò¸ñʽ£¬×îááÔòΪÐÔÖʵÄÖµ¡£´ó²¿·ÝÄãËù¿´µ½µÄÐÔÖÊÐÍ̬ΪSTRING£¬ÐÔÖʵÄÖµÓᱡ¡¡±À¨ÆðÀ´£¬ÆäËüµÄÐÔÖÊÐÍ̬µÄ¸ñʽÊÇרÊôµÄ£¬´ÓÐÔÖʵÄÖµºÜÈÝÒ×Á˽âËüµÄÒâÒ壬¶Ô×ÖÐÍÏÔʾµÄ¸ñʽÉÔÓв»Í¬£¬ËüûÓÐÐÔÖÊÐÍ̬£¬µ«ÐÔÖʵÄÖµÒâÒåÒ²ºÜÃ÷ÏÔ¡£
×¢Ò⣺xprop µÄÊä³öÏ൱µÄ¸´ÔÓ£¬ÎÒÃDz¢²»ÐèÒªÁ˽âÆäËùÓеÄÄÚÈÝ£¬¶ËÊÓÐèÒª¶ø¶¨¡£
ÒÔÏÂÈÃÎÒÃÇ¿´¿´´ÓÓ¦ÓÃÊÓ´°¡¢¸ùÊÓ´°¡¢×ÖÐÍËù»ñµÃ²»Í¬µÄÊä³ö£º
Ó¦ÓÃÊÓ´°µÄÐÔÖÊ
ͼ12-4Ϊxprop ¶ÔÒ»¸öÓ¦ÓÃÊÓ´°µÄÊä³ö£¬ÓÐЩ×ÊѶÄãÒѾÔÚxwininfoÖп´µ½¹ý£¬ÔÚ´Ë´¦Äã¿ÉÒÔÔÚÃûΪWM_NORMAL_HINTS ºÍWM_HINTSµÄÐÔÖÊÖп´µ½¡£
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p140 fig 12.4 ©¦
©¦ ©¦
©¦ ͼ12-4 Ò»¸öÓ¦ÓÃÊÓ´°µÄÐÔÖʱíÁÐ ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
ÆäËüµÄÐÔÖÊÈçÏ£º
WM_COMMAND£ºÖ´ÐÐÆô¶¯Õâ¸öÓ¦ÓóÌʽµÄÃüÁîÁУ¬±»ÇгÉÒ»¸ö¸öÓÃË«ÒýºÅÀ¨ÆðÀ´µÄµ¥×Ö¡£
WM_CLIENT_MACHINE £ºÖ´ÐÐÕâ¸öclientÓ¦ÓóÌʽµÄ»úÆ÷Ãû³Æ£¨Õâ¸öÀý×ÓÓ¦ÓóÌʽºÍserverÔÚͬһ²¿»úÆ÷ÉÏÖ´ÐУ¬ËùÒÔ»úÆ÷Ãû³ÆΪvenus ¡££©¡£
WM_CLASS£ºÏÔʾӦÓóÌʽµÄinstant nameºÍclass name£¬instant nameÊÇÃüÁîÁÐÖÐ-name Ñ¡ÏîµÄÖµ¡£
WM_ICON_NAME£ºÓ¦ÓóÌʽµÄ±íáçͼËùÒªÏÔʾ³öÀ´µÄÃû³Æ£¨ÄãµÄÊÓ´°¹ÜÀíÆ÷±ØÐëÄܹ»Ö§Ô®·½¿É£©¡£
WM_NAME £ººÜÆæ¹ÖµÄ£¬Õâ²»ÊÇÓ¦ÓóÌʽµÄÃû³Æ£¬¶øÊÇÓÉ-titleÑ¡ÏîÖ¸¶¨µÄÊÓ´°±êÌâÃû³Æ£¬ÓÐЩÊÓ´°¹ÜÀíÆ÷»á°Ñ±êÌâÃû³ÆÏÔʾÔÚÓ¦ÓÃÊÓ´°µÄ±êÌâ°ôÉÏ¡£
×¢Ò⣺ÉÏÊöÃüÁîÁÐÖÐ-name ºÍ-titleÁ½¸öÑ¡ÏîʹÓõúܹ㣬µ«Ëü²¢·ÇͨÓÃ(universal) µÄÑ¡ÏӦÓóÌʽÔÚ׫дʱ±ØÐèҪʹÓõ½£Ø Toolkit£¨¹¤¾ßÏ䣩²ÅÄÜ°ÑÕâÁ½¸öÑ¡Ïîµ±³É±ê׼ѡÏîÀ´Óᣣ¨²Î¼ûµÚ£±£µÕ£©
¸ùÊÓ´°µÄÐÔÖÊ
ͼ12-5ÊÇxprop ¶Ô¸ùÊÓ´°µÄÊä³ö£¬ÏÔ¶øÒ×¼ûµÄÊÇ£¬Ëü²»»áº¬ÓÐÈκÎÊÓ´°¹ÜÀíÆ÷µÄÐÔÖÊ£¬ÒòΪÊÓ´°¹ÜÀíÆ÷¾ø²»¿ÉÄÜÖØн¨¹¹¸ùÊÓ´°¡£
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p141 fig 12.5 ©¦
©¦ ©¦
©¦ ͼ12-5 ¸ùÊÓ´°µÄÐÔÖʱíÁÐ ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
ÓÐȤµÄÑ¡ÏîÈçÏ£º
RESOURCE_MANAGER£ºÕâ¸ö¸ùÊÓ´°ÐÔÖÊÊÇresource½á¹¹µÄÊäÈëÔ´Ö®Ò»£¬ÎÒÃǽ«ÔÚµÚ£±£±ÕÂÏêϸµØÌÖÂÛËü¡£
¼¸¸öCUT_BUFFER£ºµ±ÄãÇÐÈ¡Ò»¶Î±¾ÎÄ£¨×ö¼ôÌù¶¯×÷³£Óã©£¬Õâ¶Î±»ÇÐÈ¡µÄ±¾Îı»·ÅÔÚÒ»¸öÇÐÈ¡»º³åÆ÷(cut buffer)ÖУ¬ÕâЩ»º³åÆ÷±»µ±×÷ÊǸùÊÓ´°µÄÐÔÖÊÀ´´¢´æ£¬¶Ôì¶ÇÐÈ¡£¬»º³åÆ÷ÊÇÑ»·Ê¹Óõģ¬ÀýÈçÉÏ´ÎÓÃ5 ºÅ»º³åÆ÷£¬ÔòÏ´ÎÓÃ6 ºÅ£¬½ÓÏÂÀ´7 ºÅ¡¢0 ºÅ¡¢1 ºÅµÈµÈ£¬µ«ÊÇð¤ÌùÔòÒ»¶¨Ê¹ÓÃÉÏ´ÎÇÐÈ¡¶¯×÷ËùÓõĻº³åÆ÷¡£
×ÖÐÍÐÔÖÊ
ͼ12-6Áгöµ±ÎÒÃÇÖ¸¶¨*times*bold*-i-*-180-*µÄ×ÖÐÍÐÔÖÊ£¬´ó²¿·ÝµÄ×ÊѶÎÒÃǶ¼²»Ðè¹ØÐÄ£¬Äã¿ÉÄÜÖ»¶ÔFULL_NAME ºÍPOINT_SIZEÓÐÐËȤ¡£
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p142 fig 12.6 ©¦
©¦ ©¦
©¦ ͼ12-6 ×ÖÐ͵ÄÐÔÖʱíÁÐ ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
12.3 ¹Û²ì£ØµÄʼþ -- xev
¡±Ê¼þ¡±»ò¶à»òÉÙÇý¶¯ÖøÕû¸öÊÓ´°ÏµÍ³£¬ËùÓеÄÊäÈ룬²»ÂÛÊÇ»¬Êó»ò¼üÅÌ£¬¾ùÓÉ¡±Ê¼þ¡±À´ÕÆÎÕ£¬¡±Ê¼þ¡±Ò²±»ÓÃÀ´Çý¶¯ÊÓ´°µÄÖØн¨¹¹ºÍÕ¹ÏÖ¡£xev ³ÌʽÈÃÄã¿´µ½µ±²»Í¬µÄ¶¯×÷·¢Éúʱ£¬»á²úÉúʲ÷ᡱʼþ¡±£¬ÒÔ¼°ºÍ¡±Ê¼þ¡±ÓйصÄ×ÊѶ¡£
µ±xev Æô¶¯£¬Ëü»á½¨Ò»¸öÀàËÆͼ12-7µÄÊÓ´°£¬¶øÔÚÕâÊÓ´°ÖУ¬»á¿ªÊ¼ÁгöÀàËÆͼ12-8µÄÓйØʼþµÄϸ½Ú²¿·Ý¡£
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p143 fig 12.7 ©¦
©¦ ©¦
©¦ ͼ12-7 xev ÊÓ´° ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p143 fig 12.8 ©¦
©¦ ©¦
©¦ ͼ12-8 xev µÄÊä³ö ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
ÓÉì¶ xevÌṩ´óÁ¿µÄϵͳÄÚ²¿²Ù×÷ϸ½Ú£¬ÄãÈç¹ûÏëÒª¡±ÊµÑ顱ϵͳ£¬ÕâÊÇÒ»¸öºÜÓÐÓõijÌʽ£¬ÓÐÁ½¸ö˵Ã÷ÊÖ²áÉÏδÌáµ½µÄÑ¡Ïî¿ÉÒÔÓ°Ïìµ½xev µÄÐÐΪ£º
-bs option£º´ËÑ¡Ïî¸Ä±äxev ¶ÔserverÊÇ·ñʹÓÃbacking store £¨¼ûµÚ£²Õ£©£¬Ê¹ÓÃbacking store ½«¼õÉÙÆع⡱ʼþ¡±µÄ´ÎÊý£¨Ò²¾ÍÊǼõÉÙÓ¦ÓóÌʽÖØиüÐÂËü×Ô¼ºÊÓ´°µÄ´ÎÊý£©£¬ÕýÈ·µÄÑ¡ÏîÄÚÈÝΪalways£¬
¡¡¡¡¡¡¡¡¡¡¡¡whenmappedºÍnotuseful ¡£
-s£ºÊ¹ÓÃsave-unders £¨¼ûµÚ£²Õ£©£¬Ò²¾ÍÊÇ˵£¬ÒªÇóserver±£´æÄÇЩ±»xev µÄÊÓ´°ÕÚ¸ÇÖ®ÊÓ´°µÄÄÚÈÝ¡£
12.3.1 xev ºÍ¼üÅÌ
Èç¹ûÄ㽫ָ±êÒÆÈëxev ÊÓ´°ÇÒ°´ÏÂÄãµÄ¼üÅÌÉϵÄijһ¸ö¼ü£¬ÔòÒ»¸ö£¨»ò¶à¸ö£©¼üÅÌ¡±Ê¼þ¡±»á·¢Éú£¬¡±Ê¼þ¡±µÄ×ÊѶ°üº¬ÁËkeycode ºÍkeysym£¬ÕâÊÇ×îÈÝÒ×¹Û²ìÄãµÄ»úÆ÷ÉÏijһ¸ö¼üÊÇʲ÷á¼üÂë(keycode) µÄ·½·¨£ºÖ´ÐÐxev £¬°´Ò»¸ö¼ü£¬xev ±ã»á¸øÄã×ÊѶ£¬Õâ¶Ô¶¨ÖÆÄãµÄ¼üÅ̷dz£ÓÐÓ㬼û£±£¸Õ¡£
12.4 ½áÂÛ
±¾ÕÂËùÊöµÄÕâЩ³Ìʽ£¬ÈÃÄã¹Û²ìϵͳµÄÄÚ²¿£»»ñµÃËüµÄ²Ù×÷ϸ½Ú£»ºÍËüµÄÊÓ´°¼°ÆäËü³ÉÔ±Ìض¨µÄ×ÊѶ£®¶ÔÕâЩ³Ìʽ±¾Éí¶øÑÔ£¬ËüÃÇÄÜ°ïÖúÄãÁ˽âϵͳ£¬µ«ËüÃÇ×î´óµÄÓÃ;¿ÉÄÜÊÇÓÃÀ´Á¬½ÓÄÇЩ¶¨ÖÆϵͳµÄ³Ìʽ¡£ÒÔϵļ¸ÕÂÔÚ˵Ã÷ÈçºÎ¶¨ÖƺÍÉ趨ÄãµÄϵͳ£¬ºÃÈÃϵͳ¸üÊʺÏÄ㹤×÷µÄÏ°¹ß¡£
ÏÂÒ»ÕÂÌÖÂÛ´¦Àí×ÖÐͺÍÑÕÉ«£¬¼°ÈçºÎʹÓÃËüÃÇ¡£