summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2005-02-24 10:59:21 +0000
committerAaron Walker <ka0ttic@gentoo.org>2005-02-24 10:59:21 +0000
commit79b00d1e41e20a3456675abe032bf6bf5fc06fea (patch)
tree641072e1ff82d5ecaa2e33100b3debf3acbded8a /x11-terms/root-tail/files
parentAdd new revision of root-tail pending testing under kde. (diff)
downloadgentoo-2-79b00d1e41e20a3456675abe032bf6bf5fc06fea.tar.gz
gentoo-2-79b00d1e41e20a3456675abe032bf6bf5fc06fea.tar.bz2
gentoo-2-79b00d1e41e20a3456675abe032bf6bf5fc06fea.zip
Revision bump; added patch for kde support thanks to Evgeniy <dushistov@mail.ru> in bug 83091.
(Portage version: 2.0.51.16)
Diffstat (limited to 'x11-terms/root-tail/files')
-rw-r--r--x11-terms/root-tail/files/digest-root-tail-1.2-r21
-rw-r--r--x11-terms/root-tail/files/root-tail-1.2-kde.patch125
2 files changed, 126 insertions, 0 deletions
diff --git a/x11-terms/root-tail/files/digest-root-tail-1.2-r2 b/x11-terms/root-tail/files/digest-root-tail-1.2-r2
new file mode 100644
index 000000000000..c2b467691268
--- /dev/null
+++ b/x11-terms/root-tail/files/digest-root-tail-1.2-r2
@@ -0,0 +1 @@
+MD5 5a4b3c4c7ab3bed1f4575e9688aac5de root-tail-1.2.tar.gz 20805
diff --git a/x11-terms/root-tail/files/root-tail-1.2-kde.patch b/x11-terms/root-tail/files/root-tail-1.2-kde.patch
new file mode 100644
index 000000000000..750edf2fefa0
--- /dev/null
+++ b/x11-terms/root-tail/files/root-tail-1.2-kde.patch
@@ -0,0 +1,125 @@
+diff -bBurN root-tail-1.2/config.h root-tail-my/config.h
+--- root-tail-1.2/config.h 2004-07-30 23:32:39.000000000 +0400
++++ root-tail-my/config.h 2005-02-23 13:02:48.878912688 +0300
+@@ -15,3 +15,4 @@
+
+ #define VERSION "1.2"
+
++#define KDE
+diff -bBurN root-tail-1.2/root-tail.c root-tail-my/root-tail.c
+--- root-tail-1.2/root-tail.c 2004-07-30 23:33:20.000000000 +0400
++++ root-tail-my/root-tail.c 2005-02-23 13:02:37.599627400 +0300
+@@ -148,6 +148,11 @@
+ regex_t *transformre;
+ #endif
+
++#ifdef KDE
++#define ATOM(a) XInternAtom(disp, #a, False)
++
++int screen, ScreenWidth, ScreenHeight;
++#endif
+
+ /* prototypes */
+ void list_files (int);
+@@ -227,7 +232,7 @@
+ return Color.pixel;
+ }
+
+-#ifndef USE_TOON_GET_ROOT_WINDOW
++#if !defined(USE_TOON_GET_ROOT_WINDOW) && !defined(KDE)
+ static void
+ find_root_window (Display *display, int screen_number)
+ {
+@@ -280,14 +285,91 @@
+ fprintf (stderr, "Can't query tree on root window 0x%lx", root);
+ }
+ }
+-#endif /* USE_TOON_GET_ROOT_WINDOW */
++#elif defined(KDE)
++static Window find_subwindow(Window win, int w, int h) {
++ unsigned int i, j;
++ Window troot, parent, *children;
++ unsigned int n;
++
++ /* search subwindows with same size as display or work area */
++
++ for (i=0; i<10; i++) {
++ XQueryTree(disp, win, &troot, &parent, &children, &n);
++
++ for (j=0; j<n; j++) {
++ XWindowAttributes attrs;
++
++ if (XGetWindowAttributes(disp, children[j], &attrs)) {
++ /* Window must be mapped and same size as display or work space */
++ if (attrs.map_state != 0 &&
++ ((attrs.width == ScreenWidth && attrs.height == ScreenHeight) ||
++ (attrs.width == w && attrs.height == h))) {
++ win = children[j];
++ break;
++ }
++ }
++ }
++
++ XFree(children);
++ if (j == n) break;
++ }
++
++ return win;
++}
++
++static void
++find_root_window (Display *display, int screen_number)
++{
++ Atom type;
++ int format, i;
++ unsigned long nitems, bytes;
++ unsigned int n;
++ root = RootWindow(display, screen_number);
++ Window win = root;
++ Window troot, parent, *children;
++ unsigned char *buf = NULL;
++
++ /* some window managers set __SWM_VROOT to some child of root window */
++
++ XQueryTree(display, root, &troot, &parent, &children, &n);
++ for (i=0; i<(int)n; i++) {
++ if (XGetWindowProperty(display, children[i], ATOM(__SWM_VROOT),
++ 0, 1, False, XA_WINDOW, &type, &format, &nitems, &bytes,
++ &buf) == Success && type == XA_WINDOW) {
++ win = * (Window *) buf;
++ XFree(buf);
++ XFree(children);
++ fprintf(stderr, "torsmo: drawing to window from __SWM_VROOT property\n");
++ root=win;
++ return;
++ }
++
++ if (buf) {
++ XFree(buf);
++ buf = 0;
++ }
++ }
++ XFree(children);
++
++ /* get subwindows from root */
++ win = find_subwindow(root, -1, -1);
++
++ win = find_subwindow(win, width, height);
++
++ if (buf) { XFree(buf); buf = 0; }
++
++ root=win;
++}
++#endif /* USE_TOON_GET_ROOT_WINDOW && KDE*/
+
+ void
+ InitWindow (void)
+ {
+ XGCValues gcv;
+ unsigned long gcm;
++#ifndef KDE
+ int screen, ScreenWidth, ScreenHeight;
++#endif
+ struct logfile_entry *e;
+
+ if (!(disp = XOpenDisplay (dispname)))