Opened 10 years ago

Closed 9 years ago

#4339 closed bug (fixed)

Screen saver settings are lost when switching tabs

Reported by: VinDuv Owned by: axeld
Priority: normal Milestone: R1
Component: Preferences/ScreenSaver Version: R1/Development
Keywords: Cc: stimut@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by axeld)

This is hrev32648. To reproduce:

  • Open the ScreenSaver preflet, click on Modules, then on a screen saver which has settings (e.g. IFS, Spider).
  • Change the settings.
  • Click on the Fade tab then go back to Modules.

The settings are reset to their previous values.

Attachments (1)

ScreenSaverWindew.cpp.diff (1.4 KB) - added by stimut 9 years ago.
ScreenSaver preflet patch

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by stimut

Cc: stimut@… added

This seems to be because the settings panel is actually generated by the screen saver itself (and not the ScreenSaver preflet), so we can't hook into any of the messages that would be caused when a setting is changed.

I have therefore created a patch which uses the ModulesView::DetachedFromWindow() function to save the settings. This caused a crash when quitting from the modules view though (presumably because the settings object has already been deleted by the time the DetachedFromWindow() function is called), so I had to add a variable which is set in QuitRequested() so that we don't try and save in DetachedFromWindow() when we are quitting (the settings are already saved in QuitRequested()).

It doesn't feel like the cleanest solution to me, but I couldn't think of another way.

Changed 9 years ago by stimut

Attachment: ScreenSaverWindew.cpp.diff added

ScreenSaver preflet patch

comment:2 Changed 9 years ago by axeld

Status: newin-progress

comment:3 Changed 9 years ago by axeld

Description: modified (diff)

comment:4 Changed 9 years ago by axeld

Resolution: fixed
Status: in-progressclosed
Version: R1/pre-alpha1R1/Development

Thanks a lot for the patch! I did not apply it, though, as I solved the issue a bit differently.

Fixed in hrev35727.

Note: See TracTickets for help on using tickets.