scorpion-26 / gBar

Blazingly fast status bar written with GTK
MIT License
459 stars 17 forks source link

Mouse wheel actions can break gBar on volume sliders #86

Closed fdev31 closed 4 months ago

fdev31 commented 4 months ago
  1. Use "wheel up" or "wheel down" in cycles for an abusive amount of time (~10s)
  2. Observe gBar process the events in a very slow and lagging way

Result:

Expectation option 1:

Expectation option 2:


mouse_up_handler() {
   pending_volume += INCREMENT;
   process_volume();
}

process_volume() {
   if (processing) return;
   start_processing_thread();
}

processing_thread() {
   while (actual_volume != pending_volume) {
      actual_volume = pending_volume;
      apply_volume();
   }
}
scorpion-26 commented 4 months ago

Should be fixed now, so you can scroll as much as you want without freezing gBar