ssanthosh243 / semicomplete

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

xdotool only searches screen 0 #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a display with more than one screen
2. ./xdotool search 'window-name-on-screen-other-than-0'

What is the expected output? the window id matching search string
What do you see instead? no results found

What version of the product are you using? 20090815
On what operating system? ubuntu jaunty

Please provide any additional information below:
Getting the default root window based on the $DISPLAY string is much better
than hardcoding zero.  This way if $DISPLAY is :0.1 the user will search
screen 1, instead of forcing screen :0.0

Ideally searching all displays would be a great option.

8<----------------------------------------------------------
--- xdo.c       2009-08-16 11:16:12.000000000 +1200
+++ xdo.c.defxroot      2009-09-12 21:59:43.000000000 +1200
@@ -161,7 +161,7 @@
   *nwindows = 0;
   *windowlist = malloc(matched_window_list_size * sizeof(Window));

-  _xdo_get_child_windows(xdo, RootWindow(xdo->xdpy, 0), max_depth,
+  _xdo_get_child_windows(xdo, XDefaultRootWindow(xdo->xdpy), max_depth,
                          &total_window_list, &ntotal_windows,
                          &window_list_size);
   for (i = 0; i < ntotal_windows; i++) {
8<----------------------------------------------------------

Original issue reported on code.google.com by mat...@xtra.co.nz on 12 Sep 2009 at 10:05

GoogleCodeExporter commented 9 years ago
I think this is a dup of issue 11. Merging these together.

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