Compare commits

...
3 Commits
4 changed files with 51 additions and 3 deletions
+1 -1
View File
@@ -1600,7 +1600,7 @@ typedef struct _CompositorOps {
* a main window with the extended style WS_EX_AUTOPOSITION.
*/
void (*calc_mainwin_pos) (CompositorCtxt* ctxt, MG_Layer* layer,
DWORD zt_type, int first_for_type, CALCPOSINFO* info);
DWORD zt_type, int first_for_type, CALCPOSINFO* info, int cli);
/**
* This operation will be called when there was a layer operation.
+1 -1
View File
@@ -532,7 +532,7 @@ static void rebuild_wins_region (CompositorCtxt* ctxt)
}
static void calc_mainwin_pos (CompositorCtxt* ctxt, MG_Layer* layer,
DWORD zt_type, int first_for_type, CALCPOSINFO* info)
DWORD zt_type, int first_for_type, CALCPOSINFO* info, int cli)
{
/* give a default size first */
if (IsRectEmpty (&info->rc)) {
+1 -1
View File
@@ -4410,7 +4410,7 @@ static int dskCalculateDefaultPosition (int cli, CALCPOSINFO* info)
#ifdef _MGSCHEMA_COMPOSITING /* not defined _MGSCHEMA_COMPOSITING */
DO_COMPSOR_OP_ARGS (calc_mainwin_pos,
__mg_get_layer_from_zi(zi), zt_type, first, info);
__mg_get_layer_from_zi(zi), zt_type, first, info, cli);
#else /* defined _MGSCHEMA_COMPOSITING */
/* give a default size first */
if (IsRectEmpty (&info->rc)) {
+48
View File
@@ -635,6 +635,30 @@ BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer)
if (mgTopmostLayer && mgTopmostLayer->cli_head)
IsPaint = 1;
// add by gengyue for swtich layer <<<<<<<<
int cur_clientId = 0;
int idx_topmost = ServerGetTopmostZNodeOfType(mgTopmostLayer, ZOF_TYPE_NORMAL, &cur_clientId);
int znode_index = 0;
if(idx_topmost > 0)
{
// get the number of app in normal level
znode_index = ServerGetNextZNode(mgTopmostLayer, 0, &cur_clientId);
while(znode_index > 0)
{
ZNODEINFO znodeinfo;
if(ServerGetZNodeInfo(NULL, znode_index, &znodeinfo))
{
if((znodeinfo.type & ZOF_TYPE_MASK) == ZOF_TYPE_NORMAL) // it the main window in normal level
{
DO_COMPSOR_OP_ARGS (on_hiding_win, mgTopmostLayer, znode_index);
}
}
znode_index = ServerGetNextZNode(mgTopmostLayer, znode_index, &cur_clientId);
}
}
// >>>>>>>>> add by gengyue for swtich layer
mgTopmostLayer = layer;
CHANGE_TOPMOST_LAYER (layer);
@@ -649,6 +673,30 @@ BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer)
client = client->next;
}
// add by gengyue for swtich layer <<<<<<<<
cur_clientId = 0;
idx_topmost = ServerGetTopmostZNodeOfType(mgTopmostLayer, ZOF_TYPE_NORMAL, &cur_clientId);
znode_index = 0;
if(idx_topmost > 0)
{
// get the number of app in normal level
znode_index = ServerGetNextZNode(mgTopmostLayer, 0, &cur_clientId);
while(znode_index > 0)
{
ZNODEINFO znodeinfo;
if(ServerGetZNodeInfo(NULL, znode_index, &znodeinfo))
{
if((znodeinfo.type & ZOF_TYPE_MASK) == ZOF_TYPE_NORMAL) // it the main window in normal level
{
DO_COMPSOR_OP_ARGS (on_showing_win, mgTopmostLayer, znode_index);
}
}
znode_index = ServerGetNextZNode(mgTopmostLayer, znode_index, &cur_clientId);
}
}
// >>>>>>>>> add by gengyue for swtich layer
/* Notify that a new topmost layer have been set. */
if (OnChangeLayer)
OnChangeLayer (LCO_TOPMOST_CHANGED, mgTopmostLayer, NULL);