From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 13 Jul 2005 08:06:54 +0400 From: Alexey Tourbin To: devel@altlinux.ru Message-ID: <20050713040654.GB10741@solemn.turbinal.org> Mail-Followup-To: devel@altlinux.ru References: <20050618163636.GF2751@solemn.turbinal.org> <20050618221026.GH2751@solemn.turbinal.org> <20050618225813.GI2751@solemn.turbinal.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wq9mPyueHGvFACwf" Content-Disposition: inline In-Reply-To: <20050618225813.GI2751@solemn.turbinal.org> Subject: [devel] Re: RFC: test-aboutdialog (GUI) X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2005 07:38:16 -0000 Archived-At: List-Archive: List-Post: --wq9mPyueHGvFACwf Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 19, 2005 at 02:58:13AM +0400, Alexey Tourbin wrote: > On Sun, Jun 19, 2005 at 02:10:26AM +0400, Alexey Tourbin wrote: > > On Sat, Jun 18, 2005 at 08:36:36PM +0400, Alexey Tourbin wrote: > > > =F0=CF=C4 Xvfb =D0=CF=CB=C1 =CE=C5 =D2=C1=C2=CF=D4=C1=C5=D4, =CE=C5 = =DA=CE=C1=C0 =D4=CF=DE=CE=CF =D0=CF=DE=C5=CD=D5. :( > >=20 > > =F0=CF=C4 Xvfb =CE=C5 =D2=C1=C2=CF=D4=C1=C5=D4 XKeysymToKeycode() -- = =D7=CF=DA=D7=D2=C1=DD=C1=C5=D4 0. > > =FC=D4=CF =D7 =D0=D2=CF=C3=C5=D3=D3=C5 =DA=C1=D0=D2=CF=D3=C1 =CE=C1 =CE= =C1=D6=C1=D4=C9=C5 Alt (keysym=3D65513). >=20 > $ cat xtest.c > #include > #include > #include > int main() > { > Display *display =3D XOpenDisplay(NULL); > if (!display) > return 1; > KeyCode kc =3D XKeysymToKeycode(display, XK_Alt_L); > printf("keycode=3D%d\n", kc); > return 0; > } > $ gcc -I/usr/X11R6/include -L/usr/X11R6/lib xtest.c -lX11 > $ DISPLAY=3D:0 ./a.out > keycode=3D64 > $ xvfb-run -a ./a.out > xauth: creating new authority file /home/at/.Xauthority > keycode=3D0 > $ >=20 > =F5 =CB=CF=C7=CF-=CE=C9=C2=D5=C4=D8 =D7=CF=D3=D0=D2=CF=C9=DA=D7=CF=C4=C9= =D4=D3=D1? Any ideas? =F0=D2=CF=C2=CC=C5=CD=C1 =D2=C5=DB=C9=CC=C1=D3=D8 =D4=C1=CB: --- X11-GUITest-0.20/GUITest.xs- 2004-01-16 23:41:42 +0000 +++ X11-GUITest-0.20/GUITest.xs 2005-07-13 01:35:14 +0000 @@ -213,6 +213,15 @@ return( GetKeySym(key, sym) ); } =20 +/* Xvfb lacks XK_Alt_L; fall back to XK_Meta_L */ +#define XKeysymToKeycode(display, sym) \ +({ Display *d =3D (display); KeySym s =3D (sym); \ + KeyCode kc =3D (XKeysymToKeycode)(d, s); \ + if (kc =3D=3D 0 && s =3D=3D XK_Alt_L) \ + kc =3D (XKeysymToKeycode)(d, XK_Meta_L); \ + kc; \ +}) + /* Function: PressKeyImp * Description: Presses the key for the specified keysym. Lower-level * implementation. > NB: =EE=E5 =FA=E1=F0=F5=F3=EB=E1=EA=F4=E5 xfvb-run =D7 =C4=CF=CD=C1=DB=CE= =C5=CD =CB=C1=D4=C1=CC=CF=C7=C5. --wq9mPyueHGvFACwf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFC1JNefBKgtDjnu0YRAjP6AJ9TRBE86kAN98rFXrnJlTVpM7NveACgiSYO zM6VLJ5mcFshrukSe8W0UkY= =JCEI -----END PGP SIGNATURE----- --wq9mPyueHGvFACwf--