From owner-freebsd-ports Wed Mar 7 17: 4:11 2001 Delivered-To: freebsd-ports@freebsd.org Received: from smtp1.chello.se (smtp1.chello.se [193.150.195.10]) by hub.freebsd.org (Postfix) with ESMTP id 85D0637B718; Wed, 7 Mar 2001 17:04:04 -0800 (PST) (envelope-from girgen@partitur.se) Received: from palle.girgensohn.se ([193.150.249.140]) by smtp1.chello.se (InterMail vK.4.03.00.00 201-232-121 license 13ed6d939a101f33a28aa8ad6d2fac65) with ESMTP id <20010308010317.VOZH12835.smtp1@palle.girgensohn.se>; Thu, 8 Mar 2001 02:03:17 +0100 Received: from partitur.se (localhost [127.0.0.1]) by palle.girgensohn.se (8.11.2/8.11.1) with ESMTP id f2813Pl71617; Thu, 8 Mar 2001 02:03:34 +0100 (CET) (envelope-from girgen@partitur.se) Message-ID: <3AA6DA5D.BF4F89FA@partitur.se> Date: Thu, 08 Mar 2001 02:03:25 +0100 From: Palle Girgensohn Organization: Partitur X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.2-STABLE i386) X-Accept-Language: sv, en MIME-Version: 1.0 To: Mikhail Teterin Cc: will@freebsd.org, kbyanc@posi.net, ports@freebsd.org, 21048@bugs.kde.org, jwz@netscape.com, x_cbug@netscape.com, stolcke@ICSI.Berkeley.EDU, mmm@cetia.fr Subject: Re: netscape-remote breaks with the new KDE2.1 :( References: <200102281830.f1SIUhc68438@misha.privatelabs.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi! Has anyone found a solution to this? I just checked, and xlsclient does find communicator, but netscape -remote doesnt work, and neither does the netscape-remote port, with or without the patch below. Odd... So, I thought I'd jump to gnome and see if it was any different. Yes. xlsclient does *NOT* find communicator, but here netscape -remote does work. netscape-remote port still doesn't work, with or without patches. I'm not an X specialist, but I thought I'd share my experience here. Any success in fixing the problem? /Palle Mikhail Teterin wrote: > > Hello! > > The KDE bug #21048, that I just filed, probably, has less to do with > KDE, than with netscape-remote itself. I don't know enough about X11 > calls to be certain, however. > > The problem is, with the new KDE, attempts to use netscape -remote fail > with: > > communicator-linux-4_76_bin: root window has no children on display :0.0 > > The same problem, of course, exists for our netscape-remote. For some > reason, the root window, as reported by the horrors of > > RootWindowOfScreen (DefaultScreenOfDisplay (dpy)) > > or the simple > > DefaultRootWindow(dpy) > > is not "quite" the root window :) The later call to > > XQueryTree (dpy, root, &root2, &parent, &kids, &nkids)) > > returns the correct root window in root2. A comment in the file says: > > /* root != root2 is possible with virtual root WMs. */ > > but nothing there handles this scenario. > > Please, examine the attached patch (it incorporates the existing FreeBSD > port's files/patch-aa), which (besides silencing some compilation > warnings) makes mozilla_remote_find_window loop until the returned root2 > is the same as the given root. This is either immediately, or at the > second run (from my observations), so I did not put any provisions there > to ensure it stops after a certain number of attempts. > > Can someone explain to me, why xlsclients(1) does not need this > and always gets the root window directly from the first call to > DefaultRootWindow(dpy)? Thanks! > > -mi > > --- remote.c Sat Jun 22 00:00:00 1996 > +++ remote.c Wed Feb 28 12:52:38 2001 > @@ -45,4 +45,4 @@ > comment this line out. > - */ > #include "vroot.h" > +*/ > > @@ -83,5 +83,5 @@ > int i; > - Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy)); > - Window root2, parent, *kids; > - unsigned int nkids; > + Window root, root2 = DefaultRootWindow(dpy); > + Window parent, *kids = NULL; > + unsigned int nkids = 0; > Window result = 0; > @@ -90,3 +90,9 @@ > > - if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids)) > + /* root != root2 is possible with virtual root WMs. */ > + /* turns out, we need to get to the bottom -- the very top root window */ > + /* what continues to puzzle me, is that xlsclients works without this -- */ > + /* The DefaultRootWindow(dpy) always returns the right thing to it... */ > + do { > + root = root2; > + if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids)) > { > @@ -96,4 +102,3 @@ > } > - > - /* root != root2 is possible with virtual root WMs. */ > + } while (root != root2); > > @@ -148,2 +153,6 @@ > { > +#ifndef STANDALONE > + /* no point in harassing the user when run standalone; everyone has > + * at least netscape 1.1 by now! > + */ > fprintf (stderr, > @@ -153,2 +162,3 @@ > tenative_version, (unsigned int) tenative); > +#endif > XFree (tenative_version); > @@ -350,3 +360,3 @@ > { > - int result; > + int result = -1; > Bool done = False; > @@ -509,2 +519,4 @@ > > + if(commands == NULL) return 0; > + > if (window == 0) > @@ -568,3 +580,3 @@ > > -void > +int > main (int argc, char **argv) > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-ports" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message