Moved picture handlers to DispatchViewMessage, otherwise they are never called as the view can be hidden
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15818 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
716a16ce61
commit
cba9e9ece6
@ -1775,6 +1775,42 @@ if (ServerBitmap* bitmap = fServerApp->FindBitmap(bitmapToken)) {
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_LAYER_BEGIN_PICTURE:
|
||||
{
|
||||
DTRACE(("ServerWindow %s: Message AS_LAYER_BEGIN_PICTURE\n", Title()));
|
||||
ServerPicture *picture = App()->CreatePicture();
|
||||
fCurrentLayer->SetPicture(picture);
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_LAYER_APPEND_TO_PICTURE:
|
||||
{
|
||||
DTRACE(("ServerWindow %s: Message AS_LAYER_APPEND_TO_PICTURE\n", Title()));
|
||||
|
||||
int32 pictureToken;
|
||||
link.Read<int32>(&pictureToken);
|
||||
|
||||
fCurrentLayer->SetPicture(App()->FindPicture(pictureToken));
|
||||
// we don't care if it's NULL
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_LAYER_END_PICTURE:
|
||||
{
|
||||
DTRACE(("ServerWindow %s: Message AS_LAYER_END_PICTURE\n", Title()));
|
||||
|
||||
ServerPicture *picture = fCurrentLayer->Picture();
|
||||
if (picture != NULL) {
|
||||
fCurrentLayer->SetPicture(NULL);
|
||||
fLink.StartMessage(B_OK);
|
||||
fLink.Attach<int32>(picture->Token());
|
||||
} else
|
||||
fLink.StartMessage(B_ERROR);
|
||||
|
||||
fLink.Flush();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
if (fDesktop->LockSingleWindow()) {
|
||||
_DispatchViewDrawingMessage(code, link);
|
||||
@ -2156,42 +2192,6 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code, BPrivate::LinkReceiver &li
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_LAYER_BEGIN_PICTURE:
|
||||
{
|
||||
DTRACE(("ServerWindow %s: Message AS_LAYER_BEGIN_PICTURE\n", Title()));
|
||||
ServerPicture *picture = App()->CreatePicture();
|
||||
fCurrentLayer->SetPicture(picture);
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_LAYER_APPEND_TO_PICTURE:
|
||||
{
|
||||
DTRACE(("ServerWindow %s: Message AS_LAYER_APPEND_TO_PICTURE\n", Title()));
|
||||
|
||||
int32 pictureToken;
|
||||
link.Read<int32>(&pictureToken);
|
||||
|
||||
fCurrentLayer->SetPicture(App()->FindPicture(pictureToken));
|
||||
// we don't care if it's NULL
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_LAYER_END_PICTURE:
|
||||
{
|
||||
DTRACE(("ServerWindow %s: Message AS_LAYER_END_PICTURE\n", Title()));
|
||||
|
||||
ServerPicture *picture = fCurrentLayer->Picture();
|
||||
if (picture != NULL) {
|
||||
fCurrentLayer->SetPicture(NULL);
|
||||
fLink.StartMessage(B_OK);
|
||||
fLink.Attach<int32>(picture->Token());
|
||||
} else
|
||||
fLink.StartMessage(B_ERROR);
|
||||
|
||||
fLink.Flush();
|
||||
break;
|
||||
}
|
||||
|
||||
case AS_LAYER_DRAW_PICTURE:
|
||||
{
|
||||
int32 token;
|
||||
|
Loading…
Reference in New Issue
Block a user