summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2011-08-01 11:36:56 -0700
committerAaron Plattner <aplattner@nvidia.com>2011-08-01 14:34:18 -0700
commit0ab156f5b9d812ad9e94354e4e04490ed119eb1f (patch)
treea4b3eb0d708ae0495e8b7f937a910124020f4d37 /main.c
parenta30927f9b4279e2404f4deea2e3966364d5f0fd0 (diff)
Use the right screen from $DISPLAY
RootWindow(dpy, 0) always uses screen 0, even if a different screen is specified in the $DISPLAY environment variable. Use DefaultRootWindow(dpy) instead to use the right one. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index e261c78..5190c49 100644
--- a/main.c
+++ b/main.c
@@ -289,8 +289,8 @@ int main(int argc, char **argv)
num_ops = PictOpSaturate;
}
- window.d = XCreateSimpleWindow(dpy, RootWindow(dpy, 0), 0, 0, win_width,
- win_height, 0, 0, WhitePixel(dpy, 0));
+ window.d = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0,
+ win_width, win_height, 0, 0, WhitePixel(dpy, 0));
as.override_redirect = True;
XChangeWindowAttributes(dpy, window.d, CWOverrideRedirect, &as);