OS Window Management System

This is an early BETA, so expect some bugs while working with more than one window.
https://snap.berkeley.edu/snap/snap.html#present:Username=joecooldoo&ProjectName=Window%20Management%20System
Also, you don't need to export a sprite or anything, just the blocks. It generates its own graphics.

I need help detecting what window is currently on top.

Try layers.

Could you make the sprite not draggable?

If you want to work with layer, i have blocks but they required javascript, but 100 times better than the blocks in look category.

It is not dragable.

I'd like to keep it JavaScript free. But thanks for asking.

What

Ask the clones for their layers to see which one is on top. The one with the highest layer (I think) is the one on top.

How do I see what layer it's on?

image
Replace 1 with which clone you want to check.
Or:
image

Current layer block here:
https://snap.berkeley.edu/snap/snap.html#present:Username=348663451y&ProjectName=Cool%20Custom%20%20Blocks

I forgot I had already downloaded a block like this. But thanks for sharing your code.

No problem!

I need to somehow exclude other clones that aren't window clones from the clones list.

Maybe if the clone has a certain costume, then check?

They can be different dimensions.

What do you mean?

The windows can have different heights and lengths. So not all windows have the same costume.

Well then maybe give each clone an identification upon creation? The ID could be like a list of the information about the clone. And if that list checks out, take a look at the layer.

Whats unique about the windows is that they all have the same control bar on top. So I can just check if the pixels equal a certain value. (To be specific, the first 10560 pixels of the window is the control bar.)