diff --git a/headers/os/interface/Window.h b/headers/os/interface/Window.h index 3556d152eb..072ef913ed 100644 --- a/headers/os/interface/Window.h +++ b/headers/os/interface/Window.h @@ -203,7 +203,7 @@ public: float* minHeight, float* maxHeight); status_t SetDecoratorSettings(const BMessage& settings); - status_t GetDecoratorSettings(BMessage* settings); + status_t GetDecoratorSettings(BMessage* settings) const; uint32 Workspaces() const; void SetWorkspaces(uint32); diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index a76ea04ae0..93f08c1ca0 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1222,12 +1222,12 @@ BWindow::SetDecoratorSettings(const BMessage& settings) status_t -BWindow::GetDecoratorSettings(BMessage* settings) +BWindow::GetDecoratorSettings(BMessage* settings) const { // read a flattened settings message from the app_server // and put it into settings - if (!Lock()) + if (!const_cast(this)->Lock()) return B_ERROR; status_t ret = fLink->StartMessage(AS_GET_DECORATOR_SETTINGS); @@ -1251,7 +1251,7 @@ BWindow::GetDecoratorSettings(BMessage* settings) } } - Unlock(); + const_cast(this)->Unlock(); return ret; }