Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 129721 Details for
Bug 63635
patch to support more command line args for transset, so it can be used from scripts + man-page
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
transset corrected patch
extended-commandline-args-adv.patch (text/plain), 2.76 KB, created by
khraath
on 2007-08-31 22:29:35 UTC
(
hide
)
Description:
transset corrected patch
Filename:
MIME Type:
Creator:
khraath
Created:
2007-08-31 22:29:35 UTC
Size:
2.76 KB
patch
obsolete
>diff -urN transset/dsimple.c transset.patch/dsimple.c >--- transset/dsimple.c 2003-11-24 18:12:27.000000000 +0100 >+++ transset.patch/dsimple.c 2007-08-31 22:45:59.000000000 +0200 >@@ -130,6 +130,40 @@ > return (displayname); > } > >+/* >+ * Get_Translucence (argc, argv) Look for -display, -d, or host:dpy (obselete) >+ * If found, remove it from command line. Don't go past a lone -. >+ */ >+double Get_Translucence(pargc, argv) >+ int *pargc; /* MODIFIED */ >+ char **argv; /* MODIFIED */ >+{ >+ int argc = *pargc; >+ char **pargv = argv+1; >+ double tr = 1.0; >+ int i; >+ >+ for (i = 1; i < argc; i++) { >+ char *arg = argv[i]; >+ >+ if (!strcmp (arg, "-translucence") || !strcmp (arg, "-tr")) { >+ if (++i >= argc) usage (); >+ >+ tr = atof(argv[i]); >+ *pargc -= 2; >+ continue; >+ } >+ if (!strcmp(arg,"-")) { >+ while (i<argc) >+ *pargv++ = argv[i++]; >+ break; >+ } >+ *pargv++ = arg; >+ } >+ >+ *pargv = NULL; >+ return tr; >+} > > /* > * Open_Display: Routine to open a display with correct error handling. >diff -urN transset/dsimple.h transset.patch/dsimple.h >--- transset/dsimple.h 2003-11-24 18:12:27.000000000 +0100 >+++ transset.patch/dsimple.h 2007-08-31 22:38:40.000000000 +0200 >@@ -54,6 +54,7 @@ > char *Malloc(unsigned); > char *Realloc(char *, int); > char *Get_Display_Name(int *, char **); >+double Get_Translucence(int *, char **); > Display *Open_Display(char *); > void Setup_Display_And_Screen(int *, char **); > XFontStruct *Open_Font(char *); >diff -urN transset/transSet.c transset.patch/transSet.c >--- transset/transSet.c 2004-01-20 21:03:02.000000000 +0100 >+++ transset.patch/transSet.c 2007-09-01 00:08:44.000000000 +0200 >@@ -30,31 +30,37 @@ > /* nothing fancy */ > int main(int argc, char **argv) > { >- int gotd = 0; >- double d; >+ double d = -1.0; > unsigned int opacity; > > /* wonderful utility */ > Setup_Display_And_Screen(&argc, argv); >+ d = Get_Translucence(&argc, argv); >+ target_win = Select_Window_Args(&argc, argv); > >- if (argv[1]) >+ /* grab mouse and return window that is next clicked */ >+ if (target_win == 0) >+ target_win = Select_Window(dpy); >+ /* get the target_win id from argument id */ >+ else > { >- printf ("got arg %s\n", argv[1]); >- d = atof (argv[1]); >- printf ("d is %g\n", d); >- gotd = 1; >+ Window parent,root; >+ Window* ch_ret; >+ unsigned int nch_ret; >+ XQueryTree(dpy,target_win,&root,&parent,&ch_ret,&nch_ret); >+ XFree(ch_ret); >+ XQueryTree(dpy,parent,&root,&parent,&ch_ret,&nch_ret); >+ XFree(ch_ret); >+ target_win=parent; > } >- >- /* grab mouse and return window that is next clicked */ >- target_win = Select_Window(dpy); >- >+ > unsigned char *data; > > Atom actual; > int format; > unsigned long n, left; > >- if (gotd) >+ if (d >= 0.0) > opacity = (unsigned int) (d * OPAQUE); > else > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 63635
:
39379
|
39380
| 129721