diff options
author | sdilts <stuart.dilts@gmail.com> | 2018-08-09 22:05:18 -0600 |
---|---|---|
committer | sdilts <stuart.dilts@gmail.com> | 2018-08-09 22:05:18 -0600 |
commit | 55cca6deaa4813a407cfecccf21478671a96d11e (patch) | |
tree | b094ab5bb7b57fdf4a6a5c1013e665057a4246e1 /backend/x11 | |
parent | d2814c1795717c9d74511e8fea0f8cc9c600f6f0 (diff) |
Set default output size for X11 backend
Fixes issue #1170
Also set the created window size to match the output size.
Diffstat (limited to 'backend/x11')
-rw-r--r-- | backend/x11/output.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c index 151807dd..3be63d5f 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -121,6 +121,9 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) { struct wlr_output *wlr_output = &output->wlr_output; wlr_output_init(wlr_output, &x11->backend, &output_impl, x11->wl_display); + wlr_output->width = 1024; + wlr_output->height = 768; + output_set_refresh(&output->wlr_output, 0); snprintf(wlr_output->name, sizeof(wlr_output->name), "X11-%d", @@ -137,8 +140,8 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) { }; output->win = xcb_generate_id(x11->xcb_conn); xcb_create_window(x11->xcb_conn, XCB_COPY_FROM_PARENT, output->win, - x11->screen->root, 0, 0, 1024, 768, 1, XCB_WINDOW_CLASS_INPUT_OUTPUT, - x11->screen->root_visual, mask, values); + x11->screen->root, wlr_output->width, wlr_output->height, 1024, 768, 1, + XCB_WINDOW_CLASS_INPUT_OUTPUT, x11->screen->root_visual, mask, values); output->surf = wlr_egl_create_surface(&x11->egl, &output->win); if (!output->surf) { |