summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorkbyanc <kbyanc@FreeBSD.org>2001-05-04 06:10:06 +0000
committerkbyanc <kbyanc@FreeBSD.org>2001-05-04 06:10:06 +0000
commite5daaeaaf38ad94c6596991698fcf9f641d5888d (patch)
tree0632f8c71d843ac769b44045ff4fa23996035c53 /www
parentfedacb56edcffe309389ff9b2730aeb7739c7243 (diff)
downloadFreeBSD-ports-e5daaeaaf38ad94c6596991698fcf9f641d5888d.zip
FreeBSD-ports-e5daaeaaf38ad94c6596991698fcf9f641d5888d.tar.gz
Fix netscape-remote so it works with KDE.
Submitted by: knu Obtained from: KDE Bug#21048 (patch by Mikhail Teterin)
Diffstat (limited to 'www')
-rw-r--r--www/netscape-remote/Makefile1
-rw-r--r--www/netscape-remote/files/patch-aa64
2 files changed, 59 insertions, 6 deletions
diff --git a/www/netscape-remote/Makefile b/www/netscape-remote/Makefile
index d45aadc..fb3aafe 100644
--- a/www/netscape-remote/Makefile
+++ b/www/netscape-remote/Makefile
@@ -7,6 +7,7 @@
PORTNAME= netscape-remote
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://home.netscape.com/newsref/std/
DISTFILES= remote.c vroot.h
diff --git a/www/netscape-remote/files/patch-aa b/www/netscape-remote/files/patch-aa
index cf0b334..e184c0e 100644
--- a/www/netscape-remote/files/patch-aa
+++ b/www/netscape-remote/files/patch-aa
@@ -1,6 +1,49 @@
---- remote.c.orig Sun Oct 31 13:45:51 1999
-+++ remote.c Sun Oct 31 13:46:28 1999
-@@ -146,11 +146,16 @@
+--- remote.c.orig Wed May 2 01:47:12 2001
++++ remote.c Wed May 2 01:47:34 2001
+@@ -43,8 +43,8 @@
+ file, you can find it at "http://home.netscape.com/newsref/std/vroot.h".
+ If you don't care about supporting virtual root window managers, you can
+ comment this line out.
+- */
+ #include "vroot.h"
++*/
+
+
+ #ifdef STANDALONE
+@@ -81,21 +81,26 @@
+ mozilla_remote_find_window (Display *dpy)
+ {
+ 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;
+ Window tenative = 0;
+ unsigned char *tenative_version = 0;
+
+- 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))
+ {
+ fprintf (stderr, "%s: XQueryTree failed on display %s\n", progname,
+ DisplayString (dpy));
+ exit (2);
+ }
+-
+- /* root != root2 is possible with virtual root WMs. */
++ } while (root != root2);
+
+ if (! (kids && nkids))
+ {
+@@ -146,11 +151,16 @@
}
else if (tenative)
{
@@ -17,16 +60,25 @@
XFree (tenative_version);
return tenative;
}
-@@ -507,6 +512,8 @@
+@@ -348,7 +358,7 @@
+ mozilla_remote_command (Display *dpy, Window window, const char *command,
+ Bool raise_p)
+ {
+- int result;
++ int result = -1;
+ Bool done = False;
+ char *new_command = 0;
+
+@@ -507,6 +517,8 @@
int status = 0;
mozilla_remote_init_atoms (dpy);
-+ if(commands == NULL) return;
++ if(commands == NULL) return 0;
+
if (window == 0)
window = mozilla_remote_find_window (dpy);
else
-@@ -566,7 +573,7 @@
+@@ -566,7 +578,7 @@
}
OpenPOWER on IntegriCloud