polybar/src/components
Patrick Ziegler 1d4e30c4be
fix: Handle X events before polling for IO (#2820)
* Use m_connection.poll_for_event

* fix: Handle X events before polling for IO

Polling the XCB file descriptor for X events doesn't detect events that
are already in XCB's event queue but not yet handled.

If this happens, the eventloop polls for IO and the queued events wait
until another event arrives, causing some desyncs in the bar.

This can easily happen if something (e.g. a click event) triggers some
xcb calls, which as a consequence buffer some incoming events.

We "fix" this by adding a libuv prepare handle (which runs right before
polling for IO) that processes pending X events.
2022-09-13 14:21:36 +02:00
..
bar.cpp fix: Crash on root pixmap and window depth mismatch (#2813) 2022-09-05 09:58:12 +02:00
builder.cpp feat(tray): Position using a module (#2595) 2022-04-15 23:50:04 +02:00
command_line.cpp Allow running polybar without BAR argument (#2526) 2021-10-07 14:48:47 +02:00
config.cpp Also monitor include-files for changes when --reload is set (#2759) 2022-07-09 12:24:21 +02:00
config_parser.cpp config_parser: Pass barname as argument to parse() (#2765) 2022-07-09 13:12:37 +02:00
controller.cpp fix: Handle X events before polling for IO (#2820) 2022-09-13 14:21:36 +02:00
eventloop.cpp fix: Handle X events before polling for IO (#2820) 2022-09-13 14:21:36 +02:00
logger.cpp fix(logger): Wrong conversion function called 2020-12-12 01:43:12 +01:00
renderer.cpp tray: implement hiding functionality (#2723) 2022-06-16 12:53:49 +02:00
screen.cpp Remove factory_util unique and shared 2021-09-21 21:43:27 +02:00