From: Mike Lowis Date: Thu, 8 Aug 2024 20:28:35 +0000 (-0400) Subject: start formalizing the design to make sure I handle the corner cases and the code... X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f90c7db202ef64be8a8fbb80c368856667f5105c;p=proto%2Fanvil.git start formalizing the design to make sure I handle the corner cases and the code doesnt get too out of hand... --- diff --git a/Design.md b/Design.md new file mode 100644 index 0000000..e2ca2f3 --- /dev/null +++ b/Design.md @@ -0,0 +1,44 @@ +# X11 Client Window State Management: + + MapRequest ->Normal/Withdrawn: + If window already tracked + Show the window and frame + Send expose event to window + else + Create new client struct + Read the window properties + Reparent the window to a frame if applicable + Move window to current workspace tiled or floating + Send expose event to window + + UnmapNotify ->Withdrawn/Iconified: + if shaded -> Iconified + Iconified: Keep window where it is, show only titlebar + else if unloaded + Withdrawn: Keep window where it is but unmapped + else + Withdrawn: Remove window from workspace. + + DestroyNotify ->Destroyed + Window is destroyed. Free all resources. + + +# Window States + +## ICCM + +* Withdrawn - unmapped, not visible +* Normal - client wants it mapped, might be hidden due to workspace management +* Iconic - client wants it mapped but iconified, might be hidden due to workspace management + +## Internal + +* Window has been created but never been mapped +* Window is floating and mapped to a visible workspace +* Window is floating and mapped to a hidden workspace +* Window is tiled and mapped to a visible workspace +* Window is tiled and mapped to a hidden workspace +* Window is tiled and shaded and mapped to a visible workspace +* Window is tiled and shaded and mapped to a hidden workspace +* Window is a transient window mapped to a visible workspace (that contains it's parent) +* Window is a transient window mapped to a hidden workspace (that contains it's parent)