From f479c56999e4747d2fd71d3ff06a38c4adf6bc55 Mon Sep 17 00:00:00 2001 From: NicJA Date: Sun, 6 Oct 2013 23:13:56 +0000 Subject: [PATCH] enable pass through mode if the frontmost screen is fullscreen (and doesnt have alpha) git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@48220 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- .../devs/monitors/Compositor/compositorclass.c | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/workbench/devs/monitors/Compositor/compositorclass.c b/workbench/devs/monitors/Compositor/compositorclass.c index 5e3e812c96..fbdb55645c 100644 --- a/workbench/devs/monitors/Compositor/compositorclass.c +++ b/workbench/devs/monitors/Compositor/compositorclass.c @@ -72,11 +72,10 @@ enum BOOL isRectInRegion(struct Region *region, struct Rectangle *rect) { struct RegionRectangle *rrect = region->RegionRectangle; - struct Rectangle tmprect; while (rrect) { - if (AndRectRect(&rrect->bounds, rect, &tmprect)) + if (AndRectRect(&rrect->bounds, rect, NULL)) return TRUE; rrect = rrect->Next; @@ -763,10 +762,11 @@ static BOOL HIDDCompositorToggleCompositing(struct HIDDCompositorData *compdata, * mirroring has a negative impact on performance. */ OOP_Object *oldcompositedbitmap = compdata->displaybitmap; + struct StackBitMapNode *topnode = compdata->bitmapstack.mlh_Head; OOP_Object *newscreenbitmap = NULL; struct TagItem bmtags[5]; - BOOL ok = TRUE; + BOOL ok = TRUE, composit = FALSE; /* (a) If mode change is needed, enforce opening a new screen */ if (compdata->modeschanged) @@ -781,14 +781,17 @@ static BOOL HIDDCompositorToggleCompositing(struct HIDDCompositorData *compdata, bmtags[3].ti_Tag = aHidd_BitMap_ModeID; bmtags[3].ti_Data = compdata->screenmodeid; bmtags[4].ti_Tag = TAG_DONE; bmtags[4].ti_Data = TAG_DONE; -#if (0) - /* - * This condition is enough as compositing allows only dragging screen down - * and not up/left/right at the moment. - */ - if (topedge > 0) + if ((topnode->topedge > 0) || (bmtags[1].ti_Data > OOP_GET(topnode->bm, aHidd_BitMap_Height))) + composit = TRUE; + + if ((topnode->leftedge > 0) || (bmtags[0].ti_Data > OOP_GET(topnode->bm, aHidd_BitMap_Width))) + composit = TRUE; + + if (topnode->sbmflags & COMPF_ALPHA) + composit = TRUE; + + if (composit) { -#endif /* (b) */ if (compdata->displaybitmap == NULL) { @@ -863,7 +866,6 @@ static BOOL HIDDCompositorToggleCompositing(struct HIDDCompositorData *compdata, */ if (ok) HIDDCompositorRedrawVisibleRegions(compdata, NULL); -#if(0) } else if (oldcompositedbitmap || newtop) { @@ -877,7 +879,6 @@ static BOOL HIDDCompositorToggleCompositing(struct HIDDCompositorData *compdata, newscreenbitmap = compdata->topbitmap; compdata->displaybitmap = NULL; } -#endif DTOGGLE(bug("[Compositor:%s] oldcompbmp 0x%p, topbmp 0x%p, compbmp 0x%p, newscreenbmp 0x%p\n", __PRETTY_FUNCTION__, oldcompositedbitmap, compdata->topbitmap, compdata->displaybitmap, newscreenbitmap)); -- 2.11.4.GIT