mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 12:35:41 +02:00
module/xwindow: de-registering events from active window may fail
De-registering events from the previous active window may fail (when the previous window has been destroyed). Catch this early, and only log a debug message. This avoids having a normal occurrence polluting the output with error messages.
This commit is contained in:
parent
d86c9914e5
commit
4f5e22e231
1 changed files with 9 additions and 1 deletions
|
@ -39,10 +39,18 @@ static void
|
||||||
update_active_window(struct private *m)
|
update_active_window(struct private *m)
|
||||||
{
|
{
|
||||||
if (m->active_win != 0) {
|
if (m->active_win != 0) {
|
||||||
xcb_change_window_attributes(
|
xcb_void_cookie_t c = xcb_change_window_attributes_checked(
|
||||||
m->conn, m->active_win, XCB_CW_EVENT_MASK,
|
m->conn, m->active_win, XCB_CW_EVENT_MASK,
|
||||||
(const uint32_t []){XCB_EVENT_MASK_NO_EVENT});
|
(const uint32_t []){XCB_EVENT_MASK_NO_EVENT});
|
||||||
|
|
||||||
|
xcb_generic_error_t *e = xcb_request_check(m->conn, c);
|
||||||
|
if (e != NULL) {
|
||||||
|
LOG_DBG(
|
||||||
|
"failed to de-register events on previous active window: %s",
|
||||||
|
xcb_error(e));
|
||||||
|
free(e);
|
||||||
|
}
|
||||||
|
|
||||||
m->active_win = 0;
|
m->active_win = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue