mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-08 11:52:02 +08:00
enhance move_to_layer to handle failure of __mg_move_client_to_layer
This commit is contained in:
@@ -334,10 +334,14 @@ static int move_to_layer (int cli, int clifd, void* buff, size_t len)
|
||||
if (!__mg_is_valid_layer (dst_layer))
|
||||
goto ret;
|
||||
|
||||
if (__mg_move_client_to_layer (mgClients + cli, dst_layer, TRUE)) {
|
||||
if (__mg_move_client_to_layer (mgClients + cli, dst_layer)) {
|
||||
moved_info.layer = dst_layer;
|
||||
moved_info.zo_shmid = dst_layer->zorder_shmid;
|
||||
}
|
||||
else {
|
||||
moved_info.layer = INV_LAYER_HANDLE;
|
||||
moved_info.zo_shmid = 0;
|
||||
}
|
||||
|
||||
ret:
|
||||
return ServerSendReply (clifd, &moved_info, sizeof (MOVEDCLIENTINFO));
|
||||
|
||||
Reference in New Issue
Block a user