backend-x11: use shorthand for current_mode
Pure refactoring to reduce statement lengths. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
committed by
Pekka Paalanen
parent
9e1c96bce7
commit
aac8eefc44
@@ -945,6 +945,7 @@ static int
|
|||||||
x11_output_enable(struct weston_output *base)
|
x11_output_enable(struct weston_output *base)
|
||||||
{
|
{
|
||||||
struct x11_output *output = to_x11_output(base);
|
struct x11_output *output = to_x11_output(base);
|
||||||
|
const struct weston_mode *mode = output->base.current_mode;
|
||||||
struct x11_backend *b;
|
struct x11_backend *b;
|
||||||
|
|
||||||
assert(output);
|
assert(output);
|
||||||
@@ -988,8 +989,7 @@ x11_output_enable(struct weston_output *base)
|
|||||||
output->window,
|
output->window,
|
||||||
screen->root,
|
screen->root,
|
||||||
0, 0,
|
0, 0,
|
||||||
output->base.current_mode->width,
|
mode->width, mode->height,
|
||||||
output->base.current_mode->height,
|
|
||||||
0,
|
0,
|
||||||
XCB_WINDOW_CLASS_INPUT_OUTPUT,
|
XCB_WINDOW_CLASS_INPUT_OUTPUT,
|
||||||
screen->root_visual,
|
screen->root_visual,
|
||||||
@@ -1054,8 +1054,7 @@ x11_output_enable(struct weston_output *base)
|
|||||||
.use_shadow = true,
|
.use_shadow = true,
|
||||||
};
|
};
|
||||||
if (x11_output_init_shm(b, output,
|
if (x11_output_init_shm(b, output,
|
||||||
output->base.current_mode->width,
|
mode->width, mode->height) < 0) {
|
||||||
output->base.current_mode->height) < 0) {
|
|
||||||
weston_log("Failed to initialize SHM for the X11 output\n");
|
weston_log("Failed to initialize SHM for the X11 output\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@@ -1096,9 +1095,7 @@ x11_output_enable(struct weston_output *base)
|
|||||||
wl_event_loop_add_timer(loop, finish_frame_handler, output);
|
wl_event_loop_add_timer(loop, finish_frame_handler, output);
|
||||||
|
|
||||||
weston_log("x11 output %dx%d, window id %d\n",
|
weston_log("x11 output %dx%d, window id %d\n",
|
||||||
output->base.current_mode->width,
|
mode->width, mode->height, output->window);
|
||||||
output->base.current_mode->height,
|
|
||||||
output->window);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user