John Scipione 95e8362c52 Tracker: Save Desktop state again
Let me tell you a story about a bug.

In a615ec8f86406c14607c656cf90492bc58bd73d0 Axel imported the OpenTracker code
into Haiku with fSaveStateIsEnabled set to true (for Desktop and all windows).

In 9f2a3f6f47d121411c85a1e939f1cda80a4b4b1d I (John) changed it to:
fSaveStateIsEnabled(dynamic_cast<BDeskWindow*>(this) == NULL) which is suppose
to detect whether or not the ContainerWindow is the Desktop and only save the
state if it is NOT. However, this didn't actually work because since this is
called in the constructor the dynamic_cast to BDeskWindow* fails. Therefore we
were still saving the state of Desktop even though the code make it look like
we weren't.

In e7803cf1f69a81b1c77880518ba16b6708c1efdb Augustin updated the code so that
BDeskWindow passes in a isDeskbar flag as part of the constructor parameters
thus detecting that the window was Deskbar correctly. So basically Augustin
fixed the bug detecting whether or not the window was the Deskbar in the
constructor which then disabled saving the Desktop's state to attributes.
Augustin unknowingly turned saving the Desktop's state off.

We don't want to disable saving the Desktop's state because that's where we
store things like the icon size. What I was probably thinking when I tried
unsuccessfully to turn off saving the state of the Desktop was that I don't
want to save the WINDOW state of the Desktop since that would save the
window dimensions of the Desktop (whatever your screen resolution is) and if
you changed Tracker to non-spatial mode and opened the Desktop in a Tracker
window it would pick up those attributes and then make the window take up the
entire dimensions of your screen (a whole different bug).

This bug, however, is also handled in 9f2a3f6f47d121411c85a1e939f1cda80a4b4b1d
because code was added to BContainerWindow::SaveWindowState() which detects
whether or not the window is the Desktop and if so, doesn't save (or restore)
the window state (which is only part of the state).

So with this change (reversal really) the other parts of the Desktop's state
like icon size are once again saved while the window state is not.

Fixes #11864
2015-02-25 15:31:43 -05:00
2015-02-21 06:28:26 +01:00
2015-02-23 18:29:56 +01:00
2015-02-25 15:31:43 -05:00

Haiku

Homepage | Mailing Lists | IRC Channels | Issue Tracker | API docs

Haiku is an open-source operating system that specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful.

Goals

  • Sensible defaults with minimal configuration required.
  • Clean, clear, concise code.
  • Unified desktop environment.

Trying Haiku

Haiku provides pre-built nightly images and release images. Haiku is compatible with a large variety of hardware, but in case you don't want to "take the plunge" and install Haiku on bare metal, you can install it on a virtual machine (VM) instead. If you've never used a VM before, you can follow one of the "Emulating Haiku" guides.

Compiling Haiku

See ReadMe.Compiling.

Contributing

Haiku is a meritocratic open source project with a large variety of tasks. Even if you can't write code, you can still help! Haiku needs designers, (technical) writers, translators, testers... Get involved and help out!

Contributing code

If you're submitting a patch to us, please make sure you're following the patch submitting guidelines.

If you're having trouble finding something in the source tree, you can use one of our OpenGrok servers:

Contributing documentation

The main piece of documentation that still needs work are the API docs (found in the tree at src/docs/user). Just find an undocumented class, write documentation for it, and submit a patch.

Contributing translations

See wiki:i18n.

Contributing software ports

See HaikuPorts.

Description
The Haiku operating system
Readme 551 MiB
Languages
C++ 52.2%
C 46.6%
Assembly 0.4%
HTML 0.3%
Python 0.1%