Linux problem with AWT

U verdier philippe verdier at ditv-philips.fr
Thu Aug 13 02:08:08 PDT 1998


> 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)
   */
  .......


More information about the kaffe mailing list