Comment on attachment 287156
Fix XRemoteClient to support multiple screens
>+ // First we check whether there is a window on the default screen
>+ w = FindBestWindow(aProgram, aUsername, aProfile, aSupportsCommandLine,
>+ defaultScreen);
>+ if (w)
>+ return w;
>+
>+ // If not, then check all other screens
>+ for (i = 0; i < numScreens && i != defaultScreen; ++i) {
>+ w = FindBestWindow(aProgram, aUsername, aProfile, aSupportsCommandLine,
>+ i);
>+ if (w)
>+ return w;
>+ }
This above loop isn't quite right. If we have screens 0, 1, and 2, with 1 being the default and a window on 2, we won't find it. The defaultScreen check likely should be contained in the loop itself with a continue statement.
That said, I'm rather puzzled as to how this patch fixes this bug? I can't seem to see how it would allow opening windows on multiple screens. I think the reporter can work around his problem by running firefox with MOZ_NO_REMOTE=1 (or whatever that env var is called) in addition to the DISPLAY= magic and set up differing profiles.
Comment on attachment 287156
Fix XRemoteClient to support multiple screens
>+ // First we check whether there is a window on the default screen aProgram, aUsername, aProfile, aSupportsComman dLine, aProgram, aUsername, aProfile, aSupportsComman dLine,
>+ w = FindBestWindow(
>+ defaultScreen);
>+ if (w)
>+ return w;
>+
>+ // If not, then check all other screens
>+ for (i = 0; i < numScreens && i != defaultScreen; ++i) {
>+ w = FindBestWindow(
>+ i);
>+ if (w)
>+ return w;
>+ }
This above loop isn't quite right. If we have screens 0, 1, and 2, with 1 being the default and a window on 2, we won't find it. The defaultScreen check likely should be contained in the loop itself with a continue statement.
That said, I'm rather puzzled as to how this patch fixes this bug? I can't seem to see how it would allow opening windows on multiple screens. I think the reporter can work around his problem by running firefox with MOZ_NO_REMOTE=1 (or whatever that env var is called) in addition to the DISPLAY= magic and set up differing profiles.