[haiku-development] Who should save input settings?

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 5 Sep 2020 21:20:42 +0200

Hi there,

I am reviewing Preetpal's work and am finding some strange design
choices in the existing code :)

Currently, both the input_server and the Input preferences will write
the mouse settings file whenever one of the mouse settings changes. This
seems rather useless. Who should do it? Should the preference panel
never touch the settings file, and get the settings from input_server?

That would be the simplest way, but then every change of setting results
in a disk access, which isn't great. If done in the input preferences,
we could just tell the input server to change the setting "live", and
write the file only once when exiting the preference app.

What do you think?

-- 
Adrien.

Other related posts: