bonefish + zooey:

* Fixed a general problem with respect to overriding of the reserved
  virtual function slots: instead of statically invoking the method
  that corresponds to the reserved slot on the class that contains the
  slot, we now invoke the virtual Perform() method. Perform() then dispatches 
  the method invocation to the "proper" class, i.e. the highest class in the 
  hierarchy that  actually implements the requested method.
  This fixes a crash in apps that use liblayout's MSlider class and
  should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
  define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
  invoke Perform() where necessary or to pass on the method call statically
  (for slots that were already maintained by Be)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2008-10-15 09:29:06 +00:00
parent f00aecf4b6
commit 39fbf5509b
30 changed files with 1448 additions and 97 deletions
+16 -3
View File
@@ -33,6 +33,7 @@
#include <AppMisc.h>
#include <AppServerLink.h>
#include <ApplicationPrivate.h>
#include <binary_compatibility/Interface.h>
#include <DirectMessageTarget.h>
#include <input_globals.h>
#include <InputServerTypes.h>
@@ -2013,9 +2014,18 @@ BWindow::RemoveFromSubset(BWindow *window)
status_t
BWindow::Perform(perform_code d, void *arg)
BWindow::Perform(perform_code code, void* _data)
{
return BLooper::Perform(d, arg);
switch (code) {
case PERFORM_CODE_SET_LAYOUT:
{
perform_data_set_layout* data = (perform_data_set_layout*)_data;
BWindow::SetLayout(data->layout);
return B_OK;
}
}
return BLooper::Perform(code, _data);
}
@@ -3624,9 +3634,12 @@ BWindow::IsFilePanel() const
extern "C" void
_ReservedWindow1__7BWindow()
_ReservedWindow1__7BWindow(BWindow* window, BLayout* layout)
{
// SetLayout()
perform_data_set_layout data;
data.layout = layout;
window->Perform(PERFORM_CODE_SET_LAYOUT, &data);
}