2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
6 Move window behind all other windows.
9 #include <proto/layers.h>
10 #include "intuition_intern.h"
11 #include "inputhandler_actions.h"
13 struct WindowToBackActionMsg
15 struct IntuiActionMsg msg
;
16 struct Window
*window
;
19 static VOID
int_windowtoback(struct WindowToBackActionMsg
*msg
,
20 struct IntuitionBase
*IntuitionBase
);
22 /*****************************************************************************
25 #include <intuition/intuition.h>
26 #include <proto/intuition.h>
28 AROS_LH1(void, WindowToBack
,
31 AROS_LHA(struct Window
*, window
, A0
),
34 struct IntuitionBase
*, IntuitionBase
, 51, Intuition
)
37 Bring a window to the back (ie. behind any other window).
56 29-10-95 digulla automatically created from
57 intuition_lib.fd and clib/intuition_protos.h
59 *****************************************************************************/
63 struct WindowToBackActionMsg msg
;
65 DEBUG_WINDOWTOBACK(dprintf("WindowToBack: Window 0x%lx\n", window
));
71 DoASyncAction((APTR
)int_windowtoback
, &msg
.msg
, sizeof(msg
), IntuitionBase
);
78 static VOID
int_windowtoback(struct WindowToBackActionMsg
*msg
,
79 struct IntuitionBase
*IntuitionBase
)
81 struct Window
*window
= msg
->window
;
82 struct Layer
*layer
= WLAYER(window
);
83 struct Screen
*screen
= window
->WScreen
;
84 struct Requester
*req
;
86 DEBUG_WINDOWTOBACK(dprintf("IntWindowToBack: Window 0x%lx\n", window
));
88 if (!ResourceExisting(window
, RESOURCE_WINDOW
, IntuitionBase
)) return;
90 if (!(layer
->Flags
& LAYERBACKDROP
))
94 for (req
= window
->FirstRequest
; req
; req
= req
->OlderRequest
)
98 BehindLayer(0, req
->ReqLayer
);
102 BehindLayer(0, layer
);
104 /* GZZ window or regular window? */
107 /* move outer window behind! */
108 /* attention: layer->back would not be valid as
109 layer already moved!!
111 BehindLayer(0, BLAYER(window
));
114 CheckLayers(screen
, IntuitionBase
);
116 UNLOCK_REFRESH(screen
);
119 NotifyDepthArrangement(window
, IntuitionBase
);