pawelchcki / semicomplete

Automatically exported from code.google.com/p/semicomplete
0 stars 0 forks source link

I've written a patch to support screen numbers on search #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ben@mordor:~/src/xdotool-20090815$ diff xdo.h
/home/julie/src/semicomplete-read-only/xdo.h
42d41
<   char *screen_name;
47c46
<   int screenNum;

---
> 
52c51
< xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,
int screenNum,

---
> xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,

ben@mordor:~/src/xdotool-20090815$ diff xdo.c
/home/julie/src/semicomplete-read-only/xdo.c
74,86c74
<   int screenNum = 0; //Default to screen 0
<   int found = 0;
<   for (int i = 0; i < strlen(display_name); i++)
<   {
<   if (found)
<   {
<      screenNum = display_name[i] - 48;
<      break;
<   }
<   if (display_name[i] == '.')
<       found = 1;
<   }
<   return xdo_new_with_opened_display(xdpy, display_name, screenNum, 1);

---
>   return xdo_new_with_opened_display(xdpy, display_name, 1);
89c77
< xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,
int screenNum,

---
> xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,
103d90
<   xdo->screenNum = screenNum;
177c164
<   _xdo_get_child_windows(xdo, RootWindow(xdo->xdpy, xdo->screenNum),
max_depth,

---
>   _xdo_get_child_windows(xdo, RootWindow(xdo->xdpy, 0), max_depth,

Original issue reported on code.google.com by ben.stan...@gmail.com on 21 Sep 2009 at 8:04

GoogleCodeExporter commented 9 years ago
Looks good. I'll patch it in and test.

Original comment by jls.semi...@gmail.com on 22 Sep 2009 at 3:18

GoogleCodeExporter commented 9 years ago
Sorry for the delays in integrating this feature. I've been slacking. Will get 
to this 
soon

Original comment by jls.semi...@gmail.com on 1 Jan 2010 at 3:58

GoogleCodeExporter commented 9 years ago
Issue 9 has been merged into this issue.

Original comment by jls.semi...@gmail.com on 1 Jan 2010 at 4:02

GoogleCodeExporter commented 9 years ago
Haha, no problem, I'm still using the version I originally patched ;-)

Original comment by ben.stan...@gmail.com on 1 Jan 2010 at 11:23

GoogleCodeExporter commented 9 years ago
Alrighty. Screen searching now supported in svn HEAD (new release soon)

Search for 'foo' on all screens:
xdotool search foo

Search for 'foo' on screen 1:
xdotool search --screen 1 foo

This is only relevant to normal X screens. Xinerama sessions are treated as a 
single 
screen.

If you can, can you confirm that this works for you? It works for me, buti  use 
Xinerama, and I am not sure I can configure my setup without it (nvidia card). 

Original comment by jls.semi...@gmail.com on 26 Feb 2010 at 7:56