diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-08-19 09:57:48 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-08-19 09:57:48 +0000 |
commit | 75f81dae8ac5a8c13421ba7f07263fdd23db112d (patch) | |
tree | 4b1d8218361edaf993de1d8ccccfd46fa74c4fd8 /x11-wm | |
parent | a202cb1ef90b59d085d192a067423ef16c897faf (diff) | |
download | ports-75f81dae8ac5a8c13421ba7f07263fdd23db112d.tar.gz ports-75f81dae8ac5a8c13421ba7f07263fdd23db112d.zip |
Notes
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/transset-df/Makefile | 2 | ||||
-rw-r--r-- | x11-wm/transset-df/files/patch-transset.c | 63 |
2 files changed, 64 insertions, 1 deletions
diff --git a/x11-wm/transset-df/Makefile b/x11-wm/transset-df/Makefile index b9398704b5ec..4f0761e3657a 100644 --- a/x11-wm/transset-df/Makefile +++ b/x11-wm/transset-df/Makefile @@ -7,7 +7,7 @@ PORTNAME= transset-df PORTVERSION= 5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-wm MASTER_SITES= http://forchheimer.se/transset-df/ diff --git a/x11-wm/transset-df/files/patch-transset.c b/x11-wm/transset-df/files/patch-transset.c new file mode 100644 index 000000000000..ad99a7928cd6 --- /dev/null +++ b/x11-wm/transset-df/files/patch-transset.c @@ -0,0 +1,63 @@ +--- /transSet.c 2007-08-17 18:02:34.000000000 +0200 ++++ transSet.c 2007-08-17 18:03:28.000000000 +0200 +@@ -39,6 +39,8 @@ + fprintf(stderr, + " -p, --point select the window currently under the cursor\n"); + fprintf(stderr, ++ " -a, --actual select the actual window\n"); ++ fprintf(stderr, + " -n, --name NAME select by name, NAME is matched as regular expression\n"); + fprintf(stderr, + " --no-regex don't use regular expression for matching name\n"); +@@ -85,6 +87,15 @@ + return child; + } + ++/* returns the actual window */ ++Window get_actual_window(Display *dpy) ++{ ++ int i; ++ Window w; ++ ++ XGetInputFocus(dpy, &w, &i); ++ return get_top_window(dpy, w); ++} + + /* nothing fancy */ + int main(int argc, char **argv) +@@ -109,6 +120,7 @@ + {"toggle",0,NULL,'t'}, + {"help",0,NULL,'h'}, + {"point",0,NULL,'p'}, ++ {"actual",0,NULL,'a'}, + {"click",0,NULL,'c'}, + {"id",1,NULL,'i'}, + {"name",1,NULL,'n'}, +@@ -131,7 +143,7 @@ + Setup_Display_And_Screen(&argc, argv); + + /* parse arguments */ +- while ((o = getopt_long(argc, argv, "thpci:n:vVm:x:123",long_options,&options_index)) != -1) ++ while ((o = getopt_long(argc, argv, "thapci:n:vVm:x:123",long_options,&options_index)) != -1) + { + switch (o) { + case 't': +@@ -156,6 +168,9 @@ + namestr = optarg; + select_method=3; + break; ++ case 'a': ++ select_method=4; ++ break; + case '1': + flag_increase=1; + break; +@@ -228,6 +243,8 @@ + target_win = get_top_window(dpy,target_win); + if(flag_verbose) printf("found 0x%x\n",(unsigned int)target_win); + ++ } else if(select_method==4) { ++ target_win = get_actual_window(dpy); + } else { + /* grab mouse and return window that is next clicked */ + target_win = Select_Window(dpy); |