Linux problem with AWT

Mike Plummer plunger at apg.philips.com
Fri Aug 14 04:13:09 PDT 1998


(U) verdier philippe wrote:

> > From relay1!rufus.w3.org!kaffe  Wed Aug 12 18:52:55 1998
> > >Received: from relay5.eunet.fr by relay1.fnet.fr (5.65c8d/96.05.03)
> >       via EUnet-France id AA06592; Wed, 12 Aug 1998 18:29:57 +0200 (MET)
> > Resent-From: kaffe at rufus.w3.org
> > Resent-Date: Wed, 12 Aug 1998 12:28:32 -0400
> > Resent-Message-Id: <199808121628.MAA11140 at rufus.w3.org>
> > X-Authentication-Warning: rufus.w3.org: majordom set sender to owner-kaffe at rufus.w3.org using -f
> > Date: Wed, 12 Aug 1998 17:28:32 +0100
> > From: Mike Plummer <plunger at apg.philips.com>
> > Mime-Version: 1.0
> > To: Kaffe Mailing List <kaffe at transvirtual.com>
> > Subject: Linux problem with AWT
> > Content-Transfer-Encoding: 7bit
> > X-Loop: kaffe at rufus.w3.org
> > X-Mailing-List: kaffe at rufus.w3.org
> >
> > I am new to Kaffe and Linux, but an old hand with Unix.
> >
> > I have downloaded and compiled Kaffe 1.0b1 source under Slackware  3.5
> >
> > Most Java applications run very well, but appear not to respond to any
> > keyboard input when running applets or AWT applications. Is this a known
> > phenomenon?
>
> I've just encourtered the same problem on Sparc.
> The 'WM_TAKE_FOCUS' protocol is never taken into account.
> Try to change the following code in 'X/evt.c':
>
> jobject
> clientMessage ( JNIEnv* env, Toolkit* X )
> {
>   if ( X->event.xclient.message_type == WM_PROTOCOLS ) {
>         if ( X->event.xclient.data.l[0] == WM_DELETE_WINDOW ) {
>           return (*env)->CallStaticObjectMethod( env, WindowEvent, getWindowEvent, X->srcIdx, (X->evtId = WINDOW_CLOSING));
>         }
>         else if ( X->event.xclient.data.l[0] == WM_TAKE_FOCUS ) {
>           XSetInputFocus( X->dsp, X->event.xany.window, RevertToNone, CurrentTime);
>         }
>   }
>   /*
>    * this is a workaround for the common problem of requesting the focus for not
>    * yet mapped windows (resulting in BadMatch errors)
>    */
>   .......

Works for me, at least when running fvwm95. Still a problem with OpenWindows (my preferred option since I have used Suns for
what seems like forever) but I think that might be in my X setup.

Thanks to all concerned for you help.

--
Regards, Mike

----------------------------------------------------------------
 Mike Plummer.   Consultant Engineer,  Multimedia Systems Group
 Advanced Projects Group, Philips C.E. Redhill, Surrey UK RH1 5HA
 Phone: +44 (0)1293 81 5235            Fax: +44 (0)1293 81 5050
 Email: plunger at apg.philips.com        Mobile: 0410 414068
 Compuserve: 100137,3545 OR mike_plummer at compuserve.com
 He was a wise man, that invented beer. Plato
----------------------------------------------------------------




More information about the kaffe mailing list