Fixed SetLook() (is not implemented server-side, though).
Finally got the thread rename code right under R5 8-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13391 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include <MessageQueue.h>
|
#include <MessageQueue.h>
|
||||||
#include <MessageRunner.h>
|
#include <MessageRunner.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
|
#include <Autolock.h>
|
||||||
|
|
||||||
#include <ApplicationPrivate.h>
|
#include <ApplicationPrivate.h>
|
||||||
#include <AppMisc.h>
|
#include <AppMisc.h>
|
||||||
@@ -1448,7 +1449,7 @@ BWindow::SetTitle(const char *title)
|
|||||||
int32 length = strlen(title);
|
int32 length = strlen(title);
|
||||||
length = min_c(length, B_OS_NAME_LENGTH - 3);
|
length = min_c(length, B_OS_NAME_LENGTH - 3);
|
||||||
memcpy(threadName + 2, title, length);
|
memcpy(threadName + 2, title, length);
|
||||||
threadName[length] = '\0';
|
threadName[length + 2] = '\0';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SetName(threadName);
|
SetName(threadName);
|
||||||
@@ -1586,18 +1587,16 @@ BWindow::Type() const
|
|||||||
status_t
|
status_t
|
||||||
BWindow::SetLook(window_look look)
|
BWindow::SetLook(window_look look)
|
||||||
{
|
{
|
||||||
|
BAutolock locker(this);
|
||||||
|
|
||||||
Lock();
|
|
||||||
fLink->StartMessage(AS_SET_LOOK);
|
fLink->StartMessage(AS_SET_LOOK);
|
||||||
fLink->Attach<int32>((int32)look);
|
fLink->Attach<int32>((int32)look);
|
||||||
|
|
||||||
int32 code = SERVER_FALSE;
|
int32 code;
|
||||||
fLink->FlushWithReply(code);
|
status_t status = fLink->FlushWithReply(code);
|
||||||
|
|
||||||
Unlock();
|
|
||||||
|
|
||||||
// ToDo: the server should probably return something more meaningful, anyway
|
// ToDo: the server should probably return something more meaningful, anyway
|
||||||
if (code == SERVER_TRUE) {
|
if (status == B_OK && code == SERVER_TRUE) {
|
||||||
fLook = look;
|
fLook = look;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user