mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
fix(regression): GTK refactor causing updates to be missed
Regression introduced by recent GTK refactor. The `glib_recv` macros previously using the passed in expression as the receiver, which was causing a new receiver to be created *every* time an event was received. This caused some peculiar behaviours where some events just never got through if sent too close to each other. This was most obvious in the `workspaces` module. Fixes #381
This commit is contained in:
parent
b2a37a32b0
commit
b4d75450ac
14 changed files with 27 additions and 23 deletions
|
@ -110,7 +110,7 @@ impl Module<Button> for ClockModule {
|
|||
let format = self.format.clone();
|
||||
let locale = Locale::try_from(self.locale.as_str()).unwrap_or(Locale::POSIX);
|
||||
|
||||
let mut rx = context.subscribe();
|
||||
let rx = context.subscribe();
|
||||
glib_recv!(rx, date => {
|
||||
let date_string = format!("{}", date.format_localized(&format, locale));
|
||||
label.set_label(&date_string);
|
||||
|
@ -126,7 +126,7 @@ impl Module<Button> for ClockModule {
|
|||
fn into_popup(
|
||||
self,
|
||||
_tx: mpsc::Sender<Self::ReceiveMessage>,
|
||||
mut rx: broadcast::Receiver<Self::SendMessage>,
|
||||
rx: broadcast::Receiver<Self::SendMessage>,
|
||||
_info: &ModuleInfo,
|
||||
) -> Option<gtk::Box> {
|
||||
let container = gtk::Box::new(Orientation::Vertical, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue