mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pipewire: module-x11-bell: make X11 errors fatal
This commit is contained in:
parent
7f70d484c2
commit
84cc3d7dc6
1 changed files with 6 additions and 4 deletions
|
|
@ -172,7 +172,7 @@ static int x11_connect(struct impl *impl, const char *name)
|
||||||
unsigned int auto_ctrls, auto_values;
|
unsigned int auto_ctrls, auto_values;
|
||||||
|
|
||||||
if (!(impl->display = XOpenDisplay(name))) {
|
if (!(impl->display = XOpenDisplay(name))) {
|
||||||
pw_log_warn("XOpenDisplay() failed");
|
pw_log_error("XOpenDisplay() failed");
|
||||||
res = -EIO;
|
res = -EIO;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
@ -185,7 +185,7 @@ static int x11_connect(struct impl *impl, const char *name)
|
||||||
minor = XkbMinorVersion;
|
minor = XkbMinorVersion;
|
||||||
|
|
||||||
if (!XkbLibraryVersion(&major, &minor)) {
|
if (!XkbLibraryVersion(&major, &minor)) {
|
||||||
pw_log_warn("XkbLibraryVersion() failed");
|
pw_log_error("XkbLibraryVersion() failed");
|
||||||
res = -EIO;
|
res = -EIO;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
@ -196,7 +196,7 @@ static int x11_connect(struct impl *impl, const char *name)
|
||||||
if (!XkbQueryExtension(impl->display, NULL, &impl->xkb_event_base,
|
if (!XkbQueryExtension(impl->display, NULL, &impl->xkb_event_base,
|
||||||
NULL, &major, &minor)) {
|
NULL, &major, &minor)) {
|
||||||
res = -EIO;
|
res = -EIO;
|
||||||
pw_log_warn("XkbQueryExtension() failed");
|
pw_log_error("XkbQueryExtension() failed");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -290,7 +290,9 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
||||||
* to pipewire eventually and will then block the mainloop. */
|
* to pipewire eventually and will then block the mainloop. */
|
||||||
pw_thread_loop_start(impl->thread_loop);
|
pw_thread_loop_start(impl->thread_loop);
|
||||||
|
|
||||||
x11_connect(impl, name);
|
res = x11_connect(impl, name);
|
||||||
|
if (res < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
error:
|
error:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue