ui/gtk: fix UI info precondition
commit9bd4d3df633593878ada3dffcfe05318754b4596
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 15 Sep 2023 11:28:31 +0000 (15 15:28 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 3 Oct 2023 11:09:57 +0000 (3 15:09 +0400)
treea00e7aa59555eda264120d455ece9ac886eeca1c
parent75b773d84c89220463a14a6883d2b2a8e49e5b68
ui/gtk: fix UI info precondition

dpy_get_ui_info() shouldn't be called if the underlying GPU doesn't
support it.

Before the assert() was added and the regression introduced, GTK code
used to get "zero" UI info, for ex with a simple VGA device. The assert
was added to prevent from calling when there are no console too. The
other display backend that calls dpy_get_ui_info() correctly checks that
pre-condition.

Calling dpy_set_ui_info() is "safe" in this case, it will simply return
an error that can be generally ignored.

Fixes: commit a92e7bb4c ("ui: add precondition for dpy_get_ui_info()")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
ui/gtk.c