clients/scaler: check viewporter availability

I just got bitten by this: I thought my compositor was dropping
the viewport somehow, but it just didn't expose the viewporter
global.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2023-05-02 16:28:11 +02:00 committed by Marius Vlad
parent 8ca6c24c8f
commit fe49534488

View file

@ -317,6 +317,11 @@ main(int argc, char *argv[])
display_set_user_data(box.display, &box);
display_set_global_handler(box.display, global_handler);
if (box.mode != MODE_NO_VIEWPORT && !box.viewport) {
fprintf(stderr, "compositor doesn't support viewporter\n");
return -1;
}
display_run(d);
widget_destroy(box.widget);